at.ac.tuwien.dslab.rmi.common.impl
Class UserImpl

java.lang.Object
  extended by at.ac.tuwien.dslab.rmi.common.impl.UserImpl
All Implemented Interfaces:
IUser, java.io.Serializable

public class UserImpl
extends java.lang.Object
implements IUser

The UserImpl provides a default implementation of a user.

See Also:
Serialized Form

Constructor Summary
UserImpl()
          Creates a new and empty IUser instance.
UserImpl(java.lang.String name, java.lang.String plainPassword)
          Creates a new IUser instance.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
          Gets the name of this user.
 java.lang.String getPassword()
          Gets the SHA hashed password for this user.
 void setName(java.lang.String name)
          Sets the name of this user.
 void setPassword(java.lang.String password)
          Sets the plaintext password of the user and hashes it with the SHA algorithm.
 void setPasswordHashed(java.lang.String password)
          Sets the already hashed password of the user.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserImpl

public UserImpl()
Creates a new and empty IUser instance.


UserImpl

public UserImpl(java.lang.String name,
                java.lang.String plainPassword)
Creates a new IUser instance.

Parameters:
name - The username.
plainPassword - The plain password.
Method Detail

setName

public void setName(java.lang.String name)
Description copied from interface: IUser
Sets the name of this user.

Specified by:
setName in interface IUser
Parameters:
name - The name of this user.

getName

public java.lang.String getName()
Description copied from interface: IUser
Gets the name of this user.

Specified by:
getName in interface IUser
Returns:
The name of this user.

setPassword

public void setPassword(java.lang.String password)
Description copied from interface: IUser
Sets the plaintext password of the user and hashes it with the SHA algorithm.

Specified by:
setPassword in interface IUser
Parameters:
password - The plain password of the user to hash.

getPassword

public java.lang.String getPassword()
Description copied from interface: IUser
Gets the SHA hashed password for this user.

Specified by:
getPassword in interface IUser
Returns:
The SHA hashed password for this user.

setPasswordHashed

public void setPasswordHashed(java.lang.String password)
Description copied from interface: IUser
Sets the already hashed password of the user.

Specified by:
setPasswordHashed in interface IUser
Parameters:
password - The already SHA hased password of the user.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object