Package com.sun.identity.idm
Class AMIdentityRepository
java.lang.Object
com.sun.identity.idm.AMIdentityRepository
- All Implemented Interfaces:
IdentityStore
The class
AMIdentityRepository represents an object to access
the repositories in which user/role/group and other identity data is
configured. This class provides access to methods which will search, create
and delete identities. An instance of this class can be obtained in the
following manner:
AMIdentityRepository idRepo = new AMIdentityRepository(ssoToken, realmName);
-
Constructor Summary
ConstructorsConstructorDescriptionAMIdentityRepository(SSOToken ssoToken, String realmName) Deprecated.AMIdentityRepository(String realmName, SSOToken ssoToken) Instantiates a newAMIdentityRepository. -
Method Summary
Modifier and TypeMethodDescriptionintaddEventListener(IdEventListener listener) Add anIdEventListenerto the pool of listeners.static voidClear caches related to Identity repositories.createIdentities(IdType type, Map<String, Map<?, ?>> identityNamesAndAttrs) Create a set ofAMIdentitys.createIdentity(IdType type, String idName, Map attrMap) Create anAMIdentityobject.voiddeleteIdentities(IdType type, Set identities) Delete a set of identities byIdType.voiddeleteIdentities(Set<AMIdentity> identities) Delete a set ofAMIdentitys.getAllowedIdOperations(IdType type) Get allowed identity operations.Get the realmAMIdentityobject.Get supported identity types.voidremoveEventListener(int identifier) Remove anIdEventListenerfrom the pool of listeners.searchIdentities(IdType type, String pattern, IdSearchControl ctrl) Search for identities of certain types from each plugin and returns a combined result.
-
Constructor Details
-
AMIdentityRepository
@Supported @Deprecated public AMIdentityRepository(SSOToken ssoToken, String realmName) throws IdRepoException, SSOException Deprecated.Use the other constructorAMIdentityRepository(String, SSOToken)Instantiates a newAMIdentityRepository.- Parameters:
ssoToken- the sso tokenrealmName- the realm name- Throws:
IdRepoExceptionSSOException
-
AMIdentityRepository
Instantiates a newAMIdentityRepository.- Parameters:
realmName- the realm namessoToken- the sso token
-
-
Method Details
-
clearCache
Clear caches related to Identity repositories. -
getSupportedIdTypes
Get supported identity types.- Specified by:
getSupportedIdTypesin interfaceIdentityStore- Returns:
- the supported identity types
- Throws:
IdRepoException- if there are repository related error conditionsSSOException- if there is an SSO token related error
-
getAllowedIdOperations
Get allowed identity operations.- Specified by:
getAllowedIdOperationsin interfaceIdentityStore- Parameters:
type- type of identity being searched for- Returns:
- the allowed identity operations
- Throws:
IdRepoException- if there are repository related error conditionsSSOException- if there is an SSO token related error
-
searchIdentities
@Supported public IdSearchResults searchIdentities(IdType type, String pattern, IdSearchControl ctrl) throws IdRepoException, SSOException Search for identities of certain types from each plugin and returns a combined result. Note: The AMIdentity objects representing IdType.REALM can be used for services related operations only. The realmAMIdentityobject can be used to assign and unassign services containing dynamic attributes to this realm.- Specified by:
searchIdentitiesin interfaceIdentityStore- Parameters:
type- type of identity being searched forpattern- the query identity patternctrl- IdSearchControl which can be used to set up various search controls on the search to be performed- Returns:
- Returns the combined results in an object IdSearchResults
- Throws:
IdRepoException- if there are repository related error conditionsSSOException- if user's single sign on token is invalid- See Also:
-
getRealmIdentity
Get the realmAMIdentityobject.- Specified by:
getRealmIdentityin interfaceIdentityStore- Returns:
- the realm identity
- Throws:
IdRepoException- if there are repository related error conditionsSSOException- if there is an SSO token related error
-
createIdentity
@Supported public AMIdentity createIdentity(IdType type, String idName, Map attrMap) throws IdRepoException, SSOException Create anAMIdentityobject.- Specified by:
createIdentityin interfaceIdentityStore- Parameters:
type- type of identity being searched foridName- the id nameattrMap- the attr map- Returns:
- the am identity
- Throws:
IdRepoException- if there are repository related error conditionsSSOException- if there is an SSO token related error
-
createIdentities
@Supported public Set<AMIdentity> createIdentities(IdType type, Map<String, Map<?, throws IdRepoException, SSOException?>> identityNamesAndAttrs) Create a set ofAMIdentitys.- Parameters:
type- type of identity being searched foridentityNamesAndAttrs- the identity names and attrs- Returns:
- the
AMIdentityset - Throws:
IdRepoException- if there are repository related error conditionsSSOException- if there is an SSO token related error
-
deleteIdentities
@Supported public void deleteIdentities(IdType type, Set identities) throws IdRepoException, SSOException Delete a set of identities byIdType.- Parameters:
type- type of identity being searched foridentities- the identities- Throws:
IdRepoException- if there are repository related error conditionsSSOException- if there is an SSO token related error
-
deleteIdentities
@Supported public void deleteIdentities(Set<AMIdentity> identities) throws IdRepoException, SSOException Delete a set ofAMIdentitys.- Parameters:
identities- the identities- Throws:
IdRepoException- if there are repository related error conditionsSSOException- if there is an SSO token related error
-
addEventListener
Add anIdEventListenerto the pool of listeners.- Specified by:
addEventListenerin interfaceIdentityStore- Parameters:
listener- the identity event listener to add- Returns:
- the total amount of
IdEventListeners available
-
removeEventListener
Remove anIdEventListenerfrom the pool of listeners.- Specified by:
removeEventListenerin interfaceIdentityStore- Parameters:
identifier- the identifier for theIdEventListenerto be removed
-
AMIdentityRepository(String, SSOToken)