Package com.sun.identity.idm.remote
Class IdRemoteCachedServicesImpl
- java.lang.Object
-
- com.sun.identity.idm.remote.IdRemoteServicesImpl
-
- com.sun.identity.idm.remote.IdRemoteCachedServicesImpl
-
- All Implemented Interfaces:
IdCachedServices,IdServices
public class IdRemoteCachedServicesImpl extends IdRemoteServicesImpl implements IdCachedServices
Class which provides caching on top of available IdRepoLDAPServices.
-
-
Field Summary
-
Fields inherited from class com.sun.identity.idm.remote.IdRemoteServicesImpl
AMSR_ATTRS, AMSR_CODE, AMSR_RESULTS, DEBUG, SDK_SERVICE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCache()This method is used to clear the entire SDK cache in the event that EventService notifies that all entries have been modified (or should be marked dirty).voiddelete(SSOToken token, IdType type, String name, String orgName, String amsdkDN)voiddirtyCache(String dn, int eventType, boolean cosType, boolean aciChange, Set attrNames)This method will be called byAMIdRepoListener.MapgetAttributes(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN)MapgetAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN, boolean isStringValues)SetgetFullyQualifiedNames(SSOToken token, IdType type, String name, String orgName)protected static IdServicesgetInstance()intgetSize()Method to get the current cache sizebooleanisExists(SSOToken token, IdType type, String name, String amOrgName)voidremoveAttributes(SSOToken token, IdType type, String name, Set attrNames, String orgName, String amsdkDN)IdSearchResultssearch(SSOToken token, IdType type, IdSearchControl ctrl, String orgName, CrestQuery crestQuery)By passing in a CrestQuery object, we now support searching by id (via _queryId) or by filter (_queryFilter).voidsetActiveStatus(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN, boolean active)voidsetAttributes(SSOToken token, IdType type, String name, Map attributes, boolean isAdd, String amOrgName, String amsdkDN, boolean isString)StringtoString()-
Methods inherited from class com.sun.identity.idm.remote.IdRemoteServicesImpl
assignService, authenticate, authenticate, changePassword, clearIdRepoPlugins, clearIdRepoPlugins, create, getAssignedServices, getBinaryServiceAttributes, getMembers, getMemberships, getServiceAttributes, getServiceAttributesAscending, getSpecialIdentities, getSupportedOperations, getSupportedTypes, isActive, modifyMemberShip, modifyService, processException, reinitialize, reloadIdRepoServiceSchema, unassignService
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.identity.idm.IdServices
assignService, authenticate, authenticate, changePassword, clearIdRepoPlugins, clearIdRepoPlugins, create, getAssignedServices, getBinaryServiceAttributes, getMembers, getMemberships, getServiceAttributes, getServiceAttributesAscending, getSpecialIdentities, getSupportedOperations, getSupportedTypes, isActive, modifyMemberShip, modifyService, reinitialize, reloadIdRepoServiceSchema, unassignService
-
-
-
-
Method Detail
-
getSize
public int getSize()
Method to get the current cache size- Specified by:
getSizein interfaceIdCachedServices- Returns:
- the size of the SDK LRU cache
-
getInstance
protected static IdServices getInstance()
-
clearCache
public void clearCache()
This method is used to clear the entire SDK cache in the event that EventService notifies that all entries have been modified (or should be marked dirty).- Specified by:
clearCachein interfaceIdCachedServices
-
dirtyCache
public void dirtyCache(String dn, int eventType, boolean cosType, boolean aciChange, Set attrNames)
This method will be called byAMIdRepoListener. This method will update the cache by removing all the entires which are affected as a result of an event notification caused because of changes/deletions/renaming of entries with and without aci's.NOTE: The event could have been caused either by changes to an aci entry or a costemplate or a cosdefinition or changes to a normal entry
- Specified by:
dirtyCachein interfaceIdCachedServices- Parameters:
dn- name of entity being modifiedeventType- type of modificationcosType- true if it is cos related. false otherwiseaciChange- true if it is aci related. false otherwiseattrNames- Set of attribute Names which should be removed from the CacheEntry in the case of COS change
-
isExists
public boolean isExists(SSOToken token, IdType type, String name, String amOrgName) throws SSOException, IdRepoException
- Specified by:
isExistsin interfaceIdServices- Overrides:
isExistsin classIdRemoteServicesImpl- Throws:
SSOExceptionIdRepoException
-
getAttributes
public Map getAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN, boolean isStringValues) throws IdRepoException, SSOException
- Specified by:
getAttributesin interfaceIdServices- Overrides:
getAttributesin classIdRemoteServicesImpl- Throws:
IdRepoExceptionSSOException
-
getAttributes
public Map getAttributes(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getAttributesin interfaceIdServices- Overrides:
getAttributesin classIdRemoteServicesImpl- Throws:
IdRepoExceptionSSOException
-
setActiveStatus
public void setActiveStatus(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN, boolean active) throws SSOException, IdRepoException
- Specified by:
setActiveStatusin interfaceIdServices- Overrides:
setActiveStatusin classIdRemoteServicesImpl- Throws:
SSOExceptionIdRepoException
-
setAttributes
public void setAttributes(SSOToken token, IdType type, String name, Map attributes, boolean isAdd, String amOrgName, String amsdkDN, boolean isString) throws IdRepoException, SSOException
- Specified by:
setAttributesin interfaceIdServices- Overrides:
setAttributesin classIdRemoteServicesImpl- Throws:
IdRepoExceptionSSOException
-
delete
public void delete(SSOToken token, IdType type, String name, String orgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
deletein interfaceIdServices- Overrides:
deletein classIdRemoteServicesImpl- Throws:
IdRepoExceptionSSOException
-
removeAttributes
public void removeAttributes(SSOToken token, IdType type, String name, Set attrNames, String orgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
removeAttributesin interfaceIdServices- Overrides:
removeAttributesin classIdRemoteServicesImpl- Throws:
IdRepoExceptionSSOException
-
search
public IdSearchResults search(SSOToken token, IdType type, IdSearchControl ctrl, String orgName, CrestQuery crestQuery) throws IdRepoException, SSOException
Description copied from interface:IdServicesBy passing in a CrestQuery object, we now support searching by id (via _queryId) or by filter (_queryFilter).- Specified by:
searchin interfaceIdServices- Overrides:
searchin classIdRemoteServicesImpl- Parameters:
token- is the sso token of the person performing this operation.type- is the identity type of the name parameter.ctrl- the search controlorgName- is the orgname.crestQuery- encapsulates _queryId or _queryFilter from the CREST endpoint.- Throws:
IdRepoException- if there are repository related error conditions.SSOException- if user's single sign on token is invalid.
-
getFullyQualifiedNames
public Set getFullyQualifiedNames(SSOToken token, IdType type, String name, String orgName) throws IdRepoException, SSOException
- Specified by:
getFullyQualifiedNamesin interfaceIdServices- Overrides:
getFullyQualifiedNamesin classIdRemoteServicesImpl- Throws:
IdRepoExceptionSSOException
-
-