|
|||||||||
Home >> All >> com >> sun >> xacml >> [ cond overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
com.sun.xacml.cond
Class DateMathFunction

java.lang.Objectcom.sun.xacml.cond.FunctionBase
com.sun.xacml.cond.DateMathFunction
- All Implemented Interfaces:
- Function
- public class DateMathFunction
- extends FunctionBase
A class that implements several of the date math functions. They all take two arguments. The first is a DateTimeAttribute or a DateAttribute (as the case may be) and the second is a DayTimeDurationAttribute or a YearMonthDurationAttribute (as the case may be). The function adds or subtracts the second argument to/from the first and returns a value of the same type as the first argument. If either of the arguments evaluates to indeterminate, an indeterminate result is returned.
- Since:
- 1.0
Field Summary | |
private java.lang.String[] |
argTypes
|
private static boolean[] |
bagParams
|
private static java.lang.String[] |
dateTimeDayTimeDurationArgTypes
|
private static java.lang.String[] |
dateTimeYearMonthDurationArgTypes
|
private static java.lang.String[] |
dateYearMonthDurationArgTypes
|
private static int |
ID_DATE_ADD_YEARMONTHDURATION
|
private static int |
ID_DATE_SUBTRACT_YEARMONTHDURATION
|
private static int |
ID_DATETIME_ADD_DAYTIMEDURATION
|
private static int |
ID_DATETIME_ADD_YEARMONTHDURATION
|
private static int |
ID_DATETIME_SUBTRACT_DAYTIMEDURATION
|
private static int |
ID_DATETIME_SUBTRACT_YEARMONTHDURATION
|
private static java.util.HashMap |
idMap
|
static java.lang.String |
NAME_DATE_ADD_YEARMONTHDURATION
Standard identifier for the date-add-yearMonthDuration function. |
static java.lang.String |
NAME_DATE_SUBTRACT_YEARMONTHDURATION
Standard identifier for the date-subtract-yearMonthDuration function. |
static java.lang.String |
NAME_DATETIME_ADD_DAYTIMEDURATION
Standard identifier for the dateTime-add-dayTimeDuration function. |
static java.lang.String |
NAME_DATETIME_ADD_YEARMONTHDURATION
Standard identifier for the dateTime-add-yearMonthDuration function. |
static java.lang.String |
NAME_DATETIME_SUBTRACT_DAYTIMEDURATION
Standard identifier for the dateTime-subtract-dayTimeDuration function. |
static java.lang.String |
NAME_DATETIME_SUBTRACT_YEARMONTHDURATION
Standard identifier for the dateTime-subtract-yearMonthDuration function. |
private static java.util.HashMap |
typeMap
|
Fields inherited from class com.sun.xacml.cond.FunctionBase |
FUNCTION_NS |
Constructor Summary | |
DateMathFunction(java.lang.String functionName)
Creates a new DateMathFunction object. |
Method Summary | |
EvaluationResult |
evaluate(java.util.List inputs,
com.sun.xacml.EvaluationCtx context)
Evaluate the function, using the specified parameters. |
private static java.lang.String[] |
getArgumentTypes(java.lang.String functionName)
Private helper that returns the types used for the given standard function. |
private static int |
getId(java.lang.String functionName)
Private helper that returns the internal identifier used for the given standard function. |
private static java.lang.String |
getReturnType(java.lang.String functionName)
Private helper that returns the return type for the given standard function. |
static java.util.Set |
getSupportedIdentifiers()
Returns a Set containing all the function identifiers
supported by this class. |
Methods inherited from class com.sun.xacml.cond.FunctionBase |
checkInputs, checkInputsNoBag, evalArgs, getFunctionId, getFunctionName, getIdentifier, getReturnType, getReturnTypeAsString, makeProcessingError, returnsBag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
NAME_DATETIME_ADD_DAYTIMEDURATION
public static final java.lang.String NAME_DATETIME_ADD_DAYTIMEDURATION
- Standard identifier for the dateTime-add-dayTimeDuration function.
- See Also:
- Constant Field Values
NAME_DATETIME_SUBTRACT_DAYTIMEDURATION
public static final java.lang.String NAME_DATETIME_SUBTRACT_DAYTIMEDURATION
- Standard identifier for the dateTime-subtract-dayTimeDuration function.
- See Also:
- Constant Field Values
NAME_DATETIME_ADD_YEARMONTHDURATION
public static final java.lang.String NAME_DATETIME_ADD_YEARMONTHDURATION
- Standard identifier for the dateTime-add-yearMonthDuration function.
- See Also:
- Constant Field Values
NAME_DATETIME_SUBTRACT_YEARMONTHDURATION
public static final java.lang.String NAME_DATETIME_SUBTRACT_YEARMONTHDURATION
- Standard identifier for the dateTime-subtract-yearMonthDuration
function.
- See Also:
- Constant Field Values
NAME_DATE_ADD_YEARMONTHDURATION
public static final java.lang.String NAME_DATE_ADD_YEARMONTHDURATION
- Standard identifier for the date-add-yearMonthDuration function.
- See Also:
- Constant Field Values
NAME_DATE_SUBTRACT_YEARMONTHDURATION
public static final java.lang.String NAME_DATE_SUBTRACT_YEARMONTHDURATION
- Standard identifier for the date-subtract-yearMonthDuration function.
- See Also:
- Constant Field Values
ID_DATETIME_ADD_DAYTIMEDURATION
private static final int ID_DATETIME_ADD_DAYTIMEDURATION
- See Also:
- Constant Field Values
ID_DATETIME_SUBTRACT_DAYTIMEDURATION
private static final int ID_DATETIME_SUBTRACT_DAYTIMEDURATION
- See Also:
- Constant Field Values
ID_DATETIME_ADD_YEARMONTHDURATION
private static final int ID_DATETIME_ADD_YEARMONTHDURATION
- See Also:
- Constant Field Values
ID_DATETIME_SUBTRACT_YEARMONTHDURATION
private static final int ID_DATETIME_SUBTRACT_YEARMONTHDURATION
- See Also:
- Constant Field Values
ID_DATE_ADD_YEARMONTHDURATION
private static final int ID_DATE_ADD_YEARMONTHDURATION
- See Also:
- Constant Field Values
ID_DATE_SUBTRACT_YEARMONTHDURATION
private static final int ID_DATE_SUBTRACT_YEARMONTHDURATION
- See Also:
- Constant Field Values
dateTimeDayTimeDurationArgTypes
private static final java.lang.String[] dateTimeDayTimeDurationArgTypes
dateTimeYearMonthDurationArgTypes
private static final java.lang.String[] dateTimeYearMonthDurationArgTypes
dateYearMonthDurationArgTypes
private static final java.lang.String[] dateYearMonthDurationArgTypes
bagParams
private static final boolean[] bagParams
argTypes
private java.lang.String[] argTypes
idMap
private static java.util.HashMap idMap
typeMap
private static java.util.HashMap typeMap
Constructor Detail |
DateMathFunction
public DateMathFunction(java.lang.String functionName)
- Creates a new
DateMathFunction
object.
Method Detail |
getId
private static int getId(java.lang.String functionName)
- Private helper that returns the internal identifier used for the
given standard function.
getArgumentTypes
private static java.lang.String[] getArgumentTypes(java.lang.String functionName)
- Private helper that returns the types used for the given standard
function. Note that this doesn't check on the return value since the
method always is called after getId, so we assume that the function
is present.
getReturnType
private static java.lang.String getReturnType(java.lang.String functionName)
- Private helper that returns the return type for the given standard
function. Note that this doesn't check on the return value since the
method always is called after getId, so we assume that the function
is present.
getSupportedIdentifiers
public static java.util.Set getSupportedIdentifiers()
- Returns a
Set
containing all the function identifiers supported by this class.
evaluate
public EvaluationResult evaluate(java.util.List inputs, com.sun.xacml.EvaluationCtx context)
- Evaluate the function, using the specified parameters.
|
|||||||||
Home >> All >> com >> sun >> xacml >> [ cond overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |