Interface Permission

All Superinterfaces:
Cloneable

public interface Permission extends 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 Details

    • CAN_SEE

      static final int CAN_SEE
      Tree visibility permission flag.
      Since:
      3.0
      See Also:
    • CAN_READ

      static final int CAN_READ
      Data read permission flag.
      Since:
      3.0
      See Also:
    • CAN_CHANGE

      static final int CAN_CHANGE
      Data change permission flag.
      Since:
      3.0
      See Also:
    • CAN_APPEND_FOLDER

      static final int CAN_APPEND_FOLDER
      Append (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_LEAF
      Append (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_FOLDER
      Delete 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_LEAF
      Delete 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_PERMISSION
      Permission to change permissions.
      Since:
      3.0
      See Also:
    • CAN_RELEASE

      static final int CAN_RELEASE
      Releas node permission flag.
      Since:
      3.0
      See Also:
    • CAN_META_SEE

      static final int CAN_META_SEE
      Meta data visibility (and read) permission flag.
      Since:
      3.0
      See Also:
    • CAN_META_CHANGE

      static final int CAN_META_CHANGE
      Meta data change permission flag.
      Since:
      3.0
      See Also:
    • CAN_EVERYTHING

      static final int CAN_EVERYTHING
      Combination of all permission flags (sum or bitwise or).
      Since:
      3.0
      See Also:
    • PROJECT_ADMIN_PERMISSIONS

      static final int PROJECT_ADMIN_PERMISSIONS
      Combination of permission flags for project admins.
      Since:
      3.0.81
      See Also:
    • PERMISSIONS

      static final int[] PERMISSIONS
      A summary of all permissions.
      Since:
      3.0
  • Method Details

    • allow

      Permission allow(int p)
      Grants the given permission.
      Returns:
      This permission object.
      Since:
      3.0
    • forbid

      Permission forbid(int p)
      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()
      Returns true if the current user is allowed to see the underlying element.
      Returns:
      true if the current user is allowed to see the underlying element.
      Since:
      3.0
    • canRead

      boolean canRead()
      Returns true if the current user is allowed to read the underlying element.
      Returns:
      true if the current user is allowed to read the underlying element.
      Since:
      3.0
    • canChange

      boolean canChange()
      Returns true if the current user is allowed to change the underlying element.
      Returns:
      true if the current user is allowed to change the underlying element.
      Since:
      3.0
    • canAppendLeaf

      boolean canAppendLeaf()
      Returns true if the current user is allowed to append leaf elements to the underlying element.
      Returns:
      true if the current user is allowed to append leaf elements to the underlying element.
      Since:
      3.0
    • canAppendFolder

      boolean canAppendFolder()
      Returns true if the current user is allowed to append folders to the underlying element.
      Returns:
      true if the current user is allowed to append folders to the underlying element.
      Since:
      3.0
    • canDelete

      boolean canDelete()
      Returns true if the current user is allowed to delete the underlying element.
      Returns:
      true if the current user is allowed to delete the underlying element.
      Since:
      3.0.64
    • canDeleteLeaf

      boolean canDeleteLeaf()
      Returns true if the current user is allowed to delete leaf elements from the underlying element.
      Returns:
      true if the current user is allowed to delete leaf elements from the underlying element.
      Since:
      3.0
    • canDeleteFolder

      boolean canDeleteFolder()
      Returns true if the current user is allowed to delete folders from the underlying element.
      Returns:
      true if the current user is allowed to delete folders from the underlying element.
      Since:
      3.0
    • canChangePermission

      boolean canChangePermission()
      Returns true if the current user is allowed to change permissions of the underlying element.
      Returns:
      true if the current user is allowed to change permissions of the underlying element.
      Since:
      3.0
    • canRelease

      boolean canRelease()
      Returns true if the current user is allowed to release the underlying element.
      Returns:
      true if the current user is allowed to release the underlying element.
      Since:
      3.0
    • canMetaSee

      boolean canMetaSee()
      Returns true if the current user is allowed to see meta data of the underlying element.
      Returns:
      true if the current user is allowed to see meta data of the underlying element.
      Since:
      3.1.158
    • canMetaChange

      boolean canMetaChange()
      Returns true if the current user is allowed to change meta data of the underlying element.
      Returns:
      true if the current user is allowed to change meta data of the underlying element.
      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

      void addPermissionListener(PermissionListener permissionListener)
      Adds the given permission listener to be notified on permission change events.
      Parameters:
      permissionListener - The listener to be notified.
      Since:
      3.0.7
    • removePermissionListener

      void removePermissionListener(PermissionListener permissionListener)
      Removes the given permission listener.
      Parameters:
      permissionListener - The listener to be removed.
      Since:
      3.0.7