Class PathSpecification

All Implemented Interfaces:
ExtensionPoint, Describable<DomainSpecification>, Serializable

public class PathSpecification extends DomainSpecification
A DomainSpecification that matches PathRequirements where the URI path is on a list of allowed paths.
Since:
1.12
See Also:
  • Constructor Details

    • PathSpecification

      @DataBoundConstructor public PathSpecification(@CheckForNull String includes, @CheckForNull String excludes, boolean caseSensitive)
      Constructor for stapler.
      Parameters:
      includes - Paths to match. A comma separated set of path with * wildcards supported. null signifies include everything.
      excludes - Paths to explicitly not match. A comma separated set of path with * wildcards supported. null signifies exclude nothing.
      caseSensitive - true if the path match should be case sensitive.
  • Method Details

    • getIncludes

      @CheckForNull public String getIncludes()
      Returns the paths to match. A whitespace separated set of path with * wildcards supported. null signifies include everything.
      Returns:
      the paths to match.
    • getExcludes

      @CheckForNull public String getExcludes()
      Returns the paths to explicitly not match. A comma separated set of path with * wildcards supported. null signifies include everything.
      Returns:
      the paths to explicitly not match.
    • isCaseSensitive

      public boolean isCaseSensitive()
    • test

      @NonNull public DomainSpecification.Result test(@NonNull DomainRequirement requirement)
      Tests the scope against this specification.
      Specified by:
      test in class DomainSpecification
      Parameters:
      requirement - the scope to test.
      Returns:
      the result of the test.