Interface User

    • Method Detail

      • getLogin

        String getLogin()
        Returns the login name of the user.
        Returns:
        the login name of the user
      • setLogin

        void setLogin​(String login)
        Sets the login name of the user.
        Parameters:
        login - Login name of the user
      • getFirstName

        String getFirstName()
        Returns the first name of the user.
        Returns:
        the first name of the user
      • getName

        String getName()
        Returns the name of the user which is a concatenation of first and last name
        Returns:
        Name of the user
      • setFirstName

        void setFirstName​(String firstName)
        Sets the first name of the user.
        Parameters:
        firstName - First name of the user
      • getLastName

        String getLastName()
        Returns the lastname of the user.
        Returns:
        the lastname of the user
      • setLastName

        void setLastName​(String lastName)
        Sest the lastname of the user.
        Parameters:
        lastName - Lastname of the user
      • getEmail

        String getEmail()
        Returns the E-mail address of the user.
        Returns:
        the E-mail address of the user
      • getEditLanguage

        @Deprecated
        String getEditLanguage()
        Deprecated.
        Returns a String representation of the current edit language of this user.
        Returns:
        a String representation of the current edit language of this user
      • setEmail

        void setEmail​(String email)
        Sets the E-mail address of the user.
        Parameters:
        email - E-mail address of the user
      • getPassword

        String getPassword()
        Returns the encrypted password of the user.
        Returns:
        the encrypted password of the user
      • setPassword

        void setPassword​(String password)
        Sets the password of the user, which will be encrypted.
        Parameters:
        password - Password of the user
      • getPasswordLastChanged

        Date getPasswordLastChanged()
        Returns the date (time) when the password was last changed. If the user has a timezone configured the returned date is configured for this timezone. Otherwise the returned date is UTC.
        Returns:
        the date (time) when the password was last changed
      • getLastLogin

        Date getLastLogin()
        Returns the date (time) when the last login occurred for this user.
        Returns:
        The last login date (time) for this user
      • getState

        boolean getState()
        Return the state of this user, if the user is set to active or inactive.
        Returns:
        The user active or inactive
      • setState

        void setState​(boolean state)
        Sets the state of this user, active or inactive.
        Parameters:
        state -
      • setAccessMethods

        void setAccessMethods​(List<User.AccessMethod> accessMethods)
        Sets the access methods for this user. Access methods determine how a user is allowed to access WebManager, e.g. by logging in or using a secret key.
        Parameters:
        accessMethods - the access methods to set on the user
      • getRoles

        Role[] getRoles()
        Returns the roles that are assigned to the user.
        Returns:
        the roles that are assigned to the user
      • setRoles

        void setRoles​(Role[] roles)
        Sets the roles that are assigned to the user.
        Parameters:
        roles - Roles that are assigned to the user
      • getTimeZone

        TimeZone getTimeZone()
        Returns the user's time zone.
        Returns:
        the user's time zone, or null if the user has no specific time zone configured.
      • getLocale

        Locale getLocale()
        Returns the user's locale.
        Returns:
        the user's locale, or null if the user has no specific locale configured.
      • isDeveloper

        boolean isDeveloper()
        Returns if this use is a 'developer'. This is true if the user has one or more permission groups assigned with 'development = true'.
        Returns:
        true if this user is a developer, false otherwise
      • createApplicationKey

        ApplicationKey createApplicationKey()
        Create a new application key for this user. The value of the key is randomly generated.
        Returns:
        The created application key object.
      • getApplicationKeys

        List<ApplicationKey> getApplicationKeys()
        Get the list of application keys.
        Returns:
        The list of ApplicationKey objects.
      • deleteApplicationKey

        void deleteApplicationKey​(String key)
        Delete the application key matching the given key value.
        Parameters:
        key - The value from the ApplicationKey object to delete.
      • getWebsites

        Website[] getWebsites()
        Returns the websites this user has access to.
        Returns:
        The websites the user has access to
      • setWebsites

        void setWebsites​(Website[] websites)
        Sets the websites this user has access to.
        Parameters:
        websites - The websites the user has access to
      • getEditingLanguage

        EditLanguage getEditingLanguage()
        Returns the language of this user uses for editing in the edit environment.
        Returns:
        the language of this user uses for editing in the edit environment
      • setEditingLanguage

        void setEditingLanguage​(EditLanguage language)
        Sets the language of this user uses for editing in the edit environment.
        Parameters:
        language - the language of this user uses for editing in the edit environment
      • hasDefaultPassword

        boolean hasDefaultPassword()
        Returns true if the current user has a default password, false otherwise.
        Returns:
        true if the current user has a default password, false otherwise
      • isPasswordChangeRequired

        boolean isPasswordChangeRequired()
        Returns true if this user is required to change his/her password, which is the case if either the user's password has been changed by an Administrator or if it is a user with a default password, false otherwise.
        Returns:
        true if this user is required to change his/her password, which is the case if the user's password has been changed by an Administrator, if it is a user with a default password, or the setPasswordChangeRequired(boolean) has been used.
      • setPasswordChangeRequired

        void setPasswordChangeRequired​(boolean changeRequired)
        Sets if the user should change his password on next login. This has effect only if the user is allowed to login with a password.
        Parameters:
        changeRequired - if the user should change his password
      • isSystemUser

        default boolean isSystemUser()
        Indicates if the user is a system user.
        Returns:
        true if user is a system user
      • setSystemUser

        void setSystemUser​(boolean isSystemUser)
        Sets the system user flag.
        Parameters:
        isSystemUser - flag for system user