Search in sources :

Example 66 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 67 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 68 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)

Example 69 with Config

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

the class BUG_58514 method upgradeZimbraContactHiddenAttributes.

private void upgradeZimbraContactHiddenAttributes() throws ServiceException {
    Config config = prov.getConfig();
    upgradeZimbraContactHiddenAttributes(config);
    List<Server> servers = prov.getAllServers();
    for (Server server : servers) {
        upgradeZimbraContactHiddenAttributes(server);
    }
}
Also used : Server(com.zimbra.cs.account.Server) Config(com.zimbra.cs.account.Config)

Example 70 with Config

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

the class BUG_58514 method upgradeZimbraGalLdapAttrMap.

private void upgradeZimbraGalLdapAttrMap() throws ServiceException {
    final String attrName = Provisioning.A_zimbraGalLdapAttrMap;
    final String valueToRemove = "binary zimbraPrefMailSMIMECertificate,userCertificate,userSMIMECertificate=SMIMECertificate";
    final String[] valuesToAdd = new String[] { "(certificate) userCertificate=userCertificate", "(binary) userSMIMECertificate=userSMIMECertificate" };
    Config config = prov.getConfig();
    Map<String, Object> attrs = new HashMap<String, Object>();
    Set<String> curValues = config.getMultiAttrSet(attrName);
    if (curValues.contains(valueToRemove)) {
        StringUtil.addToMultiMap(attrs, "-" + attrName, valueToRemove);
    }
    for (String valueToAdd : valuesToAdd) {
        if (!curValues.contains(valueToAdd)) {
            StringUtil.addToMultiMap(attrs, "+" + attrName, valueToAdd);
        }
    }
    modifyAttrs(config, attrs);
}
Also used : HashMap(java.util.HashMap) 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