Package com.attivio.sdk.security
Class AttivioPrincipalKey
- java.lang.Object
-
- com.attivio.sdk.security.AttivioPrincipalKey
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class AttivioPrincipalKey extends java.lang.Object implements java.io.Serializable, java.lang.CloneableRepresents a key that uniquely identifies a given principal (user or group).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttivioPrincipalKey()The default constructor.AttivioPrincipalKey(java.lang.String realmId, java.lang.String principalId)Constructs a principal key.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AttivioPrincipalKeyclone()booleanequals(java.lang.Object obj)java.lang.StringgetGuid()java.lang.StringgetPrincipalId()java.lang.StringgetRealmId()inthashCode()voidsetPrincipalId(java.lang.String principalId)Sets the principal ID.voidsetRealmId(java.lang.String realmId)Sets the security realm ID.java.lang.StringtoString()static AttivioPrincipalKeyvalueOf(java.lang.String principalGuid)Create anAttivioPrincipalKeyfrom the String returned fromgetGuid().
-
-
-
Constructor Detail
-
AttivioPrincipalKey
protected AttivioPrincipalKey()
The default constructor.
-
AttivioPrincipalKey
public AttivioPrincipalKey(java.lang.String realmId, java.lang.String principalId)Constructs a principal key.- Parameters:
realmId- the security realm IDprincipalId- the principal ID
-
-
Method Detail
-
getRealmId
public java.lang.String getRealmId()
- Returns:
- the security realm ID
-
setRealmId
public void setRealmId(java.lang.String realmId)
Sets the security realm ID.- Parameters:
realmId- the security realm ID; may not be null or empty
-
getPrincipalId
public java.lang.String getPrincipalId()
- Returns:
- the principal ID
-
setPrincipalId
public void setPrincipalId(java.lang.String principalId)
Sets the principal ID.- Parameters:
principalId- the principal ID; may not be null or empty
-
getGuid
public java.lang.String getGuid()
- Returns:
- a globally unique principal ID based on the realm ID and the principal ID.
-
valueOf
public static AttivioPrincipalKey valueOf(java.lang.String principalGuid)
Create anAttivioPrincipalKeyfrom the String returned fromgetGuid().- Parameters:
principalGuid- - format of "realm-id:principal-id"- Returns:
- the AttivioPrincipalKey
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
clone
public AttivioPrincipalKey clone() throws java.lang.CloneNotSupportedException
- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
-