Interface RestrictionPattern
- All Known Implementing Classes:
CompositePattern
public interface RestrictionPattern
Interface used to verify if a given
restriction applies to a given
item or path.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RestrictionPatternDefault implementation of theRestrictionPatternthat always returnstrueand thus matches all items or paths. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches()Returnstrueif the underlying restriction matches for repository level permissions.booleanReturnstrueif the underlying restriction matches the specified path.default 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.
-
Field Details
-
EMPTY
Default implementation of theRestrictionPatternthat always returnstrueand thus matches all items or paths.
-
-
Method Details
-
matches
boolean matches(@NotNull @NotNull org.apache.jackrabbit.oak.api.Tree tree, @Nullable @Nullable org.apache.jackrabbit.oak.api.PropertyState property) Returnstrueif the underlying restriction matches the specified tree or property state.- 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
Returnstrueif the underlying restriction matches the specified path. Note, that if the nature of the item atpathis knowmatches(String, boolean)should be called instead.- Parameters:
path- The path of the target item.- Returns:
trueif the underlying restriction matches the specified path;falseotherwise.
-
matches
Returnstrueif the underlying restriction matches the specified path and item type. If the nature of the item atpathis unknownmatches(String)should be called instead. Note, for backwards compatibility this method comes with a default implementation making it equivalent tomatches(String). Implementations of theRestrictionPatterninterface should overwrite the default if the underlying restriction applies different behavior for nodes and properties.- 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.- Since:
- OAK 1.42.0
-
matches
boolean matches()Returnstrueif the underlying restriction matches for repository level permissions.- Returns:
trueif the underlying restriction matches for repository level permissions that are not associated with a path or a dedicated item;falseotherwise.
-