Synergy Home Page

au.edu.swin.synergy.plugin.rooms
Class BUser

java.lang.Object
  |
  +--au.edu.swin.synergy.plugin.rooms.BUser

public class BUser
extends Object
implements Serializable

A BUser provides the details of a particular user including their name, their location (ip address etc.) and other details associated with each user.

Author:
Tristan Austin modified by John Newbigin
See Also:
Serialized Form

Field Summary
static int kAdministrator
          The constant identifying the privilage "administrator"
static int kUser
          The constant identifying the privilage "user"
 
Constructor Summary
BUser()
          Creates a user object with no values
BUser(String userName)
          Creates a user object with the given user name and the ip address of the client machine
 
Method Summary
 void doChangePassword(String fPassword)
          Please complete the missing tags for doChangePassword
 boolean doCheckPassword(String fPassword)
          Please complete the missing tags for doCheckPassword
 boolean equals(Object user)
          Determines whether this user is equal to the user passed in.
 String getEmailAddress()
          Gets the users email address
 String getFullName()
          Gets the full name of the user
 String getOldUserName()
          Gets the new user name for this user
 String getPassword()
          Gets this users password
 int getPrivilage()
          Supplies the privilage associated with this user.
 String getUserName()
          Gets the user name of this user
 void setEmailAddress(String newEmailAddress)
          Sets the users email address
 void setFullName(String newFullName)
          Sets the users full name to that specified
 void setNewUserName(String newUserName)
          Sets the new user name of the user to that specified.
 void setPassword(String fPassword)
          Enables the setting to password.
 void setPrivilage(int privilage)
          Sets the privilage of this user to that specified
 void setUserName(String userName)
          Sets the user name to that specified
 String toString()
          Returns a representation of the user as a string
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kUser

public static final int kUser
The constant identifying the privilage "user"

kAdministrator

public static final int kAdministrator
The constant identifying the privilage "administrator"
Constructor Detail

BUser

public BUser(String userName)
Creates a user object with the given user name and the ip address of the client machine

BUser

public BUser()
Creates a user object with no values
Method Detail

getPassword

public String getPassword()
Gets this users password
Parameters:
Gets - the unecrypted password

setPassword

public void setPassword(String fPassword)
Enables the setting to password.
Parameters:
password - The unencrypted password of the user

getUserName

public String getUserName()
Gets the user name of this user
Returns:
The user name

setUserName

public void setUserName(String userName)
Sets the user name to that specified
Parameters:
userName - The user name of this user

getOldUserName

public String getOldUserName()
Gets the new user name for this user

getPrivilage

public int getPrivilage()
Supplies the privilage associated with this user.
Returns:
The Privilage as defined in this class

getFullName

public String getFullName()
Gets the full name of the user
Returns:
The full name of the user

getEmailAddress

public String getEmailAddress()
Gets the users email address
Returns:
The users email address

setNewUserName

public void setNewUserName(String newUserName)
Sets the new user name of the user to that specified. This enables, the old user to still be identified so he can be updated rather than adding a new user.
Parameters:
newUesrName - The new user name for this user

setPrivilage

public void setPrivilage(int privilage)
Sets the privilage of this user to that specified
Parameters:
privilage - The new privilage of the user

setFullName

public void setFullName(String newFullName)
Sets the users full name to that specified
Parameters:
newFullName - The new full name of the user

setEmailAddress

public void setEmailAddress(String newEmailAddress)
Sets the users email address
Parameters:
newEmailAddress - Their new email address

doChangePassword

public void doChangePassword(String fPassword)
Please complete the missing tags for doChangePassword
Parameters:
-  
Returns:
 
Throws:
-  
Pre Condition:
 
Post Condition:
 

doCheckPassword

public boolean doCheckPassword(String fPassword)
Please complete the missing tags for doCheckPassword
Parameters:
-  
Returns:
 
Throws:
-  
Pre Condition:
 
Post Condition:
 

equals

public boolean equals(Object user)
Determines whether this user is equal to the user passed in.
Parameters:
user - The user to compare
Overrides:
equals in class Object

toString

public String toString()
Returns a representation of the user as a string
Returns:
The user name of the current user
Overrides:
toString in class Object

Synergy Home Page