Package org.forgerock.am.identity.domain
Class UniversalId
java.lang.Object
org.forgerock.am.identity.domain.UniversalId
- Direct Known Subclasses:
AMIdentity
Represents a reference to an identity that is managed by AM.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUniversalId(UniversalId other) Construct a new instance based on an existing universal id -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()Returns the name of the identity.Returns the realm for this identity.getType()Returns the type of the identity.Returns the universal identifier for this identity.inthashCode()static booleanCheck if dn is a universalId or a special user dn.static UniversalIdCreates a newUniversalIdinstance based of the passed token.static UniversalIdCreates a newUniversalIdinstance based of the passed individual parts that represent a unique identity.static UniversalIdCreates a newUniversalIdinstance based of the passed individual parts that represent a unique identity.static UniversalIdCreates a newUniversalIdinstance based of the passed universal ID.final StringtoString()
-
Constructor Details
-
UniversalId
Construct a new instance based on an existing universal id- Parameters:
other- The universal id to use as a base
-
-
Method Details
-
getName
Returns the name of the identity.- Returns:
- name of the identity
-
toString
-
getType
Returns the type of the identity.- Returns:
IdTyperepresenting the type of this object
-
getRealmDn
Returns the realm for this identity.- Returns:
- string representing realm name
-
getUniversalId
Returns the universal identifier for this identity.- Returns:
- string representing the universal identifier of this identity
-
equals
-
hashCode
public int hashCode() -
of
Creates a newUniversalIdinstance based of the passed token.- Parameters:
token- non-null token from which to create an identity instance- Returns:
- a
UniversalIdinstance - Throws:
SSOException- should an error occur handling the tokenIdRepoException- if the passed universal ID is not a valid universal ID or special user DN
-
of
Creates a newUniversalIdinstance based of the passed universal ID.- Parameters:
universalId- the universal ID of the identity- Returns:
- a
UniversalIdinstance - Throws:
IdRepoException- if the passed universal ID is not a valid universal ID or special user DN
-
of
Creates a newUniversalIdinstance based of the passed individual parts that represent a unique identity.- Parameters:
name- the identity nametype- the identity typerealm- the realm in which the identity resides- Returns:
- a
UniversalIdinstance - Throws:
IllegalArgumentException- if it is not possible to parse the passed realmIdRepoException- if the passed universal ID is not a valid universal ID or special user DN
-
of
Creates a newUniversalIdinstance based of the passed individual parts that represent a unique identity.- Parameters:
name- the identity nametype- the identity typerealmDn- the realm in which the identity resides- Returns:
- an
UniversalIdinstance - Throws:
IllegalArgumentException- if it is not possible to parse the passed realmIdRepoException- if the passed universal ID is not a valid universal ID or special user DN
-
isUniversalIdOrSpecialUserDn
Check if dn is a universalId or a special user dn.- Parameters:
dn- the dn that needs to be checked.- Returns:
- returns if the provided dn is a universal id or special user dn.
- Throws:
IdRepoException
-