org.gudy.azureus2.ui.console
Class UserProfile

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

public class UserProfile
extends java.lang.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 java.lang.String ADMIN
           
static UserProfile DEFAULT_USER_PROFILE
           
static java.lang.String DEFAULT_USER_TYPE
           
static java.lang.String GUEST
           
static java.lang.String USER
           
 
Constructor Summary
UserProfile()
           
UserProfile(java.lang.String name, java.lang.String userType)
           
 
Method Summary
 boolean authenticate(java.lang.String password)
          returns true if the specified password is the password for this user profile
 boolean equals(java.lang.Object obj)
          check for equality with another user profile object
 java.lang.String getDefaultSaveDirectory()
           
 java.lang.String getEncryptedPassword()
           
 java.lang.String getUsername()
           
 java.lang.String getUserType()
           
static boolean isValidUserType(java.lang.String userType)
          returns true if the specified value is a valid user type
 void setDefaultSaveDirectory(java.lang.String newValue)
           
 void setEncryptedPassword(java.lang.String encryptedPassword)
           
 void setPassword(java.lang.String password)
          stores the specified password as an encrypted password
 void setUsername(java.lang.String username)
           
 void setUserType(java.lang.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 java.lang.String ADMIN
See Also:
Constant Field Values

USER

public static final java.lang.String USER
See Also:
Constant Field Values

GUEST

public static final java.lang.String GUEST
See Also:
Constant Field Values

DEFAULT_USER_TYPE

public static final java.lang.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(java.lang.String name,
                   java.lang.String userType)
Method Detail

isValidUserType

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

Parameters:
userType -
Returns:

authenticate

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

Parameters:
password -
Returns:

setPassword

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

Parameters:
password - The password to set.

getUsername

public java.lang.String getUsername()
Returns:
Returns the username.

setUsername

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

getUserType

public java.lang.String getUserType()
Returns:
Returns the userType.

setUserType

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

equals

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

Overrides:
equals in class java.lang.Object

getEncryptedPassword

public java.lang.String getEncryptedPassword()
Returns:
Returns the encryptedPassword.

setEncryptedPassword

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

getDefaultSaveDirectory

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

setDefaultSaveDirectory

public void setDefaultSaveDirectory(java.lang.String newValue)