Class UDDIPrincipal

  • All Implemented Interfaces:
    Serializable, Principal

    public class UDDIPrincipal
    extends Object
    implements Principal, Serializable

    This class implements the Principal interface and represents a Sample user.

    Principals such as this SamplePrincipal may be associated with a particular Subject to augment that Subject with an additional identity. Refer to the Subject class for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with a Subject.

    Version:
    1.4, 01/11/00
    See Also:
    Principal, Subject, Serialized Form
    • Constructor Detail

      • UDDIPrincipal

        public UDDIPrincipal​(String name)
        Create a UDDIPrincipal with a Sample username.

        Parameters:
        name - the Sample username for this user.
        Throws:
        NullPointerException - if the name is null.
    • Method Detail

      • getName

        public String getName()
        Return the Sample username for this SamplePrincipal.

        Specified by:
        getName in interface Principal
        Returns:
        the Sample username for this SamplePrincipal
      • toString

        public String toString()
        Return a string representation of this SamplePrincipal.

        Specified by:
        toString in interface Principal
        Overrides:
        toString in class Object
        Returns:
        a string representation of this SamplePrincipal.
      • equals

        public boolean equals​(Object o)
        Compares the specified Object with this SamplePrincipal for equality. Returns true if the given object is also a SamplePrincipal and the two SamplePrincipals have the same username.

        Specified by:
        equals in interface Principal
        Overrides:
        equals in class Object
        Parameters:
        o - Object to be compared for equality with this SamplePrincipal.
        Returns:
        true if the specified Object is equal equal to this SamplePrincipal.
      • hashCode

        public int hashCode()
        Return a hash code for this SamplePrincipal.

        Specified by:
        hashCode in interface Principal
        Overrides:
        hashCode in class Object
        Returns:
        a hash code for this SamplePrincipal.