private void renameIdentity(LdapAccount account, LdapIdentity identity, String newIdentityName) throws ServiceException {
private void renameIdentity(LdapEntry entry, LdapIdentity identity, String newIdentityName) throws ServiceException {
    private void renameIdentity(LdapAccount account, LdapIdentity identity, String newIdentityName) throws ServiceException {                if (identity.getName().equalsIgnoreCase(DEFAULT_IDENTITY_NAME))            throw ServiceException.INVALID_REQUEST("can't rename default identity", null);                DirContext ctxt = null;        try {            ctxt = LdapUtil.getDirContext(true);            String newDn = getIdentityDn(account, newIdentityName);                        ctxt.rename(identity.getDN(), newDn);        } catch (NamingException e) {            throw ServiceException.FAILURE("unable to rename identity: "+newIdentityName, e);        } finally {            LdapUtil.closeContext(ctxt);        }    }