Package net.sf.basedb.clients.web
Class PermissionUtil
java.lang.Object
net.sf.basedb.clients.web.PermissionUtil
This class is used to collect some useful methods for assigning
permissions to roles and shared items.
- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2019-03-11 12:51:33 +0100 (mån, 11 mars 2019) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final String
getFullPermissionNames
(Set<Permission> permissions, String restrictedWrite) Create a comma-separated string with "readable" permission names.static final String
static final int
getPermissionCode
(Set<Permission> permissions) Translate the given set of permissions to an integer code that can be used to later recreate the set again.static final Set<Permission>
getPermissions
(int permissionCode) Translate a given integer to a set of permissions.static final String
static String
translatePermissionsToString
(Set<Permission> permissions, String restrictedWrite)
-
Field Details
-
permissionGroups
-
ignored
All items which permissions depend on some other item only.
-
-
Constructor Details
-
PermissionUtil
public PermissionUtil()
-
-
Method Details
-
getShortPermissions
-
getFullPermissionNames
-
getFullPermissionNames
public static final String getFullPermissionNames(Set<Permission> permissions, String restrictedWrite) Create a comma-separated string with "readable" permission names.- Since:
- 2.10, 3.10
-
getPermissionCode
Translate the given set of permissions to an integer code that can be used to later recreate the set again.- Parameters:
permissions
- ASet
with the permissions- Returns:
- An integer
- See Also:
-
getPermissions
Translate a given integer to a set of permissions.- Parameters:
permissionCode
- The integer representing permissions- Returns:
- A
Set
containing thePermission
:s - See Also:
-
getPermissionGroups
-
translatePermissionsToString
public static String translatePermissionsToString(Set<Permission> permissions, String restrictedWrite)
-