|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.identity.idm.AMIdentity
This class represents an Identity which needs to be managed by
Access Manager. This identity could exist in multiple repositories,
which are configured for a given realm or organization. When any operation
is performed from this class, it executes all plugins that are configured
for performing that operation. For eg: getAttributes.
The application gets access to constructing
AMIdentity
objects by using AMIdentityRepository
interfaces. For example:
AMIdentityRepository idrepo = new AMIdentityRepository(token, org); AMIdentity id = idrepo.getIdentity();The
id
returned above is the AMIdentity object of the user's
single sign-on token passed above.
The results obtained from search performed using AMIdentityRepository
also return AMIdentity objects. The type of an object can be determined by
doing the following:
IdType type = identity.getType();The name of an object can be determined by:
String name = identity.getName();
Constructor Summary | |
AMIdentity(SSOToken token)
Constructor for the AMIdentity object. |
|
AMIdentity(SSOToken token,
java.lang.String universalId)
Constructor for the AMIdentity object. |
Method Summary | |
void |
assignService(java.lang.String serviceName,
java.util.Map attributes)
Assigns the service and service related attributes to the identity. |
boolean |
equals(java.lang.Object o)
Overrides the default "equal" method to compare the universal identifier |
java.util.Set |
getAssignableServices()
Returns all services which can be assigned to this entity. |
java.util.Set |
getAssignedServices()
Returns the set of services already assigned to this identity. |
java.util.Set |
getAttribute(java.lang.String attrName)
Returns the values of the requested attribute. |
java.util.Map |
getAttributes()
Returns all attributes and values of this identity. |
java.util.Map |
getAttributes(java.util.Set attrNames)
Returns requested attributes and values of this object. |
java.util.Map |
getBinaryAttributes(java.util.Set attrNames)
Returns requested attributes and values of this object. |
java.util.Set |
getMembers(IdType mtype)
Return all members of a given identity type of this identity as a Set of AMIdentity objects. |
java.util.Set |
getMemberships(IdType mtype)
Returns the set of identities that this identity belongs to. |
java.lang.String |
getName()
Returns the name of the identity. |
java.lang.String |
getRealm()
Returns the realm for this identity. |
java.util.Map |
getServiceAttributes(java.lang.String serviceName)
Returns attributes related to a service, if the service is assigned to the identity. |
java.util.Map |
getServiceAttributesAscending(java.lang.String serviceName)
Returns attributes related to a service, if the service is assigned to the identity. |
IdType |
getType()
Returns the Type of the Identity. |
java.lang.String |
getUniversalId()
Returns the universal identifier of this object. |
boolean |
isActive()
If there is a status attribute configured, then verifies if the identity is active and returns true. |
boolean |
isExists()
This method determines if the identity exists and returns true or false. |
boolean |
isMember(AMIdentity identity)
Verifies if this identity is a member of the identity being passed. |
void |
modifyService(java.lang.String serviceName,
java.util.Map attrMap)
Set attributes related to a specific service. |
void |
removeAttributes(java.util.Set attrNames)
Removes the attributes from the identity entry. |
void |
removeServiceAttributes(java.lang.String serviceName,
java.util.Set attrNames)
Removes attributes value related to a specific service by setting it to empty. |
void |
setActiveStatus(boolean active)
If there is a status attribute configured, then set its status to true or activated state if the parameter active is true. |
void |
setAttributes(java.util.Map attrMap)
Set the values of attributes. |
void |
setBinaryAttributes(java.util.Map attrMap)
Set the values of binary attributes. |
void |
store()
Stores the attributes of the object. |
void |
unassignService(java.lang.String serviceName)
Removes a service from the identity. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AMIdentity(SSOToken token) throws SSOException, IdRepoException
AMIdentity
object.
token
- Single sign on token of the user
SSOException
- if user's single sign on token is invalid.
IdRepoException
- if user's single sign has invalid universal idpublic AMIdentity(SSOToken token, java.lang.String universalId) throws IdRepoException
AMIdentity
object.
token
- Single sign on token to construct the identity
object. Access permission to Identity object
would be based on this useruniversalId
-
IdRepoException
- if user's single sign has invalid universal idMethod Detail |
public java.lang.String getName()
public IdType getType()
public java.lang.String getRealm()
public boolean isActive() throws IdRepoException, SSOException
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public void setActiveStatus(boolean active) throws IdRepoException, SSOException
active
- The state value to assign to status attribute. The actual
value assigned to the status attribute will depend on what is configured
for that particular plugin. If active is true, the status will be
assigned the value corresponding to activated.
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public java.util.Map getAttributes() throws IdRepoException, SSOException
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public java.util.Map getAttributes(java.util.Set attrNames) throws IdRepoException, SSOException
attrNames
- Set of attribute names to be read
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public java.util.Map getBinaryAttributes(java.util.Set attrNames) throws IdRepoException, SSOException
attrNames
- Set of attribute names to be read
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public java.util.Set getAttribute(java.lang.String attrName) throws IdRepoException, SSOException
attrName
- Name of attribute
IdRepoException
- if there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public void setAttributes(java.util.Map attrMap) throws IdRepoException, SSOException
attrMap
- Map of attribute-values to be set in the repository or
repositories (if multiple plugins are configured for "edit").
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public void setBinaryAttributes(java.util.Map attrMap) throws IdRepoException, SSOException
attrMap
- Map of attribute-values to be set in the repository or
repositories (if multiple plugins are configured for "edit").
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public void removeAttributes(java.util.Set attrNames) throws IdRepoException, SSOException
attrNames
- Set of attribute names to be removed
IdRepoException
- If there are repository related error conditions.
SSOException
- If the user's single sign on token is invalidpublic void store() throws IdRepoException, SSOException
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public java.util.Set getAssignedServices() throws IdRepoException, SSOException
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public java.util.Set getAssignableServices() throws IdRepoException, SSOException
IdRepoException
- if there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public void assignService(java.lang.String serviceName, java.util.Map attributes) throws IdRepoException, SSOException
serviceName
- Name of service to be assigned.attributes
- Map of attribute-values
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public void unassignService(java.lang.String serviceName) throws IdRepoException, SSOException
serviceName
- Name of service to be removed.
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public java.util.Map getServiceAttributes(java.lang.String serviceName) throws IdRepoException, SSOException
serviceName
- Name of the service.
IdRepoException
- if there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public java.util.Map getServiceAttributesAscending(java.lang.String serviceName) throws IdRepoException, SSOException
serviceName
- Name of the service.
IdRepoException
- if there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public void modifyService(java.lang.String serviceName, java.util.Map attrMap) throws IdRepoException, SSOException
serviceName
- Name of the service.attrMap
- Map of attribute-values.
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public void removeServiceAttributes(java.lang.String serviceName, java.util.Set attrNames) throws IdRepoException, SSOException
serviceName
- Name of the service.attrNames
- Set of attributes name.
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public boolean isMember(AMIdentity identity) throws IdRepoException, SSOException
identity
- AMIdentity
to check membership with
IdRepoException
- if there are repository related error conditions.
SSOException
- if user's single sign on token is invalid.public java.util.Set getMembers(IdType mtype) throws IdRepoException, SSOException
mtype
- Type of identity objects
IdRepoException
- if there are repository related error conditions.
SSOException
- if user's single sign on token is invalid.public java.util.Set getMemberships(IdType mtype) throws IdRepoException, SSOException
IdRepoException
- if there are repository related error conditions.
SSOException
- if user's single sign on token is invalid.public boolean isExists() throws IdRepoException, SSOException
IdRepoException
- If there are repository related error conditions.
SSOException
- If user's single sign on token is invalid.public boolean equals(java.lang.Object o)
public java.lang.String getUniversalId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |