Class CompositePattern
java.lang.Object
org.apache.jackrabbit.oak.spi.security.authorization.restriction.CompositePattern
- All Implemented Interfaces:
RestrictionPattern
Aggregates of a list of
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.-
Field Summary
Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RestrictionPatterncreate(@NotNull List<RestrictionPattern> patterns) booleanmatches()Returnstrueif the underlying restriction matches for repository level permissions.booleanReturnstrueif the underlying restriction matches the specified path.booleanReturnstrueif the underlying restriction matches the specified path and item type.booleanmatches(@NotNull org.apache.jackrabbit.oak.api.Tree tree, @Nullable org.apache.jackrabbit.oak.api.PropertyState property) Returnstrueif the underlying restriction matches the specified tree or property state.
-
Constructor Details
-
CompositePattern
-
-
Method Details
-
create
-
matches
public boolean matches(@NotNull @NotNull org.apache.jackrabbit.oak.api.Tree tree, @Nullable @Nullable org.apache.jackrabbit.oak.api.PropertyState property) Description copied from interface:RestrictionPatternReturnstrueif the underlying restriction matches the specified tree or property state.- Specified by:
matchesin interfaceRestrictionPattern- Parameters:
tree- The target tree or the parent of the target property.property- The target property state ornullif the target item is a tree.- Returns:
trueif the underlying restriction matches the specified tree or property state;falseotherwise.
-
matches
Description copied from interface:RestrictionPatternReturnstrueif the underlying restriction matches the specified path. Note, that if the nature of the item atpathis knowRestrictionPattern.matches(String, boolean)should be called instead.- Specified by:
matchesin interfaceRestrictionPattern- Parameters:
path- The path of the target item.- Returns:
trueif the underlying restriction matches the specified path;falseotherwise.
-
matches
Description copied from interface:RestrictionPatternReturnstrueif the underlying restriction matches the specified path and item type. If the nature of the item atpathis unknownRestrictionPattern.matches(String)should be called instead. Note, for backwards compatibility this method comes with a default implementation making it equivalent toRestrictionPattern.matches(String). Implementations of theRestrictionPatterninterface should overwrite the default if the underlying restriction applies different behavior for nodes and properties.- Specified by:
matchesin interfaceRestrictionPattern- Parameters:
path- The path of the target item.isProperty- Iftruethe target item is known to be a property, otherwise it is known to be a node.- Returns:
trueif the underlying restriction matches the specified path and item type;falseotherwise.
-
matches
public boolean matches()Description copied from interface:RestrictionPatternReturnstrueif the underlying restriction matches for repository level permissions.- Specified by:
matchesin interfaceRestrictionPattern- Returns:
trueif the underlying restriction matches for repository level permissions that are not associated with a path or a dedicated item;falseotherwise.
-