public final class PolicyVersionPatterns extends Object
Modifier and Type | Field and Description |
---|---|
static PolicyVersionPattern |
WILDCARD
Wildcard pattern, i.e.
|
Constructor and Description |
---|
PolicyVersionPatterns(String versionMatch,
String earliestMatch,
String latestMatch)
Creates a
VersionConstraints with the three optional
constraint strings. |
Modifier and Type | Method and Description |
---|---|
Optional<PolicyVersionPattern> |
getEarliestVersionPattern()
Get EarliestVersion pattern: matching expression for the earliest
acceptable version
|
Optional<PolicyVersionPattern> |
getLatestVersionPattern()
Get LatestVersion pattern: matching expression for the latest acceptable
version
|
Optional<PolicyVersionPattern> |
getVersionPattern()
Get Version pattern:
|
boolean |
matchEarliestVersion(PolicyVersion version)
Check version against EarliestVersion pattern
|
boolean |
matchLatestVersion(PolicyVersion version)
Check version against LatestVersion pattern
|
boolean |
matchVersion(PolicyVersion version)
Check version against Version pattern
|
String |
toString() |
public static final PolicyVersionPattern WILDCARD
public PolicyVersionPatterns(String versionMatch, String earliestMatch, String latestMatch) throws IllegalArgumentException
VersionConstraints
with the three optional
constraint strings. Each of the three strings must conform to the
VersionMatchType type defined in the XACML schema. Any of the strings may
be null to specify that the given constraint is not used.versionMatch
- matching expression for the version; or null if noneearliestMatch
- matching expression for the earliest acceptable version; or
null if nonelatestMatch
- matching expression for the earliest acceptable version; or
null if noneIllegalArgumentException
- if one of the match expressions is invalidpublic boolean matchLatestVersion(PolicyVersion version)
version
- input version to be checkedpublic boolean matchEarliestVersion(PolicyVersion version)
version
- input version to be checkedpublic boolean matchVersion(PolicyVersion version)
version
- input version to be checkedpublic Optional<PolicyVersionPattern> getVersionPattern()
public Optional<PolicyVersionPattern> getEarliestVersionPattern()
public Optional<PolicyVersionPattern> getLatestVersionPattern()
Copyright © 2012–2020. All rights reserved.