Interface User

All Superinterfaces:
Persisted
All Known Implementing Classes:
UserImpl, UserImpl.LocalAdminUser

public interface User extends Persisted
  • Method Details

    • isReadOnly

      boolean isReadOnly()
    • getAuthServiceId

      @Nullable String getAuthServiceId()
    • getAuthServiceUid

      @Nullable String getAuthServiceUid()
    • getFirstName

      Optional<String> getFirstName()
    • getLastName

      Optional<String> getLastName()
    • getFullName

      String getFullName()
    • getName

      String getName()
    • setName

      void setName(String username)
    • getEmail

      String getEmail()
      Returns the email address of the user. Depending on how the user has been created, it is possible that the returned string contains multiple email addresses separated by a "," character. (i.e. LDAP users)
      Returns:
      the email address
    • getPermissions

      List<String> getPermissions()
    • getObjectPermissions

      Set<org.apache.shiro.authz.Permission> getObjectPermissions()
    • getPreferences

      Map<String,Object> getPreferences()
    • getStartpage

      Startpage getStartpage()
    • getSessionTimeoutMs

      long getSessionTimeoutMs()
    • setSessionTimeoutMs

      void setSessionTimeoutMs(long timeoutValue)
    • setPermissions

      void setPermissions(List<String> permissions)
    • setPreferences

      void setPreferences(Map<String,Object> preferences)
    • setAuthServiceId

      void setAuthServiceId(@Nullable String authServiceId)
    • setAuthServiceUid

      void setAuthServiceUid(@Nullable String authServiceUid)
    • setEmail

      void setEmail(String email)
    • setFirstLastFullNames

      void setFirstLastFullNames(String firstName, String lastName)
      Set the first, last, and full user's name. The full user's full name is composed by concatenating the first and last names together with a space between. For example "First Last".
      Parameters:
      firstName - Required. The user's first name.
      lastName - Required. The user's last name.
    • setFullName

      @Deprecated void setFullName(String fullname)
      Deprecated.
      Set the user's full name. Starting in Graylog 4.1, use of this method is deprecated. Prefer use of the setFirstLastFullNames(String, String) method instead when possible. This way, both individual first and last names will be available when needed.
    • getHashedPassword

      String getHashedPassword()
    • setPassword

      void setPassword(String password)
    • isUserPassword

      boolean isUserPassword(String password)
    • getTimeZone

      org.joda.time.DateTimeZone getTimeZone()
    • setTimeZone

      void setTimeZone(org.joda.time.DateTimeZone timeZone)
    • setTimeZone

      void setTimeZone(String timeZone)
    • isExternalUser

      boolean isExternalUser()
    • setExternal

      void setExternal(boolean external)
    • setStartpage

      void setStartpage(String type, String id)
    • setStartpage

      void setStartpage(Startpage startpage)
    • isLocalAdmin

      boolean isLocalAdmin()
    • getRoleIds

      @Nonnull Set<String> getRoleIds()
    • setRoleIds

      void setRoleIds(Set<String> roles)
    • setAccountStatus

      void setAccountStatus(User.AccountStatus status)
    • getAccountStatus

      User.AccountStatus getAccountStatus()
    • isServiceAccount

      boolean isServiceAccount()
    • setServiceAccount

      void setServiceAccount(boolean isServiceAccount)