public interface RestrictionProvider
Modifier and Type | Field and Description |
---|---|
static RestrictionProvider |
EMPTY
Empty restriction provider implementation that doesn't support any
restrictions.
|
Modifier and Type | Method and Description |
---|---|
@NotNull Restriction |
createRestriction(@Nullable java.lang.String oakPath,
@NotNull java.lang.String oakName,
Value... values)
Creates a new multi valued restriction for the specified parameters.
|
@NotNull Restriction |
createRestriction(@Nullable java.lang.String oakPath,
@NotNull java.lang.String oakName,
@NotNull Value value)
Creates a new single valued restriction for the specified parameters.
|
@NotNull RestrictionPattern |
getPattern(@Nullable java.lang.String oakPath,
@NotNull java.util.Set<Restriction> restrictions)
Creates the
RestrictionPattern for the specified restrictions. |
@NotNull RestrictionPattern |
getPattern(@Nullable java.lang.String oakPath,
@NotNull Tree tree)
Creates the
RestrictionPattern for the restriction information
stored with specified tree. |
@NotNull java.util.Set<RestrictionDefinition> |
getSupportedRestrictions(@Nullable java.lang.String oakPath)
Returns the restriction definitions supported by this provider implementation
at the specified path.
|
@NotNull java.util.Set<Restriction> |
readRestrictions(@Nullable java.lang.String oakPath,
@NotNull Tree aceTree)
Read the valid restrictions stored in the specified ACE tree.
|
void |
validateRestrictions(@Nullable java.lang.String oakPath,
@NotNull Tree aceTree)
Validate the restrictions present with the specified ACE tree.
|
void |
writeRestrictions(java.lang.String oakPath,
Tree aceTree,
java.util.Set<Restriction> restrictions)
Writes the given restrictions to the specified ACE tree.
|
static final RestrictionProvider EMPTY
@NotNull @NotNull java.util.Set<RestrictionDefinition> getSupportedRestrictions(@Nullable @Nullable java.lang.String oakPath)
oakPath
- The path of the access controlled tree. A null
path indicates that the supported restrictions for repository level
policies should be returned.@NotNull @NotNull Restriction createRestriction(@Nullable @Nullable java.lang.String oakPath, @NotNull @NotNull java.lang.String oakName, @NotNull @NotNull Value value) throws AccessControlException, RepositoryException
oakPath
- The path of the access controlled tree or null
if
the target policies applies to the repository level.oakName
- The name of the restriction.value
- The value of the restriction.AccessControlException
- If no matching restriction definition
exists for the specified parameters.RepositoryException
- If another error occurs.@NotNull @NotNull Restriction createRestriction(@Nullable @Nullable java.lang.String oakPath, @NotNull @NotNull java.lang.String oakName, @NotNull Value... values) throws AccessControlException, RepositoryException
oakPath
- The path of the access controlled tree or null
if
the target policies applies to the repository level.oakName
- The name of the restriction.values
- The values of the restriction.AccessControlException
- If no matching restriction definition
exists for the specified parameters.RepositoryException
- If another error occurs.@NotNull @NotNull java.util.Set<Restriction> readRestrictions(@Nullable @Nullable java.lang.String oakPath, @NotNull @NotNull Tree aceTree)
oakPath
- The path of the access controlled tree or null
if
the target policies applies to the repository level.aceTree
- The tree corresponding to an ACE that may contain
restrictions.void writeRestrictions(java.lang.String oakPath, Tree aceTree, java.util.Set<Restriction> restrictions) throws RepositoryException
validateRestrictions(String, org.apache.jackrabbit.oak.api.Tree)
).oakPath
- The path of the access controlled tree or null
if
the target policies applies to the repository level.aceTree
- The tree corresponding to an ACE that will have the
specified restrictions added.restrictions
- The set of restrictions to be written to the specified
tree.RepositoryException
- If an error occurs while writing the
restrictions.void validateRestrictions(@Nullable @Nullable java.lang.String oakPath, @NotNull @NotNull Tree aceTree) throws AccessControlException, RepositoryException
oakPath
- The path of the access controlled tree or null
if
the target policies applies to the repository level.aceTree
- The tree corresponding to an ACE.AccessControlException
- If any invalid restrictions are detected.RepositoryException
- If another error occurs.@NotNull @NotNull RestrictionPattern getPattern(@Nullable @Nullable java.lang.String oakPath, @NotNull @NotNull Tree tree)
RestrictionPattern
for the restriction information
stored with specified tree.oakPath
- The path of the access controlled tree or null
if
the target policies applies to the repository level.tree
- The tree holding the restriction information.RestrictionPattern
representing the restriction
information present with the given tree.@NotNull @NotNull RestrictionPattern getPattern(@Nullable @Nullable java.lang.String oakPath, @NotNull @NotNull java.util.Set<Restriction> restrictions)
RestrictionPattern
for the specified restrictions.
The implementation should ignore all restrictions present in the specified
set that it doesn't support.oakPath
- The path of the access controlled tree or null
if
the target policies applies to the repository level.restrictions
- the restrictions.RestrictionPattern
representing those restrictions
of the specified set that are supported by this implementation.Copyright © 2010 - 2023 Adobe. All Rights Reserved