|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.xacml.sunxacml.cond.FunctionBase
org.jboss.security.xacml.sunxacml.cond.TimeInRangeFunction
public class TimeInRangeFunction
This class implements the time-in-range function, which takes three time values and returns true if the first value falls between the second and the third value. This function was introduced in XACML 2.0.
Note that this function allows any time ranges less than 24 hours. In other words, it is not bound by normal day boundries (midnight GMT), but by the minimum time in the range. This means that ranges like 9am-5pm are supported, as are ranges like 5pm-9am.
Field Summary | |
---|---|
static long |
MILLIS_PER_DAY
The number of milliseconds in a day |
static long |
MILLIS_PER_MINUTE
The number of milliseconds in a minute |
static String |
NAME
The identifier for this function |
Fields inherited from class org.jboss.security.xacml.sunxacml.cond.FunctionBase |
---|
FUNCTION_NS, FUNCTION_NS_2 |
Constructor Summary | |
---|---|
TimeInRangeFunction()
Default constructor. |
Method Summary | |
---|---|
EvaluationResult |
evaluate(List inputs,
EvaluationCtx context)
Evaluates the time-in-range function, which takes three TimeAttribute values. |
Methods inherited from class org.jboss.security.xacml.sunxacml.cond.FunctionBase |
---|
checkInputs, checkInputsNoBag, encode, encode, evalArgs, getFunctionId, getFunctionName, getIdentifier, getReturnType, getReturnTypeAsString, getType, makeProcessingError, returnsBag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NAME
public static final long MILLIS_PER_MINUTE
public static final long MILLIS_PER_DAY
Constructor Detail |
---|
public TimeInRangeFunction()
Method Detail |
---|
public EvaluationResult evaluate(List inputs, EvaluationCtx context)
TimeAttribute
values. This function return true
if the first value falls between the second and third values
(ie., on or after the second time and on or before the third
time). If no time zone is specified for the second and/or third
time value, then the timezone from the first time value is
used. This lets you say time-in-range(current-time, 9am, 5pm)
and always have the evaluation happen in your current-time
timezone.
inputs
- a List
of Evaluatable
objects representing the arguments passed to the functioncontext
- the respresentation of the request
EvaluationResult
containing true or false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |