private List < Rule > match ( final RuleSet ruleSet , final OgnlContext ognlContext ) throws OgnlException { log . debug ( "Assessing input for ruleset : " + ruleSet . id ) ; //run the input commands ruleSet . runInput ( ognlContext ) ; final List < Rule > ret = new ArrayList <> ( ) ; //assess each rule against the input, return any that match for ( Rule rule : ruleSet . rules ) { Boolean bresult = rule . assessMatch ( ognlContext ) ; if ( bresult ) { log . debug ( rule . condition . getOriginalExpression ( ) + " matches" ) ; ret . add ( rule ) ; } } return ret ; }
returns a list of rules that match in the given rule set