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

      Fields 
      Modifier and Type Field Description
      static RestrictionPattern EMPTY
      Default implementation of the RestrictionPattern that always returns true and thus matches all items or paths.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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.
    • Field Detail

      • EMPTY

        static final RestrictionPattern EMPTY
        Default implementation of the RestrictionPattern that always returns true and thus matches all items or paths.
    • Method Detail

      • matches

        boolean matches​(@NotNull
                        @NotNull Tree tree,
                        @Nullable
                        @Nullable PropertyState property)
        Returns true if 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 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

        boolean matches​(@NotNull
                        @NotNull java.lang.String path)
        Returns true if the underlying restriction matches the specified path.
        Parameters:
        path - The path of the target item.
        Returns:
        true if the underlying restriction matches the specified path; false otherwise.
      • matches

        boolean matches()
        Returns true if the underlying restriction matches for repository level permissions.
        Returns:
        true if the underlying restriction matches for repository level permissions that are not associated with a path or a dedicated item; false otherwise.