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_31694 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_42828 method upgrade_zimbraGalLdapAttrMap.
void upgrade_zimbraGalLdapAttrMap() throws ServiceException {
String attrName = Provisioning.A_zimbraGalLdapAttrMap;
Config config = prov.getConfig();
printer.println();
printer.println("Checking " + config.getLabel() + " for " + attrName);
String oldCalResType = "zimbraCalResType=zimbraCalResType";
String newCalResType = "zimbraCalResType,msExchResourceSearchProperties=zimbraCalResType";
String oldCalResLocationDisplayName = "zimbraCalResLocationDisplayName=zimbraCalResLocationDisplayName";
String newCalResLocationDisplayName = "zimbraCalResLocationDisplayName,displayName=zimbraCalResLocationDisplayName";
String oldMailForwardingAddress = "zimbraMailForwardingAddress=zimbraMailForwardingAddress";
String newMailForwardingAddress = "zimbraMailForwardingAddress=member";
String zimbraCalResBuilding = "zimbraCalResBuilding=zimbraCalResBuilding";
String zimbraCalResCapacity = "zimbraCalResCapacity,msExchResourceCapacity=zimbraCalResCapacity";
String zimbraCalResFloor = "zimbraCalResFloor=zimbraCalResFloor";
String zimbraCalResSite = "zimbraCalResSite=zimbraCalResSite";
String zimbraCalResContactEmail = "zimbraCalResContactEmail=zimbraCalResContactEmail";
String zimbraAccountCalendarUserType = "msExchResourceSearchProperties=zimbraAccountCalendarUserType";
String[] curValues = config.getMultiAttr(attrName);
Map<String, Object> attrs = new HashMap<String, Object>();
for (String curValue : curValues) {
replaceIfNeeded(attrs, attrName, curValue, oldCalResType, newCalResType);
replaceIfNeeded(attrs, attrName, curValue, oldCalResLocationDisplayName, newCalResLocationDisplayName);
replaceIfNeeded(attrs, attrName, curValue, oldMailForwardingAddress, newMailForwardingAddress);
}
addValue(attrs, attrName, zimbraCalResBuilding);
addValue(attrs, attrName, zimbraCalResCapacity);
addValue(attrs, attrName, zimbraCalResFloor);
addValue(attrs, attrName, zimbraCalResSite);
addValue(attrs, attrName, zimbraCalResContactEmail);
addValue(attrs, attrName, zimbraAccountCalendarUserType);
if (attrs.size() > 0) {
printer.println("Modifying " + attrName + " on " + config.getLabel());
prov.modifyAttrs(config, attrs);
}
}
use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.
the class BUG_42828 method upgrade_zimbraContactHiddenAttributes.
private void upgrade_zimbraContactHiddenAttributes() throws ServiceException {
Config config = prov.getConfig();
upgrade_zimbraContactHiddenAttributes(config, config.getLabel());
List<Server> servers = prov.getAllServers();
for (Server server : servers) {
upgrade_zimbraContactHiddenAttributes(server, "server " + server.getLabel());
}
}
use of com.zimbra.cs.account.Config in project zm-mailbox by Zimbra.
the class BUG_57039 method upgradeZimbraGalLdapAttrMap.
void upgradeZimbraGalLdapAttrMap() throws ServiceException {
Config config = prov.getConfig();
String attrName = Provisioning.A_zimbraGalLdapAttrMap;
String oldValue = "zimbraCalResLocationDisplayName,displayName=zimbraCalResLocationDisplayName";
String newValue = "zimbraCalResLocationDisplayName=zimbraCalResLocationDisplayName";
String[] curValues = config.getMultiAttr(attrName);
for (String value : curValues) {
if (value.equalsIgnoreCase(oldValue)) {
Map<String, Object> attrs = new HashMap<String, Object>();
StringUtil.addToMultiMap(attrs, "-" + attrName, oldValue);
StringUtil.addToMultiMap(attrs, "+" + attrName, newValue);
modifyAttrs(config, attrs);
}
}
}
Aggregations