public interface TreePermission
TreePermission
allow to evaluate permissions defined for a given
Tree
and it's properties.Modifier and Type | Field and Description |
---|---|
static TreePermission |
ALL
TreePermission which always returns true and thus grants
all permissions. |
static TreePermission |
EMPTY
TreePermission which always returns false not granting
any permissions. |
static TreePermission |
NO_RECOURSE |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
Return if read access is granted for the
Tree associated with
this TreePermission instance. |
boolean |
canRead(@NotNull PropertyState property)
Return if read access is granted for the property of the
Tree for
which this TreePermission instance has been created. |
boolean |
canReadAll()
Returns
true if read access is granted to the Tree associated
with this instance and the whole subtree defined by it including all
properties. |
boolean |
canReadProperties()
Returns
true if all properties of the Tree associated with
this instance can be read. |
@NotNull TreePermission |
getChildPermission(@NotNull java.lang.String childName,
@NotNull NodeState childState)
Retrieve the
TreePermission for the tree identified by the specified
childName and childState , which is a child of the tree
associated with this instanceof TreePermission . |
boolean |
isGranted(long permissions)
Returns
true if all specified permissions are granted on the
Tree associated with this TreePermission instance;
false otherwise. |
boolean |
isGranted(long permissions,
@NotNull PropertyState property)
Returns
true if all specified permissions are granted on the
PropertyState associated with this TreePermission instance;
false otherwise. |
static final TreePermission EMPTY
TreePermission
which always returns false
not granting
any permissions.static final TreePermission ALL
TreePermission
which always returns true
and thus grants
all permissions.static final TreePermission NO_RECOURSE
@NotNull @NotNull TreePermission getChildPermission(@NotNull @NotNull java.lang.String childName, @NotNull @NotNull NodeState childState)
TreePermission
for the tree identified by the specified
childName
and childState
, which is a child of the tree
associated with this instanceof TreePermission
.childName
- The oak name of the child.childState
- The child state.childName
and childState
.boolean canRead()
Tree
associated with
this TreePermission
instance.true
if the tree associated with this instance can be
read; false
otherwise.boolean canRead(@NotNull @NotNull PropertyState property)
Tree
for
which this TreePermission
instance has been created.property
- The property to be tested for read access.true
If the specified property can be read; false
otherwise.boolean canReadAll()
true
if read access is granted to the Tree
associated
with this instance and the whole subtree defined by it including all
properties. Note, that this includes access to items which require
specific read permissions such as e.g. Permissions.READ_ACCESS_CONTROL
.true
if the Tree
associated with this instance as
well as its properties and the whole subtree can be read; false
otherwise.boolean canReadProperties()
true
if all properties of the Tree
associated with
this instance can be read.true
if all properties of the Tree
associated with
this instance can be read; false
otherwise.boolean isGranted(long permissions)
true
if all specified permissions are granted on the
Tree
associated with this TreePermission
instance;
false
otherwise.permissions
- The permissions to be tested. Note, that the implementation
may restrict the set of valid permissions to those that can be set and
evaluated for trees.true
if all permissions are granted; false
otherwise.boolean isGranted(long permissions, @NotNull @NotNull PropertyState property)
true
if all specified permissions are granted on the
PropertyState
associated with this TreePermission
instance;
false
otherwise.permissions
- The permissions to be tested. Note, that the implementation
may restrict the set of valid permissions to those that can be set and
evaluated for properties.property
- The property state for which the permissions must be granted.true
if all permissions are granted; false
otherwise.Copyright © 2010 - 2023 Adobe. All Rights Reserved