Package ru.bgcrm.model.user

# Class User

java.lang.Object
org.bgerp.model.base.Id
org.bgerp.model.base.IdTitle
org.bgerp.model.base.IdTitleComment
ru.bgcrm.model.user.User

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

Direct Known Subclasses:
  `UserAccount`

public class User extends IdTitleComment implements Comparable<User>, Cloneable, UserAccount
Application user

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `OBJECT_TYPE`
  `static final int`
  `STATUS_ACTIVE`
  Active user.
  `static final int`
  `STATUS_DISABLED`
  Blocked user.
  `static final int`
  `STATUS_EXTERNAL`
  User provided from external auth system.
  `static final User`
  `USER_CUSTOMER`
  `static final int`
  `USER_CUSTOMER_ID`
  `static final User`
  `USER_SYSTEM`
  `static final int`
  `USER_SYSTEM_ID`

  ### Fields inherited from class org.bgerp.model.base.IdTitleComment

  `comment`

  ### Fields inherited from class org.bgerp.model.base.IdTitle

  `title`

  ### Fields inherited from class org.bgerp.model.base.Id

  `id`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `User()`
  `User(String login, String password)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `checkPerm(String action)`
  Checks if `action` allowed in user permissions.
  `User`
  `clone()`
  `int`
  `compareTo(User o)`
  `String`
  `getConfig()`
  `ConfigMap`
  `getConfigMap()`
  `String`
  `getDescription()`
  Deprecated.
  `Set<Integer>`
  `getGroupIds()`
  Group IDs active on the current date.
  `String`
  `getLogin()`
  `String`
  `getPassword()`
  `ConfigMap`
  `getPerm(String action)`
  Gets user permission for action.
  `List<Integer>`
  `getPermsetIds()`
  `Preferences`
  `getPers()`
  `String`
  `getPersonalization()`
  `Preferences`
  `getPersonalizationMap()`
  Deprecated.
  `Set<Integer>`
  `getQueueIds()`
  `int`
  `getStatus()`
  `List<User>`
  `getUserListWithSameGroups()`
  List of users, fist is the current one.
  `boolean`
  `isAdmin()`
  `void`
  `setConfig(String config)`
  `void`
  `setDescription(String value)`
  Deprecated.
  `void`
  `setGroupIds(Set<Integer> groupIds)`
  `void`
  `setLogin(String login)`
  `void`
  `setPassword(String password)`
  `void`
  `setPermsetIds(List<Integer> permsetIds)`
  `void`
  `setPersonalization(String personalization)`
  `void`
  `setQueueIds(Set<Integer> queueIds)`
  `void`
  `setStatus(int status)`

  ### Methods inherited from class org.bgerp.model.base.IdTitleComment

  `getComment, setComment`

  ### Methods inherited from class org.bgerp.model.base.IdTitle

  `getTitle, setTitle, toString, unknown`

  ### Methods inherited from class org.bgerp.model.base.Id

  `equals, getId, hashCode, setId`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.bgerp.model.base.iface.Id

  `getId`

- ## Field Details

  - ### OBJECT_TYPE

    public static final String OBJECT_TYPE
    See Also:
      - Constant Field Values

  - ### USER_SYSTEM_ID

    public static final int USER_SYSTEM_ID
    See Also:
      - Constant Field Values

  - ### USER_CUSTOMER_ID

    public static final int USER_CUSTOMER_ID
    See Also:
      - Constant Field Values

  - ### 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:
      - Constant Field Values

  - ### STATUS_DISABLED

    public static final int STATUS_DISABLED
    Blocked user.
    See Also:
      - Constant Field Values

  - ### 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:
      - Constant Field Values

- ## 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)

  - ### 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)

  - ### getPers

    public Preferences getPers()

  - ### 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`.

  - ### getPersonalizationMap

    @Deprecated public Preferences getPersonalizationMap()
    Deprecated.

  - ### getDescription

    @Deprecated public String getDescription()
    Deprecated.

  - ### setDescription

    @Deprecated public void setDescription(String value)
    Deprecated.