@ SuppressWarnings ( "unchecked" ) // NOSONAR (Avoid Duplicate Literals) private void processEachRuleWithEachResultHandler ( RI ruleInput ) { // For each rule for ( Rule < RI , RO > rule : rules ) { // Validate the data and get the rule output Object ruleOutput = rule . validate ( ruleInput ) ; // Transform the rule output if ( ruleOutputTransformers != null ) { for ( Transformer transformer : ruleOutputTransformers ) { ruleOutput = transformer . transform ( ruleOutput ) ; } } // Transform the transformed rule output to result handler input if ( resultHandlerInputTransformers != null ) { for ( Transformer transformer : resultHandlerInputTransformers ) { ruleOutput = transformer . transform ( ruleOutput ) ; } } RHI resultHandlerInput = ( RHI ) ruleOutput ; // Process the result handler input with the result handlers processResultHandlers ( resultHandlerInput ) ; } }
Processes the specified rule input with each rule and processes the results of each rule one by one with each result handler .