use of com.zimbra.cs.account.ldap.entry.LdapShareLocator in project zm-mailbox by Zimbra.
the class LdapProvisioning method deleteShareLocator.
@Override
public void deleteShareLocator(String id) throws ServiceException {
LdapShareLocator shloc = (LdapShareLocator) get(Key.ShareLocatorBy.id, id);
if (shloc == null)
throw AccountServiceException.NO_SUCH_SHARE_LOCATOR(id);
ZLdapContext zlc = null;
try {
zlc = LdapClient.getContext(LdapServerType.MASTER, LdapUsage.DELETE_SHARELOCATOR);
zlc.deleteEntry(shloc.getDN());
shareLocatorCache.remove(shloc);
} catch (ServiceException e) {
throw ServiceException.FAILURE("unable to delete share locator: " + id, e);
} finally {
LdapClient.closeContext(zlc);
}
}
Aggregations