Class UserProfile

java.lang.Object
com.biglybt.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:
  • 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 Details

  • Constructor Details

    • UserProfile

      public UserProfile()
    • UserProfile

      public UserProfile(String name, String userType)
  • Method Details

    • 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)