|
JBoss port of sunxacml 2.0.8.Final-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.cond.FunctionBase
org.jboss.security.xacml.sunxacml.cond.NOfFunction
public class NOfFunction
A class that implements the n-of function. It requires at least one argument. The first argument must be an integer and the rest of the arguments must be booleans. If the number of boolean arguments that evaluate to true is at least the value of the first argument, the function returns true. Otherwise, it returns false (or indeterminate, as described in the next paragraph.
This function evaluates the arguments one at a time, starting with the first one. As soon as the result of the function can be determined, evaluation stops and that result is returned. During this process, if any argument evaluates to indeterminate, an indeterminate result is returned.
Field Summary | |
---|---|
static String |
NAME_N_OF
Standard identifier for the n-of function. |
Fields inherited from class org.jboss.security.xacml.sunxacml.cond.FunctionBase |
---|
FUNCTION_NS, FUNCTION_NS_2 |
Constructor Summary | |
---|---|
NOfFunction(String functionName)
Creates a new NOfFunction object. |
Method Summary | |
---|---|
void |
checkInputs(List inputs)
Default handling of input checking. |
void |
checkInputsNoBag(List inputs)
Default handling of input checking. |
EvaluationResult |
evaluate(List inputs,
EvaluationCtx context)
Evaluate the function, using the specified parameters. |
static Set |
getSupportedIdentifiers()
Returns a Set containing all the function identifiers
supported by this class. |
Methods inherited from class org.jboss.security.xacml.sunxacml.cond.FunctionBase |
---|
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_N_OF
Constructor Detail |
---|
public NOfFunction(String functionName)
NOfFunction
object.
functionName
- the standard XACML name of the function to be
handled by this object, including the full namespace
IllegalArgumentException
- if the function is unknownMethod Detail |
---|
public static Set getSupportedIdentifiers()
Set
containing all the function identifiers
supported by this class.
Set
of String
spublic EvaluationResult evaluate(List inputs, EvaluationCtx context)
inputs
- a List
of Evaluatable
objects representing the arguments passed to the functioncontext
- an EvaluationCtx
so that the
Evaluatable
objects can be evaluated
EvaluationResult
representing the
function's resultpublic void checkInputs(List inputs) throws IllegalArgumentException
FunctionBase
checkInputs
in interface Function
checkInputs
in class FunctionBase
inputs
- a List>
of Evaluatable
s
IllegalArgumentException
- if the inputs won't workpublic void checkInputsNoBag(List inputs) throws IllegalArgumentException
FunctionBase
checkInputsNoBag
in interface Function
checkInputsNoBag
in class FunctionBase
inputs
- a List>
of Evaluatable
s
IllegalArgumentException
- if the inputs won't work
|
JBoss port of sunxacml 2.0.8.Final-redhat-1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |