Package com.sun.identity.idm.server
Class IdRepoJAXRPCObjectImpl
- java.lang.Object
-
- com.sun.identity.idm.server.IdRepoJAXRPCObjectImpl
-
- All Implemented Interfaces:
DirectoryManagerIF,Remote
- Direct Known Subclasses:
DirectoryManagerImpl
public abstract class IdRepoJAXRPCObjectImpl extends Object implements DirectoryManagerIF
Provides service side implementation of IdRepo for JAX-RPC interfaceDirectoryManagerIF . Does not provide implementation for deprecated AMSDK interfaces. Remote clients using openssoclientsdk.jar would be calling these methods using SOAP. Implements identity changes notifications via PLL and also stores notifications changes for polling clients.
-
-
Field Summary
Fields Modifier and Type Field Description protected static intcacheSizeprotected static StringIDREPO_SERVICEprotected static DebugidRepoDebugprotected static Map<String,URL>idRepoNotificationURLsprotected static IdServicesidServicesprotected static StringserverPortprotected static StringserverURLprotected static SSOTokenManagertokenManagerprotected static URLurlServer
-
Constructor Summary
Constructors Constructor Description IdRepoJAXRPCObjectImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignService_idrepo(String token, String type, String name, String serviceName, String stype, Map attrMap, String amOrgName, String amsdkDN)voidchangePassword_idrepo(String token, String type, String name, String oldPassword, String newPassword, String amOrgName, String amsdkDN)protected Set<String>collectChangesFromCache(int time, ConcurrentSkipListMap<Long,Set<String>> cache)Collects the notification XMLs for a given time period from the provided cache.Stringcreate_idrepo(String token, String type, String name, Map attrMap, String amOrgName)voiddelete_idrepo(String token, String type, String name, String orgName, String amsdkDN)voiddeRegisterNotificationURL_idrepo(String notificationID)SetgetAssignedServices_idrepo(String token, String type, String name, Map mapOfServiceNamesAndOCs, String amOrgName, String amsdkDN)MapgetAttributes1_idrepo(String token, String type, String name, Set attrNames, String amOrgName, String amsdkDN)MapgetAttributes2_idrepo(String token, String type, String name, String amOrgName, String amsdkDN)Map<String,Set<String>>getBinaryAttributes_idrepo(String token, String type, String name, Set<String> attrNames, String amOrgName, String amsdkDN)Returns attributes in binary format for a given identity using the IdRepo API.MapgetBinaryServiceAttributes_idrepo(String token, String type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN)protected static Set<String>getCachedValues(ConcurrentSkipListMap<Long,Set<String>> cache)Returns the cached notification XMLs for the current cacheIndex.protected static longgetCacheIndex()SetgetFullyQualifiedNames_idrepo(String token, String type, String name, String amOrgName)SetgetMembers_idrepo(String token, String type, String name, String amOrgName, String membersType, String amsdkDN)SetgetMemberships_idrepo(String token, String type, String name, String membershipType, String amOrgName, String amsdkDN)MapgetServiceAttributes_idrepo(String token, String type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN)MapgetServiceAttributesAscending_idrepo(String token, String type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN)Non-javadoc, non-public methods Get the service attributes of the name identity.MapgetSpecialIdentities_idrepo(String token, String type, String amOrgName)protected SSOTokengetSSOToken(String token)Check if agent token ID is appended to the token string.SetgetSupportedOperations_idrepo(String token, String type, String amOrgName)SetgetSupportedTypes_idrepo(String token, String amOrgName)protected static voidinitialize_idrepo()Initializes this class with system properties.protected static voidinitializeCacheSize()booleanisActive_idrepo(String token, String type, String name, String amOrgName, String amsdkDN)protected booleanisClientOnSameServer(String clientURL)booleanisExists_idrepo(String token, String type, String name, String amOrgName)voidmodifyMemberShip_idrepo(String token, String type, String name, Set members, String membersType, int operation, String amOrgName)voidmodifyService_idrepo(String token, String type, String name, String serviceName, String stype, Map attrMap, String amOrgName, String amsdkDN)Set<String>objectsChanged_idrepo(int time)Returns the notification event XMLs for changed objects in the past N+2 minutes.protected static voidprocessEntryChanged_idrepo(String method, String name, int type, Set attrNames)protected StringregisterNotificationURL(String url, Map<String,URL> notificationURLs)StringregisterNotificationURL_idrepo(String url)voidremoveAttributes_idrepo(String token, String type, String name, Set attrNames, String amOrgName, String amsdkDN)Mapsearch1_idrepo(String token, String type, String pattern, Map avPairs, boolean recursive, int maxResults, int maxTime, Set returnAttrs, String amOrgName)Mapsearch2_idrepo(String token, String type, String pattern, int maxTime, int maxResults, Set returnAttrs, boolean returnAllAttrs, int filterOp, Map avPairs, boolean recursive, String amOrgName)voidsetActiveStatus_idrepo(String token, String type, String name, String amOrgName, String amsdkDN, boolean active)voidsetAttributes_idrepo(String token, String type, String name, Map attributes, boolean isAdd, String amOrgName, String amsdkDN)voidsetAttributes2_idrepo(String token, String type, String name, Map attributes, boolean isAdd, String amOrgName, String amsdkDN, boolean isString)voidunassignService_idrepo(String token, String type, String name, String serviceName, Map attrMap, String amOrgName, String amsdkDN)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.iplanet.am.sdk.remote.DirectoryManagerIF
changePassword, createAMTemplate, createEntry, deRegisterNotificationURL, doesEntryExists, getAMTemplateDN, getAttributes1, getAttributes2, getAttributes3, getAttributes4, getAttributesByteValues1, getAttributesByteValues2, getAttributesForSchema, getCreationTemplateName, getDCTreeAttributes, getDeletedObjectFilter, getExternalAttributes, getGroupFilterAndScope, getMembers, getNamingAttr, getObjectClassFromDS, getObjectType, getOrganizationDN, getOrgDNFromDomain, getOrgSearchFilter, getRegisteredServiceNames, getSearchFilterFromTemplate, getTopLevelContainers, isAncestorOrgDeleted, modifyMemberShip, objectsChanged, registerNotificationURL, registerService, removeAdminRole, removeEntry, renameEntry, search1, search2, search3, setAttributes, setGroupFilter, unRegisterService, updateUserAttribute, verifyAndDeleteObject, verifyAndGetOrgDN
-
-
-
-
Field Detail
-
idRepoDebug
protected static Debug idRepoDebug
-
tokenManager
protected static SSOTokenManager tokenManager
-
idServices
protected static IdServices idServices
-
IDREPO_SERVICE
protected static final String IDREPO_SERVICE
- See Also:
- Constant Field Values
-
cacheSize
protected static int cacheSize
-
serverURL
protected static String serverURL
-
urlServer
protected static URL urlServer
-
serverPort
protected static String serverPort
-
-
Method Detail
-
initializeCacheSize
protected static void initializeCacheSize()
-
initialize_idrepo
protected static void initialize_idrepo()
Initializes this class with system properties. Called only by getSSOToken() method. Hence all other methods must call either getSSOToken() or initialize() directly.
-
isClientOnSameServer
protected boolean isClientOnSameServer(String clientURL)
-
assignService_idrepo
public void assignService_idrepo(String token, String type, String name, String serviceName, String stype, Map attrMap, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
assignService_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
create_idrepo
public String create_idrepo(String token, String type, String name, Map attrMap, String amOrgName) throws RemoteException, IdRepoException, SSOException
- Specified by:
create_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
delete_idrepo
public void delete_idrepo(String token, String type, String name, String orgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
delete_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getAssignedServices_idrepo
public Set getAssignedServices_idrepo(String token, String type, String name, Map mapOfServiceNamesAndOCs, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
getAssignedServices_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getAttributes1_idrepo
public Map getAttributes1_idrepo(String token, String type, String name, Set attrNames, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
getAttributes1_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getAttributes2_idrepo
public Map getAttributes2_idrepo(String token, String type, String name, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
getAttributes2_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getBinaryAttributes_idrepo
public Map<String,Set<String>> getBinaryAttributes_idrepo(String token, String type, String name, Set<String> attrNames, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
Description copied from interface:DirectoryManagerIFReturns attributes in binary format for a given identity using the IdRepo API.- Specified by:
getBinaryAttributes_idrepoin interfaceDirectoryManagerIF- Parameters:
token- Token identifying the requester.type- The identity type we need to query the attributes for.name- The name of the identity.attrNames- The attribute names that needs to be queried.amOrgName- The realm identifier.amsdkDN- The AM SDK DN, may be null.- Returns:
- A map of attribute names and values, where the values are all in Base64 encoded format.
- Throws:
RemoteException- If there was a communication problem.IdRepoException- If there was a problem while retrieving the attributes from the identity repository.SSOException- If there was an error with the provided token.
-
getMembers_idrepo
public Set getMembers_idrepo(String token, String type, String name, String amOrgName, String membersType, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
getMembers_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getMemberships_idrepo
public Set getMemberships_idrepo(String token, String type, String name, String membershipType, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
getMemberships_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getServiceAttributes_idrepo
public Map getServiceAttributes_idrepo(String token, String type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
getServiceAttributes_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getBinaryServiceAttributes_idrepo
public Map getBinaryServiceAttributes_idrepo(String token, String type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
getBinaryServiceAttributes_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getServiceAttributesAscending_idrepo
public Map getServiceAttributesAscending_idrepo(String token, String type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
Description copied from interface:DirectoryManagerIFNon-javadoc, non-public methods Get the service attributes of the name identity. Traverse to the global configuration if necessary until all attributes are found or reached the global area whichever occurs first.- Specified by:
getServiceAttributesAscending_idrepoin interfaceDirectoryManagerIF- Parameters:
token- is the sso token of the person performing this operation.type- is the identity type of the name parameter.name- is the identity we are interested in.serviceName- is the service we are interested inattrNames- are the name of the attributes wer are interested in.amOrgName- is the orgname.amsdkDN- is the amsdkDN.- Throws:
RemoteException- if there are problem connecting with remote site.IdRepoException- if there are repository related error conditions.SSOException- if user's single sign on token is invalid.
-
getSupportedOperations_idrepo
public Set getSupportedOperations_idrepo(String token, String type, String amOrgName) throws RemoteException, IdRepoException, SSOException
- Specified by:
getSupportedOperations_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getSupportedTypes_idrepo
public Set getSupportedTypes_idrepo(String token, String amOrgName) throws RemoteException, IdRepoException, SSOException
- Specified by:
getSupportedTypes_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
getFullyQualifiedNames_idrepo
public Set getFullyQualifiedNames_idrepo(String token, String type, String name, String amOrgName) throws RemoteException, IdRepoException, SSOException
- Specified by:
getFullyQualifiedNames_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
isExists_idrepo
public boolean isExists_idrepo(String token, String type, String name, String amOrgName) throws RemoteException, SSOException, IdRepoException
- Specified by:
isExists_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionSSOExceptionIdRepoException
-
isActive_idrepo
public boolean isActive_idrepo(String token, String type, String name, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
isActive_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
setActiveStatus_idrepo
public void setActiveStatus_idrepo(String token, String type, String name, String amOrgName, String amsdkDN, boolean active) throws RemoteException, IdRepoException, SSOException
- Specified by:
setActiveStatus_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
modifyMemberShip_idrepo
public void modifyMemberShip_idrepo(String token, String type, String name, Set members, String membersType, int operation, String amOrgName) throws RemoteException, IdRepoException, SSOException
- Specified by:
modifyMemberShip_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
modifyService_idrepo
public void modifyService_idrepo(String token, String type, String name, String serviceName, String stype, Map attrMap, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
modifyService_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
removeAttributes_idrepo
public void removeAttributes_idrepo(String token, String type, String name, Set attrNames, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
removeAttributes_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
search1_idrepo
public Map search1_idrepo(String token, String type, String pattern, Map avPairs, boolean recursive, int maxResults, int maxTime, Set returnAttrs, String amOrgName) throws RemoteException, IdRepoException, SSOException
- Specified by:
search1_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
search2_idrepo
public Map search2_idrepo(String token, String type, String pattern, int maxTime, int maxResults, Set returnAttrs, boolean returnAllAttrs, int filterOp, Map avPairs, boolean recursive, String amOrgName) throws RemoteException, IdRepoException, SSOException
- Specified by:
search2_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
setAttributes_idrepo
public void setAttributes_idrepo(String token, String type, String name, Map attributes, boolean isAdd, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
setAttributes_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
setAttributes2_idrepo
public void setAttributes2_idrepo(String token, String type, String name, Map attributes, boolean isAdd, String amOrgName, String amsdkDN, boolean isString) throws RemoteException, IdRepoException, SSOException
- Specified by:
setAttributes2_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
changePassword_idrepo
public void changePassword_idrepo(String token, String type, String name, String oldPassword, String newPassword, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
changePassword_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
unassignService_idrepo
public void unassignService_idrepo(String token, String type, String name, String serviceName, Map attrMap, String amOrgName, String amsdkDN) throws RemoteException, IdRepoException, SSOException
- Specified by:
unassignService_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
deRegisterNotificationURL_idrepo
public void deRegisterNotificationURL_idrepo(String notificationID) throws RemoteException
- Specified by:
deRegisterNotificationURL_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteException
-
objectsChanged_idrepo
public Set<String> objectsChanged_idrepo(int time) throws RemoteException
Returns the notification event XMLs for changed objects in the past N+2 minutes.- Specified by:
objectsChanged_idrepoin 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.
-
collectChangesFromCache
protected Set<String> collectChangesFromCache(int time, ConcurrentSkipListMap<Long,Set<String>> cache)
Collects the notification XMLs for a given time period from the provided cache.- Parameters:
time- The number of minutes we should retrieve the changed objects for.cache- The cache we need to collect the notifications from.- Returns:
- Returns the notification XMLs for the current minute, for the requested N minute, and also for 2 additional minutes.
-
registerNotificationURL_idrepo
public String registerNotificationURL_idrepo(String url) throws RemoteException
- Specified by:
registerNotificationURL_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteException
-
registerNotificationURL
protected String registerNotificationURL(String url, Map<String,URL> notificationURLs)
-
getSpecialIdentities_idrepo
public Map getSpecialIdentities_idrepo(String token, String type, String amOrgName) throws RemoteException, IdRepoException, SSOException
- Specified by:
getSpecialIdentities_idrepoin interfaceDirectoryManagerIF- Throws:
RemoteExceptionIdRepoExceptionSSOException
-
processEntryChanged_idrepo
protected static void processEntryChanged_idrepo(String method, String name, int type, Set attrNames)
-
getCachedValues
protected static Set<String> getCachedValues(ConcurrentSkipListMap<Long,Set<String>> cache)
Returns the cached notification XMLs for the current cacheIndex. If there is nothing cached for this minute, this will create a new cache entry and return the corresponding Set.- Parameters:
cache- The cache that stores the notification XMLs per minute.- Returns:
- A Set that corresponds to the current cacheIndex.
-
getCacheIndex
protected static long getCacheIndex()
-
getSSOToken
protected SSOToken getSSOToken(String token) throws SSOException
Check if agent token ID is appended to the token string. if yes, we use it as a restriction context. This is meant for cookie hijacking feature where agent appends the agent token ID to the user sso token before sending it over to the server for validation.- Throws:
SSOException
-
-