anyOf Function Description
Description
This function applies a Boolean function between specific atomic values and a bag of values, and SHALL return "True" if and only if the predicate is "True" for at least one element of the bag. Using this function with the relevant typeEquals function is equivalent to using the shortcut function typeIsIn e.g. stringIsIn().
anyOf belongs to the ALFA function reference's
higher order bag functions category. It maps to the XACML function identifier
urn:oasis:names:tc:xacml:3.0:function:any-of, takes n+1 arguments and returns a value of type boolean.
| Property | Value |
|---|---|
| Category | higher order bag functions |
| # Arguments | n+1 |
| Arguments |
|
| Return Value | boolean |
| Expressed As | pre-fix |
| Representation | ALFA short name |
| Allowed In Target | false |
| ALFA Shorthand | None |
| Commutative | false |
Example
/**
* Returns permit if the citizenship bag of values contains at least
* one value equal to "Swiss".
*/
rule anyOfExample{
permit
condition anyOf(function[stringEqual], citizenship, "Swiss")
}
In this example, the rule returns Permit if the citizenship bag of values contains at least one value equal to "Swiss".
Related Functions
Other functions in the higher order bag functions category: