|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.clients.web.PermissionUtil
public final class PermissionUtil
This class is used to collect some useful methods for assigning permissions to roles and shared items.
Field Summary | |
---|---|
private static Set<Item> |
ignored
All items which permissions depend on some other item only. |
private static Map<String,List<Item>> |
permissionGroups
|
Constructor Summary | |
---|---|
PermissionUtil()
|
Method Summary | |
---|---|
static String |
getFullPermissionNames(Identifiable item)
|
static String |
getFullPermissionNames(Set<Permission> permissions)
Create a comma-separated string with "readable" permission names. |
static 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 Map<String,List<Item>> |
getPermissionGroups()
|
static Set<Permission> |
getPermissions(int permissionCode)
Translate a given integer to a set of permissions. |
static String |
getShortPermissions(Identifiable item)
|
static String |
translatePermissionsToString(Set<Permission> permissions)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Map<String,List<Item>> permissionGroups
private static final Set<Item> ignored
Constructor Detail |
---|
public PermissionUtil()
Method Detail |
---|
public static final String getShortPermissions(Identifiable item)
public static final String getFullPermissionNames(Identifiable item)
public static final String getFullPermissionNames(Set<Permission> permissions)
public static final int getPermissionCode(Set<Permission> permissions)
permissions
- A Set
with the permissions
getPermissions(int)
public static final Set<Permission> getPermissions(int permissionCode)
permissionCode
- The integer representing permissions
Set
containing the Permission
:sgetPermissionCode(Set)
public static final Map<String,List<Item>> getPermissionGroups()
public static String translatePermissionsToString(Set<Permission> permissions)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |