public final class CompositeRestrictionProvider extends java.lang.Object implements RestrictionProvider
RestrictionProvider
implementations
into a single provider.EMPTY
Modifier and Type | Method and Description |
---|---|
Restriction |
createRestriction(java.lang.String oakPath,
java.lang.String oakName,
Value... values)
Creates a new single valued restriction for the specified parameters.
|
Restriction |
createRestriction(java.lang.String oakPath,
java.lang.String oakName,
Value value)
Creates a new single valued restriction for the specified parameters.
|
RestrictionPattern |
getPattern(java.lang.String oakPath,
java.util.Set<Restriction> restrictions)
Creates the
RestrictionPattern for the specified restrictions. |
RestrictionPattern |
getPattern(java.lang.String oakPath,
Tree tree)
Creates the
RestrictionPattern for the restriction information
stored with specified tree. |
java.util.Set<RestrictionDefinition> |
getSupportedRestrictions(java.lang.String oakPath)
Returns the restriction definitions supported by this provider implementation
at the specified path.
|
static RestrictionProvider |
newInstance(java.util.Collection<? extends RestrictionProvider> providers) |
static RestrictionProvider |
newInstance(RestrictionProvider... providers) |
java.util.Set<Restriction> |
readRestrictions(java.lang.String oakPath,
Tree aceTree)
Read the valid restrictions stored in the specified ACE tree.
|
void |
validateRestrictions(java.lang.String oakPath,
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.
|
public static RestrictionProvider newInstance(RestrictionProvider... providers)
public static RestrictionProvider newInstance(java.util.Collection<? extends RestrictionProvider> providers)
public java.util.Set<RestrictionDefinition> getSupportedRestrictions(java.lang.String oakPath)
RestrictionProvider
getSupportedRestrictions
in interface RestrictionProvider
oakPath
- The path of the access controlled tree. A null
path indicates that the supported restrictions for repository level
policies should be returned.public Restriction createRestriction(java.lang.String oakPath, java.lang.String oakName, Value value) throws RepositoryException
RestrictionProvider
createRestriction
in interface RestrictionProvider
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.RepositoryException
- If another error occurs.public Restriction createRestriction(java.lang.String oakPath, java.lang.String oakName, Value... values) throws RepositoryException
RestrictionProvider
createRestriction
in interface RestrictionProvider
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 value of the restriction.RepositoryException
- If another error occurs.public java.util.Set<Restriction> readRestrictions(java.lang.String oakPath, Tree aceTree)
RestrictionProvider
readRestrictions
in interface RestrictionProvider
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.public void writeRestrictions(java.lang.String oakPath, Tree aceTree, java.util.Set<Restriction> restrictions) throws RepositoryException
RestrictionProvider
RestrictionProvider.validateRestrictions(String, org.apache.jackrabbit.oak.api.Tree)
).writeRestrictions
in interface RestrictionProvider
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.public void validateRestrictions(java.lang.String oakPath, Tree aceTree) throws RepositoryException
RestrictionProvider
validateRestrictions
in interface RestrictionProvider
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.RepositoryException
- If another error occurs.public RestrictionPattern getPattern(java.lang.String oakPath, Tree tree)
RestrictionProvider
RestrictionPattern
for the restriction information
stored with specified tree.getPattern
in interface RestrictionProvider
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.public RestrictionPattern getPattern(java.lang.String oakPath, java.util.Set<Restriction> restrictions)
RestrictionProvider
RestrictionPattern
for the specified restrictions.
The implementation should ignore all restrictions present in the specified
set that it doesn't support.getPattern
in interface RestrictionProvider
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 - 2020 Adobe Systems Incorporated. All Rights Reserved"