public final class CompositePattern extends Object implements RestrictionPattern
RestrictionPatterns into a single pattern.
The implementations of matches returns true if all aggregated
patterns successfully validate the given parameters and returns false
as soon as the first aggregated pattern returns false.EMPTY| Constructor and Description |
|---|
CompositePattern(List<RestrictionPattern> patterns) |
| Modifier and Type | Method and Description |
|---|---|
static RestrictionPattern |
create(List<RestrictionPattern> patterns) |
boolean |
matches()
Returns
true if the underlying restriction matches for repository
level permissions. |
boolean |
matches(String path)
Returns
true if the underlying restriction matches the specified
path. |
boolean |
matches(org.apache.jackrabbit.oak.api.Tree tree,
org.apache.jackrabbit.oak.api.PropertyState property)
Returns
true if the underlying restriction matches the specified
tree or property state. |
public CompositePattern(@Nonnull List<RestrictionPattern> patterns)
public static RestrictionPattern create(@Nonnull List<RestrictionPattern> patterns)
public boolean matches(@Nonnull org.apache.jackrabbit.oak.api.Tree tree, @Nullable org.apache.jackrabbit.oak.api.PropertyState property)
RestrictionPatterntrue if the underlying restriction matches the specified
tree or property state.matches in interface RestrictionPatterntree - The target tree or the parent of the target property.property - The target property state or null if the target
item is a tree.true if the underlying restriction matches the specified
tree or property state; false otherwise.public boolean matches(@Nonnull String path)
RestrictionPatterntrue if the underlying restriction matches the specified
path.matches in interface RestrictionPatternpath - The path of the target item.true if the underlying restriction matches the specified
path; false otherwise.public boolean matches()
RestrictionPatterntrue if the underlying restriction matches for repository
level permissions.matches in interface RestrictionPatterntrue if the underlying restriction matches for repository
level permissions that are not associated with a path or a dedicated item;
false otherwise.Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.