|
|||||||||
| Home >> All >> com >> sun >> xacml >> [ cond overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.sun.xacml.cond
Interface Function

- All Known Implementing Classes:
- FunctionBase, HigherOrderFunction, MapFunction
- public interface Function
Interface that all functions in the system must implement.
- Since:
- 1.0
| Method Summary | |
void |
checkInputs(java.util.List inputs)
Checks that the given inputs are of the right types, in the right order, and are the right number for this function to evaluate. |
void |
checkInputsNoBag(java.util.List inputs)
Checks that the given inputs are of the right types, in the right order, and are the right number for this function to evaluate. |
EvaluationResult |
evaluate(java.util.List inputs,
com.sun.xacml.EvaluationCtx context)
Evaluates the Function using the given inputs. |
java.net.URI |
getIdentifier()
Returns the identifier of this function as known by the factories. |
java.net.URI |
getReturnType()
Provides the type of AttributeValue that this function
returns from evaluate in a successful evaluation. |
boolean |
returnsBag()
Tells whether this function will return a bag of values or just a single value. |
| Method Detail |
evaluate
public EvaluationResult evaluate(java.util.List inputs, com.sun.xacml.EvaluationCtx context)
- Evaluates the
Functionusing the given inputs. TheListcontainsEvaluatables which are all of the correct type if theFunctionhas been created as part of anApplyorTargetMatch, but which may otherwise be invalid. Each parameter should be evaluated by theFunction, unless this is a higher-order function (in which case theApplyhas already evaluated the inputs to check for any INDETERMINATE conditions), or theFunctiondoesn't need to evaluate all inputs to determine a result (as in the case of the or function). The order of theListis significant, so aFunctionshould have a very good reason if it wants to evaluate the inputs in a different order.Note that if this is a higher-order function, like any-of, then the first argument in the
Listwill actually be a Function object representing the function to apply to some bag. In this case, the second and any subsequent entries in the list areAttributeValueobjects (no INDETERMINATE values are allowed, so the function is not given the option of dealing with attributes that cannot be resolved). A function needs to know if it's a higher-order function, and therefore whether or not to look for this case. Also, a higher-order function is responsible for checking that the inputs that it will pass to theFunctionprovided as the first parameter are valid, ie. it must do acheckInputson its sub-function whencheckInputsis called on the higher-order function.
getIdentifier
public java.net.URI getIdentifier()
- Returns the identifier of this function as known by the factories.
In the case of the standard XACML functions, this will be one of the
URIs defined in the standard namespace. This function must always
return the complete namespace and identifier of this function.
getReturnType
public java.net.URI getReturnType()
- Provides the type of
AttributeValuethat this function returns fromevaluatein a successful evaluation.
returnsBag
public boolean returnsBag()
- Tells whether this function will return a bag of values or just a
single value.
checkInputs
public void checkInputs(java.util.List inputs) throws java.lang.IllegalArgumentException
- Checks that the given inputs are of the right types, in the right
order, and are the right number for this function to evaluate. If
the function cannot accept the inputs for evaluation, an
IllegalArgumentExceptionis thrown.
checkInputsNoBag
public void checkInputsNoBag(java.util.List inputs) throws java.lang.IllegalArgumentException
- Checks that the given inputs are of the right types, in the right
order, and are the right number for this function to evaluate. If
the function cannot accept the inputs for evaluation, an
IllegalArgumentExceptionis thrown. Unlike the othercheckInputmethod in this interface, this assumes that the parameters will never provide bags of values. This is useful if you're considering a target function which has a designator or selector in its input list, but which passes the values from the derived bags one at a time to the function, so the function doesn't have to deal with the bags that the selector or designator generates.
|
|||||||||
| Home >> All >> com >> sun >> xacml >> [ cond overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC