Package org.bgerp.cache
Class UserCache
In-memory cache of user-related data
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidflush(Connection con) static Collection<User> Users with status notUser.STATUS_DISABLED.getGroupPath(int id) static ConfigMapGets user permission for an action.static UsergetUser(int id) Get a user by ID with a password updated fromUSER_PASSWORDSstatic UserGet a user with status notUser.STATUS_DISABLEDby loginstatic GroupgetUserGroup(int groupId) getUserGroupChildSet(int groupId) getUserGroupList(int id) getUserGroupList(int id, int parentId, Date actualDate) getUserGroupList(int id, Date actualDate) static List<IdStringTitle> getUserGroupRoleFullTitledList(int roleId) Provides full list of groups with for a role with IDs concatenated from group ID and role ID.getUserList(Set<Integer> groupIds) protected UserCacheCreates a new cache instancestatic voidUpdate a runtime user password inUSER_PASSWORDS
-
Field Details
-
HOLDER
-
EMPTY_PERMISSION
-
-
Constructor Details
-
UserCache
public UserCache()
-
-
Method Details
-
getUser
Get a user by ID with a password updated fromUSER_PASSWORDS- Parameters:
id- the user ID- Returns:
- the matching user or
null
-
getUser
Get a user with status notUser.STATUS_DISABLEDby login- Parameters:
login- the login- Returns:
- the user or
null
-
password
Update a runtime user password inUSER_PASSWORDS- Parameters:
userId- the user IDpassword- the password
-
getPerm
Gets user permission for an action.- Parameters:
userId- the user ID.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.
-
getUserList
-
getUserList
-
getActiveUsers
Users with status notUser.STATUS_DISABLED.- Returns:
- unordered collection
-
getUserMap
-
getUserGroup
-
getGroupPath
-
getUserGroupList
-
getUserGroupFullTitledList
-
getUserGroupRoleFullTitledList
Provides full list of groups with for a role with IDs concatenated from group ID and role ID.- Parameters:
roleId-- Returns:
-
getUserGroupList
-
getUserGroupList
-
getUserGroupList
-
getUserGroupMap
-
getUserGroupFullTitledMap
-
getUserGroupChildSet
-
getUserPermsetList
- Returns:
- alphabetically sorted list with all permission sets.
-
getUserPermsetMap
- Returns:
- map with all use permission sets, key - ID
-
flush
-
newInstance
Description copied from class:CacheCreates a new cache instance- Specified by:
newInstancein classCache<UserCache>- Returns:
- the instance
-