Package com.iplanet.am.sdk.remote
Class DirectoryManagerImpl
- java.lang.Object
-
- com.sun.identity.idm.server.IdRepoJAXRPCObjectImpl
-
- com.iplanet.am.sdk.remote.DirectoryManagerImpl
-
- All Implemented Interfaces:
AMObjectListener,DirectoryManagerIF,Remote,EventListener
public class DirectoryManagerImpl extends IdRepoJAXRPCObjectImpl implements AMObjectListener
-
-
Field Summary
Fields Modifier and Type Field Description protected static IComplianceServicescomplianceServicesprotected static IDCTreeServicesdcTreeServicesprotected static Debugdebugprotected static IDirectoryServicesdsServicesprotected static booleaninitializedprotected static SSOTokenManagertm-
Fields inherited from class com.sun.identity.idm.server.IdRepoJAXRPCObjectImpl
cacheSize, IDREPO_SERVICE, idRepoDebug, idRepoNotificationURLs, idServices, serverPort, serverURL, tokenManager, urlServer
-
Fields inherited from interface com.iplanet.am.sdk.AMObjectListener
ADD, DELETE, MODIFY, RENAMED
-
-
Constructor Summary
Constructors Constructor Description DirectoryManagerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallObjectsChanged()This callback notifies the listener that all object should be marked as "changed" or "dirty".voidchangePassword(String token, String entryDN, String attrName, String oldPassword, String newPassword)StringcreateAMTemplate(String token, String entryDN, int objectType, String serviceName, Map attributes, int priority)voidcreateEntry(String token, String entryName, int objectType, String parentDN, Map attributes)voiddeRegisterNotificationURL(String notificationID)booleandoesEntryExists(String token, String entryDN)StringgetAMTemplateDN(String token, String entryDN, int objectType, String serviceName, int type)MapgetAttributes1(String token, String entryDN, int profileType)MapgetAttributes2(String token, String entryDN, Set attrNames, int profileType)MapgetAttributes3(String token, String entryDN, boolean ignoreCompliance, boolean byteValues, int profileType)MapgetAttributes4(String token, String entryDN, Set attrNames, boolean ignoreCompliance, boolean byteValues, int profileType)MapgetAttributesByteValues1(String token, String entryDN, int profileType)MapgetAttributesByteValues2(String token, String entryDN, Set attrNames, int profileType)SetgetAttributesForSchema(String objectclass)MapgetConfigMap()StringgetCreationTemplateName(int objectType)MapgetDCTreeAttributes(String token, String entryDN, Set attrNames, boolean byteValues, int objectType)StringgetDeletedObjectFilter(int objecttype)MapgetExternalAttributes(String token, String entryDN, Set attrNames, int profileType)LinkedListgetGroupFilterAndScope(String token, String entryDN, int profileType)SetgetMembers(String token, String entryDN, int objectType)StringgetNamingAttr(int objectType, String orgDN)StringgetObjectClassFromDS(int objectType)intgetObjectType(String token, String dn)StringgetOrganizationDN(String token, String entryDN)StringgetOrgDNFromDomain(String token, String domain)StringgetOrgSearchFilter(String entryDN)SetgetRegisteredServiceNames(String token, String entryDN)StringgetSearchFilterFromTemplate(int objectType, String orgDN, String searchTemplateName)SetgetTopLevelContainers(String token)protected voidinitialize()booleanisAncestorOrgDeleted(String token, String dn, int profileType)voidmodifyMemberShip(String token, Set members, String target, int type, int operation)voidobjectChanged(String name, int type, Map configMap)This callback method is called by the Identity Repository plugin when backend datastore triggers a notification eventSet<String>objectsChanged(int time)Returns the notification event XMLs for changed objects in the past N+2 minutes.voidobjectsChanged(String name, int type, Set attrNames, Map configMap)This callback method is called by the Identity Repository plugin when backend datastore triggers a notification event that results in multiple objects being modified.voidpermissionsChanged(String name, Map configMap)This callback method is called by the Identity Repository plugin when backend datastore triggers a permission change notification event.protected static voidprocessEntryChanged(String method, String name, int type, Set attrNames)StringregisterNotificationURL(String url)voidregisterService(String token, String orgDN, String serviceName)voidremoveAdminRole(String token, String dn, boolean recursive)voidremoveEntry(String token, String entryDN, int objectType, boolean recursive, boolean softDelete)StringrenameEntry(String token, int objectType, String entryDN, String newName, boolean deleteOldName)Setsearch1(String token, String entryDN, String searchFilter, int searchScope)Mapsearch2(String token, String entryDN, String searchFilter, List sortKeys, int startIndex, int beforeCount, int afterCount, String jumpTo, int timeOut, int maxResults, int scope, boolean allAttributes, String[] attrNames)Mapsearch3(String token, String entryDN, String searchFilter, List sortKeys, int startIndex, int beforeCount, int afterCount, String jumpTo, int timeOut, int maxResults, int scope, boolean allAttributes, Set attrNamesSet)voidsetAttributes(String token, String entryDN, int objectType, Map stringAttributes, Map byteAttributes, boolean isAdd)voidsetConfigMap(Map cmap)voidsetGroupFilter(String token, String entryDN, String filter)voidunRegisterService(String token, String entryDN, int objectType, String serviceName, int type)voidupdateUserAttribute(String token, Set members, String staticGroupDN, boolean toAdd)voidverifyAndDeleteObject(String token, String dn)StringverifyAndGetOrgDN(String token, String entryDN, String childDN)-
Methods inherited from class com.sun.identity.idm.server.IdRepoJAXRPCObjectImpl
assignService_idrepo, changePassword_idrepo, collectChangesFromCache, create_idrepo, delete_idrepo, deRegisterNotificationURL_idrepo, getAssignedServices_idrepo, getAttributes1_idrepo, getAttributes2_idrepo, getBinaryAttributes_idrepo, getBinaryServiceAttributes_idrepo, getCachedValues, getCacheIndex, getFullyQualifiedNames_idrepo, getMembers_idrepo, getMemberships_idrepo, getServiceAttributes_idrepo, getServiceAttributesAscending_idrepo, getSpecialIdentities_idrepo, getSSOToken, getSupportedOperations_idrepo, getSupportedTypes_idrepo, initialize_idrepo, initializeCacheSize, isActive_idrepo, isClientOnSameServer, isExists_idrepo, modifyMemberShip_idrepo, modifyService_idrepo, objectsChanged_idrepo, processEntryChanged_idrepo, registerNotificationURL, registerNotificationURL_idrepo, removeAttributes_idrepo, search1_idrepo, search2_idrepo, setActiveStatus_idrepo, setAttributes_idrepo, setAttributes2_idrepo, unassignService_idrepo
-
-
-
-
Field Detail
-
debug
protected static Debug debug
-
tm
protected static SSOTokenManager tm
-
initialized
protected static boolean initialized
-
dsServices
protected static IDirectoryServices dsServices
-
dcTreeServices
protected static IDCTreeServices dcTreeServices
-
complianceServices
protected static IComplianceServices complianceServices
-
-
Method Detail
-
initialize
protected void initialize() throws RemoteException- Throws:
RemoteException
-
createAMTemplate
public String createAMTemplate(String token, String entryDN, int objectType, String serviceName, Map attributes, int priority) throws AMRemoteException, SSOException, RemoteException
- Specified by:
createAMTemplatein interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
createEntry
public void createEntry(String token, String entryName, int objectType, String parentDN, Map attributes) throws AMRemoteException, SSOException, RemoteException
- Specified by:
createEntryin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
doesEntryExists
public boolean doesEntryExists(String token, String entryDN) throws AMRemoteException, SSOException, RemoteException
- Specified by:
doesEntryExistsin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getAMTemplateDN
public String getAMTemplateDN(String token, String entryDN, int objectType, String serviceName, int type) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getAMTemplateDNin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getAttributes3
public Map getAttributes3(String token, String entryDN, boolean ignoreCompliance, boolean byteValues, int profileType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getAttributes3in interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getAttributes1
public Map getAttributes1(String token, String entryDN, int profileType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getAttributes1in interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getAttributes2
public Map getAttributes2(String token, String entryDN, Set attrNames, int profileType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getAttributes2in interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getAttributesByteValues1
public Map getAttributesByteValues1(String token, String entryDN, int profileType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getAttributesByteValues1in interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getAttributesByteValues2
public Map getAttributesByteValues2(String token, String entryDN, Set attrNames, int profileType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getAttributesByteValues2in interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getAttributesForSchema
public Set getAttributesForSchema(String objectclass) throws RemoteException
- Specified by:
getAttributesForSchemain interfaceDirectoryManagerIF- Throws:
RemoteException
-
getCreationTemplateName
public String getCreationTemplateName(int objectType) throws RemoteException
- Specified by:
getCreationTemplateNamein interfaceDirectoryManagerIF- Throws:
RemoteException
-
getDCTreeAttributes
public Map getDCTreeAttributes(String token, String entryDN, Set attrNames, boolean byteValues, int objectType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getDCTreeAttributesin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getDeletedObjectFilter
public String getDeletedObjectFilter(int objecttype) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getDeletedObjectFilterin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getExternalAttributes
public Map getExternalAttributes(String token, String entryDN, Set attrNames, int profileType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getExternalAttributesin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getGroupFilterAndScope
public LinkedList getGroupFilterAndScope(String token, String entryDN, int profileType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getGroupFilterAndScopein interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getMembers
public Set getMembers(String token, String entryDN, int objectType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getMembersin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getNamingAttr
public String getNamingAttr(int objectType, String orgDN) throws RemoteException
- Specified by:
getNamingAttrin interfaceDirectoryManagerIF- Throws:
RemoteException
-
getObjectClassFromDS
public String getObjectClassFromDS(int objectType) throws RemoteException
- Specified by:
getObjectClassFromDSin interfaceDirectoryManagerIF- Throws:
RemoteException
-
getObjectType
public int getObjectType(String token, String dn) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getObjectTypein interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getOrganizationDN
public String getOrganizationDN(String token, String entryDN) throws AMRemoteException, RemoteException, SSOException
- Specified by:
getOrganizationDNin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionRemoteExceptionSSOException
-
verifyAndGetOrgDN
public String verifyAndGetOrgDN(String token, String entryDN, String childDN) throws AMRemoteException, RemoteException, SSOException
- Specified by:
verifyAndGetOrgDNin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionRemoteExceptionSSOException
-
getOrgDNFromDomain
public String getOrgDNFromDomain(String token, String domain) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getOrgDNFromDomainin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getOrgSearchFilter
public String getOrgSearchFilter(String entryDN) throws RemoteException
- Specified by:
getOrgSearchFilterin interfaceDirectoryManagerIF- Throws:
RemoteException
-
getRegisteredServiceNames
public Set getRegisteredServiceNames(String token, String entryDN) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getRegisteredServiceNamesin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getSearchFilterFromTemplate
public String getSearchFilterFromTemplate(int objectType, String orgDN, String searchTemplateName) throws RemoteException
- Specified by:
getSearchFilterFromTemplatein interfaceDirectoryManagerIF- Throws:
RemoteException
-
getTopLevelContainers
public Set getTopLevelContainers(String token) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getTopLevelContainersin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
isAncestorOrgDeleted
public boolean isAncestorOrgDeleted(String token, String dn, int profileType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
isAncestorOrgDeletedin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
modifyMemberShip
public void modifyMemberShip(String token, Set members, String target, int type, int operation) throws AMRemoteException, SSOException, RemoteException
- Specified by:
modifyMemberShipin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
registerService
public void registerService(String token, String orgDN, String serviceName) throws AMRemoteException, SSOException, RemoteException
- Specified by:
registerServicein interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
removeAdminRole
public void removeAdminRole(String token, String dn, boolean recursive) throws AMRemoteException, SSOException, RemoteException
- Specified by:
removeAdminRolein interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
removeEntry
public void removeEntry(String token, String entryDN, int objectType, boolean recursive, boolean softDelete) throws AMRemoteException, SSOException, RemoteException
- Specified by:
removeEntryin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
renameEntry
public String renameEntry(String token, int objectType, String entryDN, String newName, boolean deleteOldName) throws AMRemoteException, SSOException, RemoteException
- Specified by:
renameEntryin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
search1
public Set search1(String token, String entryDN, String searchFilter, int searchScope) throws AMRemoteException, SSOException, RemoteException
- Specified by:
search1in interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
search2
public Map search2(String token, String entryDN, String searchFilter, List sortKeys, int startIndex, int beforeCount, int afterCount, String jumpTo, int timeOut, int maxResults, int scope, boolean allAttributes, String[] attrNames) throws AMRemoteException, SSOException, RemoteException
- Specified by:
search2in interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
search3
public Map search3(String token, String entryDN, String searchFilter, List sortKeys, int startIndex, int beforeCount, int afterCount, String jumpTo, int timeOut, int maxResults, int scope, boolean allAttributes, Set attrNamesSet) throws AMRemoteException, SSOException, RemoteException
- Specified by:
search3in interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
setAttributes
public void setAttributes(String token, String entryDN, int objectType, Map stringAttributes, Map byteAttributes, boolean isAdd) throws AMRemoteException, SSOException, RemoteException
- Specified by:
setAttributesin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
changePassword
public void changePassword(String token, String entryDN, String attrName, String oldPassword, String newPassword) throws AMRemoteException, SSOException, RemoteException
- Specified by:
changePasswordin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
setGroupFilter
public void setGroupFilter(String token, String entryDN, String filter) throws AMRemoteException, SSOException, RemoteException
- Specified by:
setGroupFilterin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
unRegisterService
public void unRegisterService(String token, String entryDN, int objectType, String serviceName, int type) throws AMRemoteException, SSOException, RemoteException
- Specified by:
unRegisterServicein interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
updateUserAttribute
public void updateUserAttribute(String token, Set members, String staticGroupDN, boolean toAdd) throws AMRemoteException, SSOException, RemoteException
- Specified by:
updateUserAttributein interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
verifyAndDeleteObject
public void verifyAndDeleteObject(String token, String dn) throws AMRemoteException, SSOException, RemoteException
- Specified by:
verifyAndDeleteObjectin interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
getAttributes4
public Map getAttributes4(String token, String entryDN, Set attrNames, boolean ignoreCompliance, boolean byteValues, int profileType) throws AMRemoteException, SSOException, RemoteException
- Specified by:
getAttributes4in interfaceDirectoryManagerIF- Throws:
AMRemoteExceptionSSOExceptionRemoteException
-
objectsChanged
public Set<String> objectsChanged(int time) throws RemoteException
Returns the notification event XMLs for changed objects in the past N+2 minutes.- Specified by:
objectsChangedin interfaceDirectoryManagerIF- Parameters:
time- The number of minutes we should retrieve the changed objects for.- Returns:
- Returns the notification XMLs for the current minute, for the requested N minute, and also for 2 additional minutes.
- Throws:
RemoteException- If there was an error while collecting changed objects.
-
registerNotificationURL
public String registerNotificationURL(String url) throws RemoteException
- Specified by:
registerNotificationURLin interfaceDirectoryManagerIF- Throws:
RemoteException
-
deRegisterNotificationURL
public void deRegisterNotificationURL(String notificationID) throws RemoteException
- Specified by:
deRegisterNotificationURLin interfaceDirectoryManagerIF- Throws:
RemoteException
-
processEntryChanged
protected static void processEntryChanged(String method, String name, int type, Set attrNames)
-
objectChanged
public void objectChanged(String name, int type, Map configMap)
Description copied from interface:AMObjectListenerThis callback method is called by the Identity Repository plugin when backend datastore triggers a notification event- Specified by:
objectChangedin interfaceAMObjectListener- Parameters:
name- unique name of the object that has changedtype- type of change i.e., ADD, DELETE, MODIFYconfigMap- Map of configuration information which the AM SDK framework passes to the plugin, and which the plugin should return as is. This information helps the framework to map the object to the universal identifier used as the cache key.
-
objectsChanged
public void objectsChanged(String name, int type, Set attrNames, Map configMap)
Description copied from interface:AMObjectListenerThis callback method is called by the Identity Repository plugin when backend datastore triggers a notification event that results in multiple objects being modified. This callback signifies a change to specific attributes of all members of the organization. This callback should be used to notify modifications of "dynamic" or "virtual" attributes.- Specified by:
objectsChangedin interfaceAMObjectListener- Parameters:
name- name of the parent whoes "dynamic" attributes attributes have been modified, affecting all its childrentype- type of change i.e., ADD, DELETE, MODIFYattrNames- attribute names that have been modifiedconfigMap- Map of configuration information which the AM SDK framework passes to the plugin, and which the plugin should return as is. This information helps the framework to map the object to the universal identifier used as the cache key.
-
permissionsChanged
public void permissionsChanged(String name, Map configMap)
Description copied from interface:AMObjectListenerThis callback method is called by the Identity Repository plugin when backend datastore triggers a permission change notification event. This callback signifies a change in the permissions associated with an organization. A change in the permission can impack the permissios of all entities in an organization and all cached entries for that organization will be cleared.- Specified by:
permissionsChangedin interfaceAMObjectListener- Parameters:
name- unique name of the organization whoes permissions has changedconfigMap- Map of configuration information which the AM SDK framework passes to the plugin, and which the plugin should return as is. This information helps the framework to map the object to the universal identifier used as the cache key.
-
allObjectsChanged
public void allObjectsChanged()
Description copied from interface:AMObjectListenerThis callback notifies the listener that all object should be marked as "changed" or "dirty". This callback is only used in the case when IdRepo plugin looses the connection to data store and does not know what could have changed in the repository.- Specified by:
allObjectsChangedin interfaceAMObjectListener
-
setConfigMap
public void setConfigMap(Map cmap)
- Specified by:
setConfigMapin interfaceAMObjectListener
-
getConfigMap
public Map getConfigMap()
- Specified by:
getConfigMapin interfaceAMObjectListener
-
-