public abstract class AbstractRestrictionProvider extends Object implements RestrictionProvider
EMPTY
Constructor and Description |
---|
AbstractRestrictionProvider(Map<String,? extends RestrictionDefinition> definitions) |
Modifier and Type | Method and Description |
---|---|
Restriction |
createRestriction(String oakPath,
String oakName,
Value... values)
Creates a new single valued restriction for the specified parameters.
|
Restriction |
createRestriction(String oakPath,
String oakName,
Value value)
Creates a new single valued restriction for the specified parameters.
|
Set<RestrictionDefinition> |
getSupportedRestrictions(String oakPath)
Returns the restriction definitions supported by this provider implementation
at the specified path.
|
Set<Restriction> |
readRestrictions(String oakPath,
Tree aceTree)
Read the valid restrictions stored in the specified ACE tree.
|
void |
validateRestrictions(String oakPath,
Tree aceTree)
Validate the restrictions present with the specified ACE tree.
|
void |
writeRestrictions(String oakPath,
Tree aceTree,
Set<Restriction> restrictions)
Writes the given restrictions to the specified ACE tree.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPattern
public AbstractRestrictionProvider(Map<String,? extends RestrictionDefinition> definitions)
public Set<RestrictionDefinition> getSupportedRestrictions(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(String oakPath, 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(String oakPath, 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 Set<Restriction> readRestrictions(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(String oakPath, Tree aceTree, 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(String oakPath, Tree aceTree) throws AccessControlException
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.AccessControlException
- If any invalid restrictions are detected."Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"