public interface AggregatedPermissionProvider extends PermissionProvider
PermissionProvider
interface that allows it to be
used in combination with other provider implementations.Modifier and Type | Method and Description |
---|---|
@NotNull TreePermission |
getTreePermission(@NotNull Tree tree,
@NotNull TreeType type,
@NotNull TreePermission parentPermission)
Return the
TreePermission for the set of Principal s associated
with this provider at the specified tree with the given type . |
boolean |
isGranted(@NotNull TreeLocation location,
long permissions)
Test if the specified permissions are granted for the set of
Principal s
associated with this provider instance for the item identified by the
given location and optionally property. |
long |
supportedPermissions(@NotNull TreeLocation location,
long permissions)
Allows to determined the set or subset of permissions evaluated by the
implementing permission provider for the specified location.
|
long |
supportedPermissions(@NotNull TreePermission treePermission,
@Nullable PropertyState property,
long permissions)
Allows to determined the set or subset of permissions evaluated by the
implementing permission provider for the specified tree permission (plus
optionally
property ). |
long |
supportedPermissions(@Nullable Tree tree,
@Nullable PropertyState property,
long permissions)
Allows to determined the set or subset of permissions evaluated by the
implementing permission provider for the specified item (identified by
tree and optionally property ) or at the repository level
in case the specified tree is null . |
@NotNull PrivilegeBits |
supportedPrivileges(@Nullable Tree tree,
@Nullable PrivilegeBits privilegeBits)
Allows to determined the set or subset of privileges evaluated by the
implementing permission provider for the specified tree or at the repository
level in case the specified
tree is null . |
getPrivileges, getRepositoryPermission, getTreePermission, hasPrivileges, isGranted, isGranted, refresh
@NotNull @NotNull PrivilegeBits supportedPrivileges(@Nullable @Nullable Tree tree, @Nullable @Nullable PrivilegeBits privilegeBits)
tree
is null
.
If the given privilegeBits
is null
an implementation returns
the complete set that is covered by the provider; otherwise the supported
subset of the specified privilegeBits
is returned.
Returning PrivilegeBits.EMPTY
indicates that this implementation
is not in charge of evaluating the specified privileges and thus will
be ignored while computing the composite result of
PermissionProvider.getPrivileges(org.apache.jackrabbit.oak.api.Tree)
or PermissionProvider.hasPrivileges(org.apache.jackrabbit.oak.api.Tree, String...)
.tree
- The tree for which the privileges will be evaluated or null
for repository level privileges.privilegeBits
- The privilege(s) to be tested or null
privilegeBits
that are supported and evaluated by the implementation at the given tree
represented as PrivilegeBits
.long supportedPermissions(@Nullable @Nullable Tree tree, @Nullable @Nullable PropertyState property, long permissions)
tree
and optionally property
) or at the repository level
in case the specified tree
is null
.
Returning Permissions.NO_PERMISSION
indicates that this implementation
is not in charge of evaluating the specified permissions for the
specified item and thus will be ignored while computing the composite
result of PermissionProvider.isGranted(Tree, PropertyState, long)
.tree
- The tree for which the permissions will be evaluated or null
for repository level privileges.property
- The target property or null
.permissions
- The permisisons to be testedpermissions
that are supported and
evaluated by the implementation for the given item.long supportedPermissions(@NotNull @NotNull TreeLocation location, long permissions)
Permissions.NO_PERMISSION
indicates that this implementation
is not in charge of evaluating the specified permissions for the
specified location and thus will be ignored while computing the composite
result of PermissionProvider.isGranted(String, String)
and
isGranted(TreeLocation, long)
.location
- The tree location for which the permissions will be evaluated.permissions
- The permisisons to be testedpermissions
that are supported and
evaluated by the implementation for the given location.long supportedPermissions(@NotNull @NotNull TreePermission treePermission, @Nullable @Nullable PropertyState property, long permissions)
property
).
Returning Permissions.NO_PERMISSION
indicates that this implementation
is not in charge of evaluating the specified permissions for the
specified tree permission and thus will be ignored while computing the composite
result of TreePermission.isGranted(long, PropertyState)
and TreePermission.isGranted(long)
.treePermission
- The target tree permission.property
- The target property or null
.permissions
- The permisisons to be testedpermissions
that are supported and
evaluated by the implementation for the given tree permissions.boolean isGranted(@NotNull @NotNull TreeLocation location, long permissions)
Principal
s
associated with this provider instance for the item identified by the
given location
and optionally property. This method will only return true
if all permissions are granted.location
- The TreeLocation
to test the permissions for.permissions
- The permissions to be tested.true
if the specified permissions are granted for the existing
or non-existing item identified by the given location.@NotNull @NotNull TreePermission getTreePermission(@NotNull @NotNull Tree tree, @NotNull @NotNull TreeType type, @NotNull @NotNull TreePermission parentPermission)
TreePermission
for the set of Principal
s associated
with this provider at the specified tree
with the given type
.tree
- The tree for which the TreePermission
object should be built.type
- The type of this tree.parentPermission
- The TreePermission
object that has been
obtained before for the parent tree.TreePermission
object for the specified tree
.Copyright © 2010 - 2023 Adobe. All Rights Reserved