Class Account

java.lang.Object
com.elpical.jclaro.admin.ws.server.Account

public class Account extends Object
The Account class holds information about the privileges an account has and a login token to be used in communication with the server. If no user-management is used in the server a default account is created after login with all privileges.
  • Constructor Details

    • Account

      public Account(String name, String password)
      Creates an Account with the supplied name and password.
      Parameters:
      name - The name of the Account. If the name is empty a default "New" name is used.
      password - The password of the Account. If empty a random password is generated.
    • Account

      public Account()
      Default constructor. Creates a empty account without any values.
  • Method Details

    • getName

      public String getName()
      Returns the name of the Account
      Returns:
      The Account name
    • setName

      public void setName(String name)
      Sets the name of the Account
      Parameters:
      name - The new name of the Account
    • getEmail

      public String getEmail()
      Returns the email address of the Account
      Returns:
      The email address of the Account
    • setEmail

      public void setEmail(String email)
      Sets the email address of the Account
      Parameters:
      email - The email address of the Account
    • getPassword

      public byte[] getPassword()
      Returns the (encrypted) password of the Account.
      Returns:
      The (encrypted) password of the Account.
    • setPassword

      public void setPassword(byte[] password)
      Sets the password of the Account. For safety reasons Claro expects that this password is encrypted using asymetric encryption as described in the example. If a user wants to change its password he or she has to do this via the Adminconnector changePassword method
      Parameters:
      password - The password encrypted using asymetric encryption as described in the example
      See Also:
      Description with example, AdminConnector.changePassword(byte[], byte[], byte[])
    • getConfigurationPrivileges

      public int getConfigurationPrivileges()
      Gets the privileges of the account concerning Configuration settings. NO_ACCESS(0),VIEW(1),EDIT(2)
      Returns:
      The privileges of the account.
    • setConfigurationPrivileges

      public void setConfigurationPrivileges(int configurationPrivileges)
      Sets the privileges of the account concerning Configuration settings. NO_ACCESS(0),VIEW(1),EDIT(2)
      Parameters:
      configurationPrivileges - The privileges of the account concerning configuration settings.
    • getMaintenancePrivileges

      public int getMaintenancePrivileges()
      Gets the privileges of the account concerning Maintenance settings. NO_ACCESS(0),VIEW(1),EDIT(2)
      Returns:
      The privileges of the account.
    • setMaintenancePrivileges

      public void setMaintenancePrivileges(int maintenancePrivileges)
      Sets the privileges of the account concerning Maintenance settings. NO_ACCESS(0),VIEW(1),EDIT(2)
      Parameters:
      maintenancePrivileges - The privileges of the account concerning Maintenance settings.
    • getTaskPrivileges

      public int getTaskPrivileges()
      Gets the privileges of the account concerning Task settings. NO_ACCESS(0),VIEW(1),EDIT(2)
      Returns:
      The privileges of the account.
    • setTaskPrivileges

      public void setTaskPrivileges(int taskPrivileges)
      Sets the privileges of the account concerning Task settings. NO_ACCESS(0),VIEW(1),EDIT(2)
      Parameters:
      taskPrivileges - The privileges of the account concerning Tasks settings.
    • getAccountPrivileges

      public int getAccountPrivileges()
      Gets the privileges of the account concerning Account settings. NO_ACCESS(0),VIEW(1),EDIT(2)
      Returns:
      The privileges of the account.
    • setAccountPrivileges

      public void setAccountPrivileges(int accountPrivileges)
      Sets the privileges of the account concerning Account settings. NO_ACCESS(0),VIEW(1),EDIT(2)
      Parameters:
      accountPrivileges - The privileges of the account concerning Account settings.
    • getEncryptedToken

      public byte[] getEncryptedToken()
      Gets the unique login id token which was created after logging in. Check the example in the Description
      Returns:
      The encrypted unique login token
      See Also:
      Description with example
    • setEncryptedToken

      public void setEncryptedToken(byte[] token)
      Set's the unique login token. Method only used by the server.
      Parameters:
      token - The encrypted unique login token
      See Also:
      Description with example
    • getPublicKey

      public byte[] getPublicKey()
      Gets the public key of the server. Used for encrypting passwords and login-tokens.
      Returns:
      The public key of the server
      See Also:
      Description with example
    • setPublicKey

      public void setPublicKey(byte[] publicKey)
      Sets the public key of the server. Used for encrypting passwords and login-tokens.
      Parameters:
      publicKey - The public key of the server