Search in sources :

Example 91 with ZLdapContext

use of com.zimbra.cs.ldap.ZLdapContext in project zm-mailbox by Zimbra.

the class BUG_76427 method doUpgrade.

@Override
void doUpgrade() throws ServiceException {
    ZLdapContext zlc = LdapClient.getContext(LdapServerType.MASTER, LdapUsage.UPGRADE);
    try {
        doGlobalConfig(zlc);
        doAllDomain(zlc);
        doAllCos(zlc);
    } finally {
        LdapClient.closeContext(zlc);
    }
}
Also used : ZLdapContext(com.zimbra.cs.ldap.ZLdapContext)

Example 92 with ZLdapContext

use of com.zimbra.cs.ldap.ZLdapContext in project zm-mailbox by Zimbra.

the class BUG_81385 method doUpgrade.

@Override
void doUpgrade() throws ServiceException {
    ZLdapContext zlc = LdapClient.getContext(LdapServerType.MASTER, LdapUsage.UPGRADE);
    try {
        doCos(zlc);
        doAccount(zlc);
    } finally {
        LdapClient.closeContext(zlc);
    }
}
Also used : ZLdapContext(com.zimbra.cs.ldap.ZLdapContext)

Example 93 with ZLdapContext

use of com.zimbra.cs.ldap.ZLdapContext in project zm-mailbox by Zimbra.

the class BUG_57425 method doUpgrade.

@Override
void doUpgrade() throws ServiceException {
    ZLdapContext zlc = LdapClient.getContext(LdapServerType.MASTER, LdapUsage.UPGRADE);
    try {
        doGlobalConfig(zlc);
        doAllServers(zlc);
    } finally {
        LdapClient.closeContext(zlc);
    }
}
Also used : ZLdapContext(com.zimbra.cs.ldap.ZLdapContext)

Example 94 with ZLdapContext

use of com.zimbra.cs.ldap.ZLdapContext in project zm-mailbox by Zimbra.

the class BUG_57866 method doUpgrade.

@Override
void doUpgrade() throws ServiceException {
    ZLdapContext zlc = null;
    try {
        zlc = LdapClient.getContext(LdapServerType.MASTER, LdapUsage.UPGRADE);
        try {
            printer.println("\n=== Upgrading spam account");
            upgradeSpamAccount(zlc);
        } catch (ServiceException e) {
            printer.printStackTrace("unable to upgrade spam account", e);
        }
        try {
            printer.println("\n=== Upgrading ham account");
            upgradeHamAccount(zlc);
        } catch (ServiceException e) {
            printer.printStackTrace("unable to upgrade ham account", e);
        }
        try {
            printer.println("\n=== Upgrading wiki accounts");
            upgradeWikiAccounts(zlc);
        } catch (ServiceException e) {
            printer.printStackTrace("unable to upgrade wiki accounts", e);
        }
        try {
            printer.println("\n=== Upgrading GAL sync accounts");
            upgradeGalSyncAccounts(zlc);
        } catch (ServiceException e) {
            printer.printStackTrace("unable to upgrade GAL sync accounts", e);
        }
        try {
            printer.println("\n=== Upgrading quarantine account");
            upgradeQuarantineAccount(zlc);
        } catch (ServiceException e) {
            printer.printStackTrace("unable to upgrade quarantine account", e);
        }
    } finally {
        LdapClient.closeContext(zlc);
    }
}
Also used : ZLdapContext(com.zimbra.cs.ldap.ZLdapContext) ServiceException(com.zimbra.common.service.ServiceException)

Example 95 with ZLdapContext

use of com.zimbra.cs.ldap.ZLdapContext in project zm-mailbox by Zimbra.

the class BUG_58084 method doUpgrade.

@Override
void doUpgrade() throws ServiceException {
    ZLdapContext zlc = LdapClient.getContext(LdapServerType.MASTER, LdapUsage.UPGRADE);
    try {
        doGlobalConfig(zlc);
        doAllServers(zlc);
    } finally {
        LdapClient.closeContext(zlc);
    }
}
Also used : ZLdapContext(com.zimbra.cs.ldap.ZLdapContext)

Aggregations

ZLdapContext (com.zimbra.cs.ldap.ZLdapContext)126 ServiceException (com.zimbra.common.service.ServiceException)65 AccountServiceException (com.zimbra.cs.account.AccountServiceException)62 AuthFailedServiceException (com.zimbra.cs.account.AccountServiceException.AuthFailedServiceException)60 LdapEntryAlreadyExistException (com.zimbra.cs.ldap.LdapException.LdapEntryAlreadyExistException)23 LdapException (com.zimbra.cs.ldap.LdapException)22 ZMutableEntry (com.zimbra.cs.ldap.ZMutableEntry)21 Domain (com.zimbra.cs.account.Domain)19 LdapEntry (com.zimbra.cs.account.ldap.entry.LdapEntry)18 CallbackContext (com.zimbra.cs.account.callback.CallbackContext)16 Date (java.util.Date)16 LdapDomain (com.zimbra.cs.account.ldap.entry.LdapDomain)14 HashMap (java.util.HashMap)14 SearchLdapOptions (com.zimbra.cs.ldap.SearchLdapOptions)13 ZLdapFilter (com.zimbra.cs.ldap.ZLdapFilter)12 Account (com.zimbra.cs.account.Account)11 LdapDynamicGroup (com.zimbra.cs.account.ldap.entry.LdapDynamicGroup)11 ZAttributes (com.zimbra.cs.ldap.ZAttributes)10 HashSet (java.util.HashSet)10 GuestAccount (com.zimbra.cs.account.GuestAccount)9