Class JAASGroupPrincipal

java.lang.Object
com.spotfire.server.jaas.JAASGroupPrincipal
All Implemented Interfaces:
Serializable, Principal

public class JAASGroupPrincipal extends Object implements Principal, Serializable
This class can be used as a base class for Principal implementations representing groups.
Since:
3.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new JAASGroupPrincipal instance with the given groupname.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares the specified object with this JAASGroupPrincipal instance.
    This method returns the name of the principal.
    int
    Returns the hash code value for the principal.
    The method returns a String representation of this principal.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.security.Principal

    implies
  • Constructor Details

    • JAASGroupPrincipal

      public JAASGroupPrincipal(String groupname)
      Creates a new JAASGroupPrincipal instance with the given groupname.
      Parameters:
      groupname - the groupname
      Since:
      3.0
  • Method Details

    • getName

      public String getName()
      This method returns the name of the principal.
      Specified by:
      getName in interface Principal
      Returns:
      the name of the principal.
    • hashCode

      public int hashCode()
      Returns the hash code value for the principal. The returned hash code is the same as the hash code for the String containing the name of the principal.
      Specified by:
      hashCode in interface Principal
      Overrides:
      hashCode in class Object
      Returns:
      a hash code
    • equals

      public boolean equals(Object obj)
      Compares the specified object with this JAASGroupPrincipal instance. The method returns true if the two objects are of the same concrete subclass of JAASGroupPrincipal and they both have the same name. Otherwise, the method returns false.
      Specified by:
      equals in interface Principal
      Overrides:
      equals in class Object
      Parameters:
      obj - an Object to be compared for equality
      Returns:
      true if the specified object is equal to this principal
    • toString

      public String toString()
      The method returns a String representation of this principal.
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class Object
      Returns:
      a String representation of this principal