Class SpotfirePrincipal

java.lang.Object
com.spotfire.server.api.userdir.SpotfirePrincipal
All Implemented Interfaces:
Principal
Direct Known Subclasses:
GroupPrincipal, UserPrincipal

public abstract class SpotfirePrincipal extends Object implements Principal
Represents a principal, such as a user or a group. Every principal is characterized by a GUID and a name. GUID guid is unique for each principal, regardless of type of principal. The name is also unique, but only for principals of the same type in the same domain.

Also, when a principal is removed and a new principal is later added with the same name, the GUID will differ between the principals. Therefore the GUID should always be used as an identifier for a principal, not the name.

Since:
10.1
  • Method Details

    • getName

      public final String getName()
      Returns the name of this principal.
      Specified by:
      getName in interface Principal
      Returns:
      the name of this principal
      Since:
      10.1
    • getDomainName

      public final String getDomainName()
      Returns the domain name of this principal.
      Returns:
      the domain name of this principal
      Since:
      10.1
    • getGuid

      public final Guid getGuid()
      Returns the GUID of this principal.
      Returns:
      the GUID of this principal
      Since:
      10.1
    • getDisplayName

      public final String getDisplayName()
      Returns the display name of this principal.
      Returns:
      the display name of this principal
      Since:
      10.1
    • getEmail

      public final String getEmail()
      Returns the email address of this principal.
      Returns:
      the email address of this principal, or null if no email address has been set
      Since:
      10.1
    • isFixed

      public final boolean isFixed()
      Indicates whether or not this principal is fixed (cannot be removed, renamed or manually altered in any other way - except for being enabled/disabled and locked/unlocked).
      Returns:
      true if this principal is fixed, and false otherwise
      Since:
      10.1
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class Object