Search in sources :

Example 61 with Config

use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.

the class BUG_72007 method doUpgrade.

@Override
void doUpgrade() throws ServiceException {
    Config config = prov.getConfig();
    upgrdeAcount(config.getAttr(Provisioning.A_zimbraSpamIsNotSpamAccount));
    upgrdeAcount(config.getAttr(Provisioning.A_zimbraSpamIsSpamAccount));
}
Also used : Config(com.zimbra.cs.account.Config)

Example 62 with Config

use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.

the class BUG_88098 method upgradeZimbraGalLdapFilterDef.

@SuppressWarnings("unchecked")
private void upgradeZimbraGalLdapFilterDef() throws ServiceException {
    Config config = prov.getConfig();
    Pair<String, String> value = new Pair<String, String>("zimbraAccountAutoComplete:(&(|(displayName=%s*)(cn=%s*)(sn=%s*)(gn=%s*)(zimbraPhoneticFirstName=%s*)(zimbraPhoneticLastName=%s*)(mail=%s*)(zimbraMailDeliveryAddress=%s*)(zimbraMailAlias=%s*))(|(objectclass=zimbraAccount)(objectclass=zimbraDistributionList)(objectclass=zimbraGroup))(!(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=zimbraGroup))(!(objectclass=zimbraCalendarResource)))");
    Set<String> curValues = config.getMultiAttrSet(Provisioning.A_zimbraGalLdapFilterDef);
    Map<String, Object> attrs = new LinkedHashMap<String, Object>();
    String oldValue = value.getFirst();
    String newValue = value.getSecond();
    if (curValues.contains(oldValue)) {
        StringUtil.addToMultiMap(attrs, "-" + Provisioning.A_zimbraGalLdapFilterDef, oldValue);
        StringUtil.addToMultiMap(attrs, "+" + Provisioning.A_zimbraGalLdapFilterDef, newValue);
    }
    modifyAttrs(config, attrs);
}
Also used : Config(com.zimbra.cs.account.Config) Pair(com.zimbra.common.util.Pair) LinkedHashMap(java.util.LinkedHashMap)

Example 63 with Config

use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.

the class BUG_76427 method doGlobalConfig.

private void doGlobalConfig(ZLdapContext zlc) throws ServiceException {
    Config config = prov.getConfig();
    doEntry(zlc, config, "global config", Provisioning.A_zimbraZimletDomainAvailableZimlets);
}
Also used : Config(com.zimbra.cs.account.Config)

Example 64 with Config

use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.

the class BUG_47934 method upgradeZimbraGalLdapAttrMap.

void upgradeZimbraGalLdapAttrMap() throws ServiceException {
    Config config = prov.getConfig();
    String[] values = { "zimbraPhoneticCompany,ms-DS-Phonetic-Company-Name=phoneticCompany", "zimbraPhoneticFirstName,ms-DS-Phonetic-First-Name=phoneticFirstName", "zimbraPhoneticLastName,ms-DS-Phonetic-Last-Name=phoneticLastName" };
    Map<String, Object> attrs = new HashMap<String, Object>();
    attrs.put("+" + Provisioning.A_zimbraGalLdapAttrMap, values);
    modifyAttrs(config, attrs);
}
Also used : HashMap(java.util.HashMap) Config(com.zimbra.cs.account.Config)

Example 65 with Config

use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.

the class BUG_58084 method doGlobalConfig.

private void doGlobalConfig(ZLdapContext zlc) throws ServiceException {
    Config config = prov.getConfig();
    doEntry(zlc, config, "global config");
}
Also used : Config(com.zimbra.cs.account.Config)

Aggregations

Config (com.zimbra.cs.account.Config)73 HashMap (java.util.HashMap)24 Provisioning (com.zimbra.cs.account.Provisioning)10 Test (org.junit.Test)8 ServiceException (com.zimbra.common.service.ServiceException)7 Account (com.zimbra.cs.account.Account)7 RetentionPolicy (com.zimbra.soap.mail.type.RetentionPolicy)7 Element (com.zimbra.common.soap.Element)6 Policy (com.zimbra.soap.mail.type.Policy)6 Cos (com.zimbra.cs.account.Cos)5 Server (com.zimbra.cs.account.Server)5 Domain (com.zimbra.cs.account.Domain)4 ZimbraSoapContext (com.zimbra.soap.ZimbraSoapContext)4 Pair (com.zimbra.common.util.Pair)3 HashSet (java.util.HashSet)3 SMTPMessage (com.sun.mail.smtp.SMTPMessage)2 ZFilterAction (com.zimbra.client.ZFilterAction)2 ZFileIntoAction (com.zimbra.client.ZFilterAction.ZFileIntoAction)2 ZFilterCondition (com.zimbra.client.ZFilterCondition)2 ZHeaderCondition (com.zimbra.client.ZFilterCondition.ZHeaderCondition)2