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
ModifierConstructorDescriptionprotected
UniversalId
(UniversalId other) Construct a new instance based on an existing universal id -
Method Summary
Modifier and TypeMethodDescriptionboolean
getName()
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.int
hashCode()
static boolean
Check if dn is a universalId or a special user dn.static UniversalId
Creates a newUniversalId
instance based of the passed token.static UniversalId
Creates a newUniversalId
instance based of the passed individual parts that represent a unique identity.static UniversalId
Creates a newUniversalId
instance based of the passed individual parts that represent a unique identity.static UniversalId
Creates a newUniversalId
instance based of the passed universal ID.final String
toString()
-
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:
IdType
representing 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 newUniversalId
instance based of the passed token.- Parameters:
token
- non-null token from which to create an identity instance- Returns:
- a
UniversalId
instance - 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 newUniversalId
instance based of the passed universal ID.- Parameters:
universalId
- the universal ID of the identity- Returns:
- a
UniversalId
instance - Throws:
IdRepoException
- if the passed universal ID is not a valid universal ID or special user DN
-
of
Creates a newUniversalId
instance 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
UniversalId
instance - 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 newUniversalId
instance 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
UniversalId
instance - 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
-