Interface AggregatedPermissionProvider
-
- All Superinterfaces:
PermissionProvider
public interface AggregatedPermissionProvider extends PermissionProvider
Extension of thePermissionProviderinterface that allows it to be used in combination with other provider implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull TreePermissiongetTreePermission(@NotNull Tree tree, @NotNull TreeType type, @NotNull TreePermission parentPermission)Return theTreePermissionfor the set ofPrincipals associated with this provider at the specifiedtreewith the giventype.booleanisGranted(@NotNull TreeLocation location, long permissions)Test if the specified permissions are granted for the set ofPrincipals associated with this provider instance for the item identified by the givenlocationand optionally property.longsupportedPermissions(@NotNull TreeLocation location, long permissions)Allows to determined the set or subset of permissions evaluated by the implementing permission provider for the specified location.longsupportedPermissions(@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 optionallyproperty).longsupportedPermissions(@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 bytreeand optionallyproperty) or at the repository level in case the specifiedtreeisnull.@NotNull PrivilegeBitssupportedPrivileges(@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 specifiedtreeisnull.-
Methods inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.permission.PermissionProvider
getPrivileges, getRepositoryPermission, getTreePermission, hasPrivileges, isGranted, isGranted, refresh
-
-
-
-
Method Detail
-
supportedPrivileges
@NotNull @NotNull PrivilegeBits supportedPrivileges(@Nullable @Nullable Tree tree, @Nullable @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 specifiedtreeisnull. If the givenprivilegeBitsisnullan implementation returns the complete set that is covered by the provider; otherwise the supported subset of the specifiedprivilegeBitsis returned. ReturningPrivilegeBits.EMPTYindicates that this implementation is not in charge of evaluating the specified privileges and thus will be ignored while computing the composite result ofPermissionProvider.getPrivileges(org.apache.jackrabbit.oak.api.Tree)orPermissionProvider.hasPrivileges(org.apache.jackrabbit.oak.api.Tree, String...).- Parameters:
tree- The tree for which the privileges will be evaluated ornullfor repository level privileges.privilegeBits- The privilege(s) to be tested ornull- Returns:
- The set of privileges or the subset of the given
privilegeBitsthat are supported and evaluated by the implementation at the giventreerepresented asPrivilegeBits.
-
supportedPermissions
long supportedPermissions(@Nullable @Nullable Tree tree, @Nullable @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 bytreeand optionallyproperty) or at the repository level in case the specifiedtreeisnull. ReturningPermissions.NO_PERMISSIONindicates 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 ofPermissionProvider.isGranted(Tree, PropertyState, long).- Parameters:
tree- The tree for which the permissions will be evaluated ornullfor repository level privileges.property- The target property ornull.permissions- The permissions to be tested- Returns:
- The subset of the given
permissionsthat are supported and evaluated by the implementation for the given item.
-
supportedPermissions
long supportedPermissions(@NotNull @NotNull TreeLocation location, long permissions)Allows to determined the set or subset of permissions evaluated by the implementing permission provider for the specified location. ReturningPermissions.NO_PERMISSIONindicates 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 ofPermissionProvider.isGranted(String, String)andisGranted(TreeLocation, long).- Parameters:
location- The tree location for which the permissions will be evaluated.permissions- The permissions to be tested- Returns:
- The subset of the given
permissionsthat are supported and evaluated by the implementation for the given location.
-
supportedPermissions
long supportedPermissions(@NotNull @NotNull TreePermission treePermission, @Nullable @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 optionallyproperty). ReturningPermissions.NO_PERMISSIONindicates 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 ofTreePermission.isGranted(long, PropertyState)andTreePermission.isGranted(long).- Parameters:
treePermission- The target tree permission.property- The target property ornull.permissions- The permissions to be tested- Returns:
- The subset of the given
permissionsthat are supported and evaluated by the implementation for the given tree permissions.
-
isGranted
boolean isGranted(@NotNull @NotNull TreeLocation location, long permissions)Test if the specified permissions are granted for the set ofPrincipals associated with this provider instance for the item identified by the givenlocationand optionally property. This method will only returntrueif all permissions are granted.- Parameters:
location- TheTreeLocationto test the permissions for.permissions- The permissions to be tested.- Returns:
trueif the specified permissions are granted for the existing or non-existing item identified by the given location.
-
getTreePermission
@NotNull @NotNull TreePermission getTreePermission(@NotNull @NotNull Tree tree, @NotNull @NotNull TreeType type, @NotNull @NotNull TreePermission parentPermission)
Return theTreePermissionfor the set ofPrincipals associated with this provider at the specifiedtreewith the giventype.- Parameters:
tree- The tree for which theTreePermissionobject should be built.type- The type of this tree.parentPermission- TheTreePermissionobject that has been obtained before for the parent tree.- Returns:
- The
TreePermissionobject for the specifiedtree.
-
-