use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.
the class EphemeralBackendCheck method postModify.
@Override
public void postModify(CallbackContext context, String attrName, Entry entry) {
String prevUrl = context.getData(DataKey.PREV_EPHEMERAL_BACKEND_URL);
Config config = (Config) entry;
try {
config.setPreviousEphemeralBackendURL(prevUrl);
} catch (ServiceException e) {
ZimbraLog.ephemeral.error("unable to set zimbraPreviousEphemeralBackendURL to %s", prevUrl, e);
}
try {
resetMigrationInfo(config.getEphemeralBackendURL());
} catch (ServiceException e) {
ZimbraLog.ephemeral.error("unable to reset attribute migration info", e);
}
AttributeMigration.clearConfigCacheOnAllServers(false, true);
}
use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.
the class ImapLoadBalancingMechanism method newInstance.
public static ImapLoadBalancingMechanism newInstance() throws ServiceException {
Provisioning prov = Provisioning.getInstance();
Config config = prov.getConfig();
String lbMechStr = config.getAttr(Provisioning.A_zimbraImapLoadBalancingAlgorithm, ImapLBMech.AccountIdHash.name());
return newInstance(lbMechStr);
}
use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.
the class BUG_47934 method upgradeZimbraGalLdapFilterDef.
void upgradeZimbraGalLdapFilterDef() throws ServiceException {
Config config = prov.getConfig();
Pair[] values = { new Pair<String, String>("zimbraAccounts:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)(zimbraMailAlias=*%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))(!(objectclass=zimbraCalendarResource)))", "zimbraAccounts:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(zimbraPhoneticFirstName=*%s*)(zimbraPhoneticLastName=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)(zimbraMailAlias=*%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))(!(objectclass=zimbraCalendarResource)))"), new Pair<String, String>("zimbraAccountAutoComplete:(&(|(displayName=%s*)(cn=%s*)(sn=%s*)(gn=%s*)(mail=%s*)(zimbraMailDeliveryAddress=%s*)(zimbraMailAlias=%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))(!(objectclass=zimbraCalendarResource)))", "zimbraAccountAutoComplete:(&(|(displayName=%s*)(cn=%s*)(sn=%s*)(gn=%s*)(zimbraPhoneticFirstName=%s*)(zimbraPhoneticLastName=%s*)(mail=%s*)(zimbraMailDeliveryAddress=%s*)(zimbraMailAlias=%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))(!(objectclass=zimbraCalendarResource)))"), new Pair<String, String>("zimbraAccountSync:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)(zimbraMailAlias=*%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))(!(objectclass=zimbraCalendarResource)))", "zimbraAccountSync:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(zimbraPhoneticFirstName=*%s*)(zimbraPhoneticLastName=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)(zimbraMailAlias=*%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList))(!(objectclass=zimbraCalendarResource)))"), new Pair<String, String>("zimbraAutoComplete:(&(|(displayName=%s*)(cn=%s*)(sn=%s*)(gn=%s*)(mail=%s*)(zimbraMailDeliveryAddress=%s*)(zimbraMailAlias=%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList)))", "zimbraAutoComplete:(&(|(displayName=%s*)(cn=%s*)(sn=%s*)(gn=%s*)(zimbraPhoneticFirstName=%s*)(zimbraPhoneticLastName=%s*)(mail=%s*)(zimbraMailDeliveryAddress=%s*)(zimbraMailAlias=%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList)))"), new Pair<String, String>("zimbraSearch:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)(zimbraMailAlias=*%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList)))", "zimbraSearch:(&(|(displayName=*%s*)(cn=*%s*)(sn=*%s*)(gn=*%s*)(zimbraPhoneticFirstName=*%s*)(zimbraPhoneticLastName=*%s*)(mail=*%s*)(zimbraMailDeliveryAddress=*%s*)(zimbraMailAlias=*%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList)))") };
Set<String> curValues = config.getMultiAttrSet(Provisioning.A_zimbraGalLdapFilterDef);
Map<String, Object> attrs = new HashMap<String, Object>();
for (Pair<String, String> change : values) {
String oldValue = change.getFirst();
String newValue = change.getSecond();
if (curValues.contains(oldValue)) {
StringUtil.addToMultiMap(attrs, "-" + Provisioning.A_zimbraGalLdapFilterDef, oldValue);
StringUtil.addToMultiMap(attrs, "+" + Provisioning.A_zimbraGalLdapFilterDef, newValue);
}
}
modifyAttrs(config, attrs);
}
use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.
the class BUG_50258 method doGlobalConfig.
private void doGlobalConfig(ZLdapContext zlc) throws ServiceException {
Config config = prov.getConfig();
doEntry(zlc, config, "global config");
}
use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.
the class BUG_57205 method doGlobalConfig.
private void doGlobalConfig(ZLdapContext zlc) throws ServiceException {
Config config = prov.getConfig();
doEntry(zlc, config);
}
Aggregations