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.Cloneable
Represents a key that uniquely identifies a given principal (user or group).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AttivioPrincipalKey()
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 AttivioPrincipalKey
clone()
boolean
equals(java.lang.Object obj)
java.lang.String
getGuid()
java.lang.String
getPrincipalId()
java.lang.String
getRealmId()
int
hashCode()
void
setPrincipalId(java.lang.String principalId)
Sets the principal ID.void
setRealmId(java.lang.String realmId)
Sets the security realm ID.java.lang.String
toString()
static AttivioPrincipalKey
valueOf(java.lang.String principalGuid)
Create anAttivioPrincipalKey
from 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 anAttivioPrincipalKey
from the String returned fromgetGuid()
.- Parameters:
principalGuid
- - format of "realm-id:principal-id"- Returns:
- the AttivioPrincipalKey
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
clone
public AttivioPrincipalKey clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
-