Class CompositePattern

  • All Implemented Interfaces:
    RestrictionPattern

    public final class CompositePattern
    extends java.lang.Object
    implements 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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static RestrictionPattern create​(@NotNull java.util.List<RestrictionPattern> patterns)  
      boolean matches()
      Returns true if the underlying restriction matches for repository level permissions.
      boolean matches​(@NotNull java.lang.String path)
      Returns true if the underlying restriction matches the specified path.
      boolean matches​(@NotNull Tree tree, @Nullable PropertyState property)
      Returns true if the underlying restriction matches the specified tree or property state.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CompositePattern

        public CompositePattern​(@NotNull
                                @NotNull java.util.List<RestrictionPattern> patterns)
    • Method Detail

      • matches

        public boolean matches​(@NotNull
                               @NotNull Tree tree,
                               @Nullable
                               @Nullable PropertyState property)
        Description copied from interface: RestrictionPattern
        Returns true if the underlying restriction matches the specified tree or property state.
        Specified by:
        matches in interface RestrictionPattern
        Parameters:
        tree - The target tree or the parent of the target property.
        property - The target property state or null if the target item is a tree.
        Returns:
        true if the underlying restriction matches the specified tree or property state; false otherwise.
      • matches

        public boolean matches​(@NotNull
                               @NotNull java.lang.String path)
        Description copied from interface: RestrictionPattern
        Returns true if the underlying restriction matches the specified path.
        Specified by:
        matches in interface RestrictionPattern
        Parameters:
        path - The path of the target item.
        Returns:
        true if the underlying restriction matches the specified path; false otherwise.
      • matches

        public boolean matches()
        Description copied from interface: RestrictionPattern
        Returns true if the underlying restriction matches for repository level permissions.
        Specified by:
        matches in interface RestrictionPattern
        Returns:
        true if the underlying restriction matches for repository level permissions that are not associated with a path or a dedicated item; false otherwise.