Class CompositePattern
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authorization.restriction.CompositePattern
-
- All Implemented Interfaces:
RestrictionPattern
public final class CompositePattern extends java.lang.Object implements RestrictionPattern
Aggregates of a list ofRestrictionPatterns into a single pattern. The implementations ofmatchesreturnstrueif all aggregated patterns successfully validate the given parameters and returnsfalseas soon as the first aggregated pattern returnsfalse.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionPattern
EMPTY
-
-
Constructor Summary
Constructors Constructor Description CompositePattern(@NotNull java.util.List<RestrictionPattern> patterns)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RestrictionPatterncreate(@NotNull java.util.List<RestrictionPattern> patterns)booleanmatches()Returnstrueif the underlying restriction matches for repository level permissions.booleanmatches(@NotNull java.lang.String path)Returnstrueif the underlying restriction matches the specified path.booleanmatches(@NotNull Tree tree, @Nullable PropertyState property)Returnstrueif the underlying restriction matches the specified tree or property state.
-
-
-
Constructor Detail
-
CompositePattern
public CompositePattern(@NotNull @NotNull java.util.List<RestrictionPattern> patterns)
-
-
Method Detail
-
create
public static RestrictionPattern create(@NotNull @NotNull java.util.List<RestrictionPattern> patterns)
-
matches
public boolean matches(@NotNull @NotNull Tree tree, @Nullable @Nullable 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
public boolean matches(@NotNull @NotNull java.lang.String path)Description copied from interface:RestrictionPatternReturnstrueif the underlying restriction matches the specified path.- Specified by:
matchesin interfaceRestrictionPattern- Parameters:
path- The path of the target item.- Returns:
trueif the underlying restriction matches the specified path;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.
-
-