Class User

All Implemented Interfaces:
Serializable, IBaseEntity, ICoreEntity, IEntity, ISortableEntity

@Entity public class User extends Principal
Entity representing a User in the system. User must have login and password and a baseRole (UserCredentials).
BaseRoles are:
  • STANDARDUSER: see, insert, edit and delete object in main area, depending on his permissions on right managed objects
  • POWERUSER: insert, edit and delete User and UserGroups
  • CONFIGADMIN: allowed to insert, edit and delete configuration
  • SERVICEUSER: starts workflows and internal processes that need an User
  • ROOT: all functions in the system
The baseRoles are including in the order above, i.e. POWERUSER also has the rights of STANDARDUSER etc.
password: is stored encrypted and can only changed by user himself or by a POWERUSER. defaultLocale: the User's default content locale. Currently not used translationLocales: target locale's for translations which the user uses to perform. Multilocale data of objects are presented with data in content locale followed by input fields for the translation locales.
See Also:
  • Constructor Details

    • User

      public User()
    • User

      public User(User source)
      Copy constructor.
      Parameters:
      source - Template object.
    • User

      public User(UserCredentials credentials)
  • Method Details

    • getDefaultLocale

      public Locale getDefaultLocale()
    • getUiLocale

      public Locale getUiLocale()
    • getEmail

      public String getEmail()
    • getPassword

      public String getPassword()
    • getPasswordSalt

      public String getPasswordSalt()
    • getUserGroupList

      public List<UserGroup> getUserGroupList()
    • getBaseRole

      public User.UserBaseRole getBaseRole()
    • setBaseRole

      public void setBaseRole(User.UserBaseRole role)
    • setDefaultLocale

      public void setDefaultLocale(Locale defaultLocale)
    • setUiLocale

      public void setUiLocale(Locale uiLocale)
    • setEmail

      public void setEmail(String email)
    • setPassword

      public void setPassword(String password)
    • setPasswordSalt

      public void setPasswordSalt(String passwordSalt)
    • setUserGroupList

      public void setUserGroupList(List<UserGroup> list)
    • getTranslationLocales

      public Set<Locale> getTranslationLocales()
      needed by EntityMapper on save (PropertyDescriptor read method)
    • setTranslationLocales

      public void setTranslationLocales(Set<Locale> translationLocales)
      used by EntityMapper on save
    • getTranslationLocale

      public Locale getTranslationLocale()
      get single translation locale. currently only one is implemented
      Returns:
      locale or null if no translation locale is set
    • getUserWithGroups

      public List<Principal> getUserWithGroups()
      Returns:
      combined list with user and and his/her groups
    • is

      public boolean is(User.UserBaseRole role)
    • isExactly

      public boolean isExactly(User.UserBaseRole role)
    • is

      public boolean is(UserCredentials userCredentials)
    • getLogin

      public String getLogin()
    • setLogin

      public void setLogin(String login)
    • getUserName

      public String getUserName()
    • setUserName

      public void setUserName(String name)
    • isConfigAdmin

      public boolean isConfigAdmin()
      Returns:
      true if user's role as mighty as or mightier than User.UserBaseRole.CONFIGADMIN.
    • isPowerUser

      public boolean isPowerUser()
      Returns:
      true if user's role as mighty as or mightier than User.UserBaseRole.POWERUSER.
    • isRoot

      public boolean isRoot()
      Returns:
      true if user's role is User.UserBaseRole.ROOT.
    • isServiceUser

      public boolean isServiceUser()
      Returns:
      true if user's role as mighty as or mightier than User.UserBaseRole.SERVICEUSER.
    • isStandardUser

      public boolean isStandardUser()
      Returns:
      Always true.
    • getUserProfile

      public UserProfile getUserProfile()
    • isVisible

      public boolean isVisible()
      Overrides:
      isVisible in class Principal