Class 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 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 ID
        principalId - 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 an AttivioPrincipalKey from the String returned from getGuid().
        Parameters:
        principalGuid - - format of "realm-id:principal-id"
        Returns:
        the AttivioPrincipalKey
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public AttivioPrincipalKey clone()
                                  throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException