Package com.biglybt.ui.console
Class UserProfile
java.lang.Object
com.biglybt.ui.console.UserProfile
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:
- ADMIN have full access to all commands and to torrents of all users
- USER have limited access to commands - can only add/modify their own torrents
- GUEST have no access - can only view the torrent download status
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
authenticate
(String password) returns true if the specified password is the password for this user profileboolean
check for equality with another user profile objectstatic boolean
isValidUserType
(String userType) returns true if the specified value is a valid user typevoid
setDefaultSaveDirectory
(String newValue) void
setEncryptedPassword
(String encryptedPassword) void
setPassword
(String password) stores the specified password as an encrypted passwordvoid
setUsername
(String username) void
setUserType
(String userType)
-
Field Details
-
username
-
userType
-
encryptedPassword
-
defaultSaveDirectory
-
ADMIN
- See Also:
-
USER
- See Also:
-
GUEST
- See Also:
-
DEFAULT_USER_TYPE
- See Also:
-
DEFAULT_USER_PROFILE
-
-
Constructor Details
-
UserProfile
public UserProfile() -
UserProfile
-
-
Method Details
-
isValidUserType
returns true if the specified value is a valid user type- Parameters:
userType
-- Returns:
-
authenticate
returns true if the specified password is the password for this user profile- Parameters:
password
-- Returns:
-
setPassword
stores the specified password as an encrypted password- Parameters:
password
- The password to set.
-
getUsername
- Returns:
- Returns the username.
-
setUsername
- Parameters:
username
- The username to set.
-
getUserType
- Returns:
- Returns the userType.
-
setUserType
- Parameters:
userType
- The userType to set.
-
equals
check for equality with another user profile object -
getEncryptedPassword
- Returns:
- Returns the encryptedPassword.
-
setEncryptedPassword
- Parameters:
encryptedPassword
- The encryptedPassword to set.
-
getDefaultSaveDirectory
- Returns:
- the directory that torrents should be saved to for this user, by default
-
setDefaultSaveDirectory
-