Class MultipleConditionCheck
- java.lang.Object
-
- de.xima.fc.workflow.processor.processing.MultipleConditionCheck
-
- All Implemented Interfaces:
Predicate<MultipleConditionCheck.MultipleConditionData>
public final class MultipleConditionCheck extends Object implements Predicate<MultipleConditionCheck.MultipleConditionData>
Predicate that combines multiple single conditions via aEMultipleConditionCombinationType.- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMultipleConditionCheck.MultipleConditionDataPOJO with parameters fortest(MultipleConditionData).
-
Constructor Summary
Constructors Constructor Description MultipleConditionCheck(Locale locale)Creates a new multiple condition check that combines the results of individual checks.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> booleantest(EMultipleConditionCombinationType combinationType, String customExpression, Iterable<T> items, Function<T,Map.Entry<String,Boolean>> evaluator)Combines the given conditions via the combination type.booleantest(EMultipleConditionCombinationType combinationType, String customExpression, Map<String,Boolean> singleResults)Combines the given conditions via the combination type.booleantest(MultipleConditionCheck.MultipleConditionData data)
-
-
-
Constructor Detail
-
MultipleConditionCheck
public MultipleConditionCheck(Locale locale)
Creates a new multiple condition check that combines the results of individual checks.- Parameters:
locale- Locale to use for error message.
-
-
Method Detail
-
test
public <T> boolean test(EMultipleConditionCombinationType combinationType, String customExpression, Iterable<T> items, Function<T,Map.Entry<String,Boolean>> evaluator)
Combines the given conditions via the combination type.- Type Parameters:
T- Type of the items.- Parameters:
combinationType- How to combine the individual results.customExpression- Custom combination expression forEMultipleConditionCombinationType.CUSTOM.items- A list of items representing the individual conditions.evaluator- Takes a single condition and evaluates it. The key must be the name of the condition forEMultipleConditionCombinationType.CUSTOM.- Returns:
- The result of combining the individual results via the given combination type.
-
test
public boolean test(EMultipleConditionCombinationType combinationType, String customExpression, Map<String,Boolean> singleResults)
Combines the given conditions via the combination type.- Parameters:
combinationType- How to combine the individual results.singleResults- Outcomes of the individual tests. The key is the variable name of the test forEMultipleConditionCombinationType.CUSTOM.customExpression- Custom combination expression forEMultipleConditionCombinationType.CUSTOM.- Returns:
- The result of combining the individual results via the given combination type.
-
test
public boolean test(MultipleConditionCheck.MultipleConditionData data)
- Specified by:
testin interfacePredicate<MultipleConditionCheck.MultipleConditionData>
-
-