Package org.bgerp.cache
Class UserCache
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
flush
(Connection con) static Collection
<User> getGroupPath
(int id) static ConfigMap
Gets user permission for an action.static User
getUser
(int id) static User
Finds user with status notUser.STATUS_DISABLED
.static Group
getUserGroup
(int groupId) static int
getUserGroupChildCount
(int groupId) getUserGroupChildFullSet
(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.static String
getUserGroupWithPath
(Map<Integer, Group> groupMap, int id, boolean withId) "Возвращает полный путь к корневой группе в виде строки (например: Администратор -> Помощник -> Помощник помощника)"getUserList
(Set<Integer> groupIds) protected UserCache
Creates a new cache instance
-
Field Details
-
HOLDER
-
EMPTY_PERMISSION
-
-
Constructor Details
-
UserCache
public UserCache()
-
-
Method Details
-
getUser
-
getUserMap
-
getUser
Finds user with status notUser.STATUS_DISABLED
.- Parameters:
login
-- Returns:
-
getUserList
-
getActiveUsers
-
getUserGroup
-
getUserGroupChildCount
public static int getUserGroupChildCount(int groupId) -
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
-
getUserGroupChildSet
-
getUserGroupChildFullSet
-
getUserGroupList
-
getUserGroupFullTitledList
-
getUserGroupRoleFullTitledList
Provides full list of groups with for a role with IDs concatenated from group ID and role ID.- Parameters:
roleId
-- Returns:
-
getUserGroupMap
-
getUserGroupFullTitledMap
-
getUserPermsetList
- Returns:
- alphabetically sorted list with all permission sets.
-
getUserPermsetMap
- Returns:
- map with all use permission sets, key - ID
-
flush
-
getGroupPath
-
getUserGroupWithPath
"Возвращает полный путь к корневой группе в виде строки (например: Администратор -> Помощник -> Помощник помощника)"- Parameters:
id
- группы- Returns:
- Строка с полным путем к корневой группе, либо title группы, если нет родительской группы
-
getUserGroupList
-
getUserGroupList
-
getUserGroupList
-
newInstance
Description copied from class:Cache
Creates a new cache instance- Specified by:
newInstance
in classCache<UserCache>
- Returns:
- the instance
-