protected void initRoolieConfig(Node roolieConfigNode,
RulesConfig rulesConfig) throws XPathExpressionException
{
// Create a new RoolieConfigElmt
RoolieConfigElmt roolieConfigElmt = new RoolieConfigElmt();
// init rule-factory-class property
Node ruleFactoryClassNode = null;
if (null != roolieConfigNode)
{
ruleFactoryClassNode = RUtil.getChild(roolieConfigNode,
XML.NODE.RULE_FACTORY_CLASS);
}
if (null != ruleFactoryClassNode)
{
final String ruleFactoryClass = RUtil.getAttributeValue(
ruleFactoryClassNode, XML.ATTRIB.CLASS);
// Set the rule-factory-class property in the RoolieConfigElmt
roolieConfigElmt.setRuleFactoryClass(ruleFactoryClass);
}
// init rule-evaluator-class
Node ruleEvaluatorNode = null;
if (null != roolieConfigNode)
{
ruleEvaluatorNode = RUtil.getChild(roolieConfigNode,
XML.NODE.RULE_EVALUATOR_CLASS);
}
if (null != ruleEvaluatorNode)
{
final String ruleEvaluatorClass = RUtil.getAttributeValue(
ruleEvaluatorNode, XML.ATTRIB.CLASS);
// Set the ruule-evaluator-class property in the RoolieConfigElmt
roolieConfigElmt.setRuleEvaluatorClass(ruleEvaluatorClass);
}
// Set the RoolieConfigElmt in rulesConfig
rulesConfig.setRoolieConfigElmt(roolieConfigElmt);
}