yearMonthDurationIsIn Function Description

Description

Returns true if the value of the first parameter is in the bag of values of the second parameter. Attributes of type yearMonthDuration are compared using the yearMonthDurationEqual function.

yearMonthDurationIsIn belongs to the ALFA function reference's Bag functions category. It maps to the XACML function identifier urn:oasis:names:tc:xacml:3.0:function:yearMonthDuration-is-in, takes 2 arguments and returns a value of type boolean.

Property Value
Category Bag functions
# Arguments 2
Arguments
  • atomic (single) value of type yearMonthDuration
  • bag (collection) of values of type yearMonthDuration
Return Value boolean
Expressed As pre-fix
Representation ALFA short name
Allowed In Target true
ALFA Shorthand None
Commutative false

Example

/**
* Allow if the duration of 2 years and 3 months is in the collection of extended validity periods
*/
rule yearMonthDurationIsInExample{
    permit
    condition yearMonthDurationIsIn("P2Y3M":yearMonthDuration,extendedValidityPeriod)
}

Permit if the value passed as the first parameter is in the bag of values passed as the second parameter