Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.login
Class PrincipalImpl

java.lang.Object
  extended by org.nuxeo.ecm.platform.login.PrincipalImpl
All Implemented Interfaces:
Principal

public class PrincipalImpl
extends Object
implements Principal

This class implements the principal interface.

Author:
Satish Dharmaraj

Constructor Summary
PrincipalImpl(String user)
          Construct a principal from a string user name.
 
Method Summary
 boolean equals(Object another)
          Returns true if the object passed matches the principal represented in this implementation.
 String getName()
          return the name of the principal.
 int hashCode()
          return a hashcode for the principal.
 String toString()
          Prints a stringified version of the principal.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrincipalImpl

public PrincipalImpl(String user)
Construct a principal from a string user name.

Parameters:
user - The string form of the principal name.
Method Detail

equals

public boolean equals(Object another)
Returns true if the object passed matches the principal represented in this implementation.

Specified by:
equals in interface Principal
Overrides:
equals in class Object
Parameters:
another - the Principal to compare with.
Returns:
true if the Principal passed is the same as that encapsulated in this object, false otherwise

toString

public String toString()
Prints a stringified version of the principal.

Specified by:
toString in interface Principal
Overrides:
toString in class Object

hashCode

public int hashCode()
return a hashcode for the principal.

Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object

getName

public String getName()
return the name of the principal.

Specified by:
getName in interface Principal

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.