Class User

java.lang.Object
  extended byUser
All Implemented Interfaces:
Serializable

public class User
extends Object
implements Serializable

Model a juno user. Each User has a login name, password, a home directory, and a real name. name.

Version:
10
See Also:
Serialized Form

Constructor Summary
User(String name, String password, Directory home, String realName)
          Construct a new User.
 
Method Summary
 Directory getHome()
          Get the User's home Directory.
 String getName()
          Get the User's login name.
 String getRealName()
          Get the user's real name.
 void matchPassword(String guess)
          Confirm password.
 String toString()
          Convert the User to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

User

public User(String name,
            String password,
            Directory home,
            String realName)
Construct a new User.

Parameters:
name - the User's login name.
password - the user's login password.
home - her home Directory.
realName - her real name.
Method Detail

getHome

public Directory getHome()
Get the User's home Directory.

Returns:
the home Directory.

getName

public String getName()
Get the User's login name.

Returns:
the name.

getRealName

public String getRealName()
Get the user's real name.

Returns:
the real name.

matchPassword

public void matchPassword(String guess)
                   throws JunoException
Confirm password. Throw a JunoException on failure.

Parameters:
guess - the string to test against the password.
Throws:
JunoException - if password fails to match

toString

public String toString()
Convert the User to a String. The String representation for a User is her login name.

Returns:
the User's name.