java.lang.Object
com.sun.xacml.cond.FunctionBase
com.sun.xacml.cond.BagFunction
com.sun.xacml.cond.GeneralBagFunction
- All Implemented Interfaces:
- Function
- public class GeneralBagFunction
- extends BagFunction
Specific BagFunction
class that supports all of the
general-purpose bag functions: type-one-and-only, type-bag-size, and
type-bag.
- Since:
- 1.2
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID_BASE_ONE_AND_ONLY
private static final int ID_BASE_ONE_AND_ONLY
- See Also:
- Constant Field Values
ID_BASE_BAG_SIZE
private static final int ID_BASE_BAG_SIZE
- See Also:
- Constant Field Values
ID_BASE_BAG
private static final int ID_BASE_BAG
- See Also:
- Constant Field Values
paramMap
private static java.util.HashMap paramMap
supportedIds
private static java.util.Set supportedIds
GeneralBagFunction
public GeneralBagFunction(java.lang.String functionName)
- Constructor that is used to create one of the general-purpose standard
bag functions. The name supplied must be one of the standard XACML
functions supported by this class, including the full namespace,
otherwise an exception is thrown. Look in
BagFunction
for details about the supported names.
GeneralBagFunction
public GeneralBagFunction(java.lang.String functionName,
java.lang.String datatype,
java.lang.String functionType)
- Constructor that is used to create instances of general-purpose bag
functions for new (non-standard) datatypes. This is equivalent to
using the
getInstance
methods in BagFunction
and is generally only used by the run-time configuration code.
getId
private static int getId(java.lang.String functionName)
- Private helper that returns the internal identifier used for the
given standard function.
getArgumentType
private static java.lang.String getArgumentType(java.lang.String functionName)
- Private helper that returns the argument 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.
getIsBag
private static boolean getIsBag(java.lang.String functionName)
- Private helper that returns if the given standard function takes
a bag. 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.
getNumArgs
private static int getNumArgs(java.lang.String functionName)
- Private helper that returns the argument count 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.
getReturnsBag
private static boolean getReturnsBag(java.lang.String functionName)
- Private helper that returns if the return type is a bag 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.
getCustomReturnType
private static java.lang.String getCustomReturnType(java.lang.String functionType,
java.lang.String datatype)
- Private helper used by the custom datatype constructor to figure out
what the return type is. 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.