Class PathSpecification
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<DomainSpecification>
-
- com.cloudbees.plugins.credentials.domains.DomainSpecification
-
- com.cloudbees.plugins.credentials.domains.PathSpecification
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<DomainSpecification>
,Serializable
public class PathSpecification extends DomainSpecification
ADomainSpecification
that matchesPathRequirement
s where the URI path is on a list of allowed paths.- Since:
- 1.12
- See Also:
- RFC-3986 Section 3.1, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PathSpecification.DescriptorImpl
OurDescriptor
.-
Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.domains.DomainSpecification
DomainSpecification.Result
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description PathSpecification(String includes, String excludes, boolean caseSensitive)
Constructor for stapler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getExcludes()
Returns the paths to explicitly not match.String
getIncludes()
Returns the paths to match.boolean
isCaseSensitive()
DomainSpecification.Result
test(DomainRequirement requirement)
Tests the scope against this specification.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
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 Detail
-
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 classDomainSpecification
- Parameters:
requirement
- the scope to test.- Returns:
- the result of the test.
-
-