Class User

All Implemented Interfaces:
Serializable, Cloneable, Comparable<User>, Id<Integer>, IdTitle<Integer>, Title, UserAccount

public class User extends IdTitle implements Comparable<User>, Cloneable, UserAccount
Application user.
See Also:
  • Field Details

    • OBJECT_TYPE

      public static final String OBJECT_TYPE
      See Also:
    • USER_SYSTEM_ID

      public static final int USER_SYSTEM_ID
      See Also:
    • USER_CUSTOMER_ID

      public static final int USER_CUSTOMER_ID
      See Also:
    • USER_SYSTEM

      public static final User USER_SYSTEM
    • USER_CUSTOMER

      public static final User USER_CUSTOMER
    • STATUS_ACTIVE

      public static final int STATUS_ACTIVE
      Active user.
      See Also:
    • STATUS_DISABLED

      public static final int STATUS_DISABLED
      Blocked user.
      See Also:
    • STATUS_EXTERNAL

      public static final int STATUS_EXTERNAL
      User provided from external auth system. Is active, but shouldn't be edited in the current one.
      See Also:
  • Constructor Details

    • User

      public User()
    • User

      public User(String login, String password)
  • Method Details

    • isAdmin

      public boolean isAdmin()
      Returns:
      is the user admin with Id.getId() equals 1.
    • getLogin

      public String getLogin()
      Specified by:
      getLogin in interface UserAccount
    • setLogin

      public void setLogin(String login)
    • getPassword

      public String getPassword()
      Specified by:
      getPassword in interface UserAccount
    • setPassword

      public void setPassword(String password)
    • getStatus

      public int getStatus()
    • setStatus

      public void setStatus(int status)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getGroupIds

      public Set<Integer> getGroupIds()
      Group IDs active on the current date.
      Returns:
    • setGroupIds

      public void setGroupIds(Set<Integer> groupIds)
    • getPermsetIds

      public List<Integer> getPermsetIds()
    • setPermsetIds

      public void setPermsetIds(List<Integer> permsetIds)
    • getQueueIds

      public Set<Integer> getQueueIds()
    • setQueueIds

      public void setQueueIds(Set<Integer> queueIds)
    • getConfig

      public String getConfig()
    • setConfig

      public void setConfig(String config)
    • getConfigMap

      public ConfigMap getConfigMap()
    • getPersonalization

      public String getPersonalization()
    • setPersonalization

      public void setPersonalization(String personalization)
    • getPersonalizationMap

      public Preferences getPersonalizationMap()
    • compareTo

      public int compareTo(User o)
      Specified by:
      compareTo in interface Comparable<User>
    • clone

      public User clone()
      Overrides:
      clone in class Object
    • getUserListWithSameGroups

      public List<User> getUserListWithSameGroups()
      List of users, fist is the current one. After collected from UserCache.getUserList() users with intersected groups with the current one.
      Returns:
    • checkPerm

      public boolean checkPerm(String action)
      Checks if action allowed in user permissions.
      Parameters:
      action - semicolon separated action class and method, e.g. org.bgerp.plugin.bil.invoice.action.InvoiceAction:get.
      Returns:
      is the action allowed.
    • getPerm

      public ConfigMap getPerm(String action)
      Gets user permission for action.
      Parameters:
      action - semicolon separated action class name and method, e.g. org.bgerp.plugin.bil.invoice.action.InvoiceAction:get.
      Returns:
      allowed permission with options or null.