org.gudy.azureus2.ui.console
Class UserProfile

java.lang.Object
  extended by org.gudy.azureus2.ui.console.UserProfile

public class UserProfile
extends Object

the user profile contains the information about a user that is allowed to use the console ui. Users may be assigned one of three profiles:

Author:
pauld

Field Summary
static String ADMIN
           
static UserProfile DEFAULT_USER_PROFILE
           
static String DEFAULT_USER_TYPE
           
static String GUEST
           
static String USER
           
 
Constructor Summary
UserProfile()
           
UserProfile(String name, String userType)
           
 
Method Summary
 boolean authenticate(String password)
          returns true if the specified password is the password for this user profile
 boolean equals(Object obj)
          check for equality with another user profile object
 String getDefaultSaveDirectory()
           
 String getEncryptedPassword()
           
 String getUsername()
           
 String getUserType()
           
static boolean isValidUserType(String userType)
          returns true if the specified value is a valid user type
 void setDefaultSaveDirectory(String newValue)
           
 void setEncryptedPassword(String encryptedPassword)
           
 void setPassword(String password)
          stores the specified password as an encrypted password
 void setUsername(String username)
           
 void setUserType(String userType)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADMIN

public static final String ADMIN
See Also:
Constant Field Values

USER

public static final String USER
See Also:
Constant Field Values

GUEST

public static final String GUEST
See Also:
Constant Field Values

DEFAULT_USER_TYPE

public static final String DEFAULT_USER_TYPE
See Also:
Constant Field Values

DEFAULT_USER_PROFILE

public static final UserProfile DEFAULT_USER_PROFILE
Constructor Detail

UserProfile

public UserProfile()

UserProfile

public UserProfile(String name,
                   String userType)
Method Detail

isValidUserType

public static boolean isValidUserType(String userType)
returns true if the specified value is a valid user type

Parameters:
userType -
Returns:

authenticate

public boolean authenticate(String password)
returns true if the specified password is the password for this user profile

Parameters:
password -
Returns:

setPassword

public void setPassword(String password)
stores the specified password as an encrypted password

Parameters:
password - The password to set.

getUsername

public String getUsername()
Returns:
Returns the username.

setUsername

public void setUsername(String username)
Parameters:
username - The username to set.

getUserType

public String getUserType()
Returns:
Returns the userType.

setUserType

public void setUserType(String userType)
Parameters:
userType - The userType to set.

equals

public boolean equals(Object obj)
check for equality with another user profile object

Overrides:
equals in class Object

getEncryptedPassword

public String getEncryptedPassword()
Returns:
Returns the encryptedPassword.

setEncryptedPassword

public void setEncryptedPassword(String encryptedPassword)
Parameters:
encryptedPassword - The encryptedPassword to set.

getDefaultSaveDirectory

public String getDefaultSaveDirectory()
Returns:
the directory that torrents should be saved to for this user, by default

setDefaultSaveDirectory

public void setDefaultSaveDirectory(String newValue)