public class AMIdentity extends Object
AMIdentity
objects by using
AMIdentityRepository
interfaces. For example:
AMIdentityRepository idrepo = new AMIdentityRepository(token, org); AMIdentity id = idrepo.getRealmIdentity();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();
Modifier and Type | Field and Description |
---|---|
static String |
COS_PRIORITY |
protected String |
univDN |
Constructor and Description |
---|
AMIdentity(org.forgerock.opendj.ldap.DN universalId,
SSOToken ssotoken) |
AMIdentity(org.forgerock.opendj.ldap.DN amsdkdn,
SSOToken token,
String name,
IdType type,
String orgName) |
AMIdentity(SSOToken ssotoken)
Constructor for the
AMIdentity object. |
AMIdentity(SSOToken ssotoken,
String universalId)
Constructor for the
AMIdentity object. |
AMIdentity(SSOToken token,
String name,
IdType type,
String orgName,
String amsdkdn)
Constructor for the
AMIdentity object. |
Modifier and Type | Method and Description |
---|---|
void |
addMember(AMIdentity identity)
If membership is supported then add the new identity as a member.
|
void |
assignService(String serviceName,
Map attributes)
Assigns the service and service related attributes to the identity.
|
void |
changePassword(String oldPassword,
String newPassword)
Changes password for the identity.
|
boolean |
equals(Object o)
Returns
true if the given object is equal to this object. |
Set<String> |
getAssignableServices()
Returns all services which can be assigned to this entity.
|
Set<String> |
getAssignedServices()
Returns the set of services already assigned to this identity.
|
Set |
getAttribute(String attrName)
Returns the values of the requested attribute.
|
Map |
getAttributes()
Returns all attributes and values of this identity.
|
Map |
getAttributes(Set attrNames)
Returns requested attributes and values of this object.
|
Map |
getBinaryAttributes(Set attrNames)
Returns requested attributes and values of this object.
|
Map |
getBinaryServiceAttributes(String serviceName)
Returns attributes related to a service, if the service is assigned
to the identity.
|
String |
getDN()
Returns universal distinguished name of this object.
|
protected Set |
getFullyQualifiedNames() |
Set |
getMembers(IdType mtype)
Return all members of a given identity type of this identity as a Set of
AMIdentity objects.
|
Set |
getMemberships(IdType mtype)
Returns the set of identities that this identity belongs to.
|
String |
getName()
Returns the name of the identity.
|
String |
getRealm()
Returns the realm for this identity.
|
Map<String,Set<String>> |
getServiceAttributes(String serviceName)
Returns attributes related to a service, if the service is assigned to
the identity.
|
Map |
getServiceAttributesAscending(String serviceName)
Returns attributes related to a service, if the service is assigned
to the identity.
|
IdType |
getType()
Returns the Type of the Identity.
|
String |
getUniversalId()
Returns the universal identifier of this object.
|
int |
hashCode()
Non-javadoc, non-public methods
|
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(String serviceName,
Map attrMap)
Set attributes related to a specific service.
|
void |
removeAttributes(Set attrNames)
Removes the attributes from the identity entry.
|
void |
removeMember(AMIdentity identity)
Removes the identity from this identity's membership.
|
void |
removeMembers(Set identityObjects)
Removes the identities from this identity's membership.
|
void |
removeServiceAttributes(String serviceName,
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(Map attrMap)
Sets the values of attributes.
|
void |
setBinaryAttributes(Map attrMap)
Set the values of binary attributes.
|
void |
setDN(String dn)
Nonjavadoc, non-public methods
|
void |
store()
Stores the attributes of the object.
|
String |
toString()
Returns String representation of the
AMIdentity
object. |
void |
unassignService(String serviceName)
Removes a service from the identity.
|
public AMIdentity(SSOToken ssotoken) throws SSOException, IdRepoException
AMIdentity
object.ssotoken
- Single sign on token of the userSSOException
- if user's single sign on token is invalid.IdRepoException
- if the single sign on token does not have a
a valid universal identifierpublic AMIdentity(SSOToken ssotoken, String universalId) throws IdRepoException
AMIdentity
object.ssotoken
- Single sign on token to construct the identity
object. Access permission to Identity object
would be based on this useruniversalId
- Universal Identifier of the identity.IdRepoException
- if the universal identifier is invalidpublic AMIdentity(org.forgerock.opendj.ldap.DN universalId, SSOToken ssotoken) throws IdRepoException
IdRepoException
public AMIdentity(SSOToken token, String name, IdType type, String orgName, String amsdkdn)
AMIdentity
object.token
- Single sign on token to construct the identity
object. Access permission to Identity object
would be based on this username
- the name associated with this identity.type
- the IdType
of this identity.orgName
- the organizaton name this identity belongs to.amsdkdn
- the amsdk name assoicated with this identity if any.public String getName()
public IdType getType()
IdType
representing the type of this object.public 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 Map getAttributes() throws IdRepoException, SSOException
IdRepoException
- If there are repository related error conditions.SSOException
- If user's single sign on token is invalid.public Map getAttributes(Set attrNames) throws IdRepoException, SSOException
attrNames
- Set of attribute names to be readIdRepoException
- If there are repository related error conditions.SSOException
- If user's single sign on token is invalid.public Map getBinaryAttributes(Set attrNames) throws IdRepoException, SSOException
attrNames
- Set of attribute names to be readIdRepoException
- If there are repository related error conditions.SSOException
- If user's single sign on token is invalid.public Set getAttribute(String attrName) throws IdRepoException, SSOException
attrName
- Name of attributeIdRepoException
- if there are repository related error conditions.SSOException
- If user's single sign on token is invalid.public void setAttributes(Map attrMap) throws IdRepoException, SSOException
AMIdentity
objects of
type User and Agent.attrMap
- is a map of attribute name
(String)
to a Set
of attribute values (String)
.
It is arranged as:
Map::attrMap -->
Key: String::AttributeName
Value: Set::AttributeValues (Set of String)IdRepoException
- If there are repository related error conditions.SSOException
- If user's single sign on token is invalid.public void changePassword(String oldPassword, String newPassword) throws IdRepoException, SSOException
oldPassword
- old passwordnewPassword
- new passwordIdRepoException
- If there are repository related error conditions.SSOException
- If user's single sign on token is invalid.public void setBinaryAttributes(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(Set attrNames) throws IdRepoException, SSOException
attrNames
- Set of attribute names to be removedIdRepoException
- 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 Set<String> getAssignedServices() throws IdRepoException, SSOException
IdRepoException
- If there are repository related error conditions.SSOException
- If user's single sign on token is invalid.public Set<String> 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(String serviceName, Map attributes) throws IdRepoException, SSOException
serviceName
- Name of service to be assigned.attributes
- Map of attribute-valuesIdRepoException
- If there are repository related error conditions.SSOException
- If user's single sign on token is invalid.public void unassignService(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 Map<String,Set<String>> getServiceAttributes(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 Map getBinaryServiceAttributes(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.
iPlanet-PUBLIC-METHODpublic Map getServiceAttributesAscending(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(String serviceName, 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(String serviceName, 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 withIdRepoException
- if there are repository related error conditions.SSOException
- if user's single sign on token is invalid.public void addMember(AMIdentity identity) throws IdRepoException, SSOException
identity
- AMIdentity to be addedIdRepoException
- if there are repository related error conditions.SSOException
- if user's single sign on token is invalid. non-public methodspublic void removeMember(AMIdentity identity) throws IdRepoException, SSOException
identity
- AMIdentity to be removed from membership.IdRepoException
- if there are repository related error conditions.SSOException
- if user's single sign on token is invalid. non-public methodspublic void removeMembers(Set identityObjects) throws IdRepoException, SSOException
identityObjects
- Set of AMIdentity objectsIdRepoException
- if there are repository related error conditions.SSOException
- if user's single sign on token is invalid. non-public methodspublic Set getMembers(IdType mtype) throws IdRepoException, SSOException
mtype
- Type of identity objectsIdRepoException
- if there are repository related error conditions.SSOException
- if user's single sign on token is invalid.public Set getMemberships(IdType mtype) throws IdRepoException, SSOException
mtype
- Type of member identity.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(Object o)
true
if the given object is equal to this object.public void setDN(String dn)
public String getDN()
public String getUniversalId()
public String toString()
AMIdentity
object. It returns universal identifier, orgname, type, etc.protected Set getFullyQualifiedNames()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.