org.idoox.security
Class WASPPrincipal

java.lang.Object
  extended byorg.idoox.security.WASPPrincipal
All Implemented Interfaces:
java.security.Principal, java.io.Serializable

public class WASPPrincipal
extends java.lang.Object
implements java.security.Principal, java.io.Serializable

This class represents an entity whose identity * can be authenticated by WASP. * * @since 4.0

See Also:
Serialized Form
Component:
Security-Core

Constructor Summary
WASPPrincipal(java.lang.String name)
          Creates new instance with given name.
 
Method Summary
 boolean equals(java.lang.Object another)
          Compares this principal to the specified object.
 java.lang.String getName()
          Returns the name of this principal.
 int hashCode()
          Gets the hash code of this.
 java.lang.String toString()
          Returns a string representation of this principal.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WASPPrincipal

public WASPPrincipal(java.lang.String name)
Creates new instance with given name. The given name mustn't be null. * *@param name principal name

Method Detail

equals

public boolean equals(java.lang.Object another)
Compares this principal to the specified object. Returns true * if the object passed in matches the principal represented by * the implementation of this interface. * * @param another principal to compare with. * * @return true if the principal passed in is the same (same class name and name) * as that encapsulated by this principal, and false otherwise.

Specified by:
equals in interface java.security.Principal

toString

public java.lang.String toString()
Returns a string representation of this principal. * * @return a string representation of this principal.

Specified by:
toString in interface java.security.Principal

getName

public java.lang.String getName()
Returns the name of this principal. * * @return the name of this principal.

Specified by:
getName in interface java.security.Principal

hashCode

public int hashCode()
Gets the hash code of this. * @return getName().hashCode()

Specified by:
hashCode in interface java.security.Principal