Interface Permission
- All Superinterfaces:
Cloneable
Encapsulation of node permission flags which depend on the tree structure and on a
group
or a user
and his assigned
groups.
The user "admin" has always the permissions as specified in CAN_EVERYTHING
, a project admin has at least
the permissions as specified in PROJECT_ADMIN_PERMISSIONS
.- Since:
- 3.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Append (new) folder nodes permission flag.static final int
Append (new) leaf nodes permission flag.static final int
Data change permission flag.static final int
Permission to change permissions.static final int
Delete folder node permission flag.static final int
Delete folder permission flag.static final int
Combination of all permission flags (sum or bitwise or).static final int
Meta data change permission flag.static final int
Meta data visibility (and read) permission flag.static final int
Data read permission flag.static final int
Releas node permission flag.static final int
Tree visibility permission flag.static final int[]
A summary of all permissions.static final int
Combination of permission flags for project admins. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPermissionListener
(PermissionListener permissionListener) Adds the givenpermission listener
to be notified on permission change events.allow
(int p) Grants the given permission.boolean
Returnstrue
if the current user is allowed to append folders to the underlyingelement
.boolean
Returnstrue
if the current user is allowed to append leaf elements to the underlyingelement
.boolean
Returnstrue
if the current user is allowed to change the underlyingelement
.boolean
Returnstrue
if the current user is allowed to change permissions of the underlyingelement
.boolean
Returnstrue
if the current user is allowed to delete the underlyingelement
.boolean
Returnstrue
if the current user is allowed to delete folders from the underlyingelement
.boolean
Returnstrue
if the current user is allowed to delete leaf elements from the underlyingelement
.boolean
Returnstrue
if the current user is allowed to change meta data of the underlyingelement
.boolean
Returnstrue
if the current user is allowed to see meta data of the underlyingelement
.boolean
canRead()
Returnstrue
if the current user is allowed to read the underlyingelement
.boolean
Returnstrue
if the current user is allowed to release the underlyingelement
.boolean
canSee()
Returnstrue
if the current user is allowed to see the underlyingelement
.clone()
forbid
(int p) Revokes the given permission.Returns the underlying element.boolean
isAllowed
(int p) Check if a single permission is grantedvoid
removePermissionListener
(PermissionListener permissionListener) Removes the givenpermission listener
.
-
Field Details
-
CAN_SEE
static final int CAN_SEETree visibility permission flag.- Since:
- 3.0
- See Also:
-
CAN_READ
static final int CAN_READData read permission flag.- Since:
- 3.0
- See Also:
-
CAN_CHANGE
static final int CAN_CHANGEData change permission flag.- Since:
- 3.0
- See Also:
-
CAN_APPEND_FOLDER
static final int CAN_APPEND_FOLDERAppend (new) folder nodes permission flag. Only relevant for nodes which are of the type "folder".- Since:
- 3.0
- See Also:
-
CAN_APPEND_LEAF
static final int CAN_APPEND_LEAFAppend (new) leaf nodes permission flag. Only relevant for nodes which are of the type "folder".- Since:
- 3.0
- See Also:
-
CAN_DELETE_FOLDER
static final int CAN_DELETE_FOLDERDelete folder node permission flag. Only relevant for nodes which are of the type "folder".- Since:
- 3.0
- See Also:
-
CAN_DELETE_LEAF
static final int CAN_DELETE_LEAFDelete folder permission flag. Only relevant for nodes which are of the type "leaf" (leaves may have child nodes!).- Since:
- 3.0
- See Also:
-
CAN_CHANGE_PERMISSION
static final int CAN_CHANGE_PERMISSIONPermission to change permissions.- Since:
- 3.0
- See Also:
-
CAN_RELEASE
static final int CAN_RELEASEReleas node permission flag.- Since:
- 3.0
- See Also:
-
CAN_META_SEE
static final int CAN_META_SEEMeta data visibility (and read) permission flag.- Since:
- 3.0
- See Also:
-
CAN_META_CHANGE
static final int CAN_META_CHANGEMeta data change permission flag.- Since:
- 3.0
- See Also:
-
CAN_EVERYTHING
static final int CAN_EVERYTHINGCombination of all permission flags (sum or bitwise or).- Since:
- 3.0
- See Also:
-
PROJECT_ADMIN_PERMISSIONS
static final int PROJECT_ADMIN_PERMISSIONSCombination of permission flags for project admins.- Since:
- 3.0.81
- See Also:
-
PERMISSIONS
static final int[] PERMISSIONSA summary of all permissions.- Since:
- 3.0
-
-
Method Details
-
allow
Grants the given permission.- Returns:
- This permission object.
- Since:
- 3.0
-
forbid
Revokes the given permission.- Returns:
- This permission object.
- Since:
- 3.0
-
isAllowed
boolean isAllowed(int p) Check if a single permission is granted- Parameters:
p
-- Returns:
true
if the current user is the super admin (login "admin") or this permission is granted.- Since:
- 3.0
-
canSee
boolean canSee()Returnstrue
if the current user is allowed to see the underlyingelement
.- Returns:
true
if the current user is allowed to see the underlyingelement
.- Since:
- 3.0
-
canRead
boolean canRead()Returnstrue
if the current user is allowed to read the underlyingelement
.- Returns:
true
if the current user is allowed to read the underlyingelement
.- Since:
- 3.0
-
canChange
boolean canChange()Returnstrue
if the current user is allowed to change the underlyingelement
.- Returns:
true
if the current user is allowed to change the underlyingelement
.- Since:
- 3.0
-
canAppendLeaf
boolean canAppendLeaf()Returnstrue
if the current user is allowed to append leaf elements to the underlyingelement
.- Returns:
true
if the current user is allowed to append leaf elements to the underlyingelement
.- Since:
- 3.0
-
canAppendFolder
boolean canAppendFolder()Returnstrue
if the current user is allowed to append folders to the underlyingelement
.- Returns:
true
if the current user is allowed to append folders to the underlyingelement
.- Since:
- 3.0
-
canDelete
boolean canDelete()Returnstrue
if the current user is allowed to delete the underlyingelement
.- Returns:
true
if the current user is allowed to delete the underlyingelement
.- Since:
- 3.0.64
-
canDeleteLeaf
boolean canDeleteLeaf()Returnstrue
if the current user is allowed to delete leaf elements from the underlyingelement
.- Returns:
true
if the current user is allowed to delete leaf elements from the underlyingelement
.- Since:
- 3.0
-
canDeleteFolder
boolean canDeleteFolder()Returnstrue
if the current user is allowed to delete folders from the underlyingelement
.- Returns:
true
if the current user is allowed to delete folders from the underlyingelement
.- Since:
- 3.0
-
canChangePermission
boolean canChangePermission()Returnstrue
if the current user is allowed to change permissions of the underlyingelement
.- Returns:
true
if the current user is allowed to change permissions of the underlyingelement
.- Since:
- 3.0
-
canRelease
boolean canRelease()Returnstrue
if the current user is allowed to release the underlyingelement
.- Returns:
true
if the current user is allowed to release the underlyingelement
.- Since:
- 3.0
-
canMetaSee
boolean canMetaSee()Returnstrue
if the current user is allowed to see meta data of the underlyingelement
.- Returns:
true
if the current user is allowed to see meta data of the underlyingelement
.- Since:
- 3.1.158
-
canMetaChange
boolean canMetaChange()Returnstrue
if the current user is allowed to change meta data of the underlyingelement
.- Returns:
true
if the current user is allowed to change meta data of the underlyingelement
.- Since:
- 3.1.158
-
getStoreElement
StoreElement getStoreElement()Returns the underlying element.- Returns:
- The underlying element.
- Since:
- 3.0
-
clone
Object clone()- Since:
- 3.0.7
-
addPermissionListener
Adds the givenpermission listener
to be notified on permission change events.- Parameters:
permissionListener
- The listener to be notified.- Since:
- 3.0.7
-
removePermissionListener
Removes the givenpermission listener
.- Parameters:
permissionListener
- The listener to be removed.- Since:
- 3.0.7
-