allOf Function Description

Description

This function applies a boolean function which takes n parameters between n-1 atomic values and a bag of values. It returns "True" if and only if the predicate is "True" for every element of the bag.

allOf 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:all-of, takes n+1 (usually 3) where n is the number of arguments the function takes. arguments and returns a value of type boolean.

Property Value
Category higher order bag functions
# Arguments n+1 (usually 3) where n is the number of arguments the function takes.
Arguments
  • function(n arguments of primitive type): boolean;
  • n-1 primitive values;
  • 1 bag
Return Value boolean
Expressed As pre-fix
Representation ALFA short name
Allowed In Target false
ALFA Shorthand None
Commutative false

Example

/**
 * In this rule, the function will return true if 18 is greater than all of the values
 * in the bag of values inside attribute age. As a result access is permitted if age
 * does not contain any value greater than 18.
 */
rule allOfExample{
    permit
    condition allOf(function[integerGreaterThan], 18, age)
}

In the example, the function will return true if 18 is greater than all of the values in the bag of values inside attribute age. In this example n=2.

Related Functions

Other functions in the higher order bag functions category:

Browse the full ALFA function reference.