|
JBoss port of sunxacml 2.0.5-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.xacml.sunxacml.VersionConstraints
public class VersionConstraints
Supports the three version constraints that can be included with a policy reference. This class also provides a simple set of comparison methods for matching against the constraints. Note that this feature was introduced in XACML 2.0, which means that constraints are never used in pre-2.0 policy references.
Constructor Summary | |
---|---|
VersionConstraints(String version,
String earliest,
String latest)
Creates a VersionConstraints with the three optional
constraint strings. |
Method Summary | |
---|---|
String |
getEarliestConstraint()
Returns the lower-bound constraint string, which will be null if there is no lower-bound constraint on the version. |
String |
getLatestConstraint()
Returns the upper-bound constraint string, which will be null if there is no upper-bound constraint on the version. |
String |
getVersionConstraint()
Returns the matching constraint string, which will be null if there is no constraint on matching the version. |
static boolean |
isEarlier(String version,
String constraint)
Checks if the given version string is less-than or equal-to the constraint string. |
static boolean |
isLater(String version,
String constraint)
Checks if the given version string is greater-than or equal-to the constraint string. |
static boolean |
matches(String version,
String constraint)
Checks if the given version string matches the constraint string. |
boolean |
meetsConstraint(String version)
Checks if the given version string meets all three constraints. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VersionConstraints(String version, String earliest, String latest)
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.
version
- a matching constraint on the version or nullearliest
- a lower-bound constraint on the version or nulllatest
- an upper-bound constraint on the version or nullMethod Detail |
---|
public String getVersionConstraint()
public String getEarliestConstraint()
public String getLatestConstraint()
public boolean meetsConstraint(String version)
version
- the version to compare, which is formatted as a
VersionType XACML type
public static boolean matches(String version, String constraint)
version
- the version string to checkconstraint
- a constraint string to use in matching
public static boolean isEarlier(String version, String constraint)
version
- the version string to checkconstraint
- a constraint string to use in matching
public static boolean isLater(String version, String constraint)
version
- the version string to checkconstraint
- a constraint string to use in matching
|
JBoss port of sunxacml 2.0.5-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |