return this;
}
public ConfigTree build()
{
ConfigTree configTree = new ConfigTree("cbr-config");
configTree.setAttribute( ListenerTagNames.RULE_RELOAD_TAG, Boolean.toString( reload ) );
if ( ruleFile != null )
configTree.setAttribute( ListenerTagNames.RULE_SET_TAG, ruleFile );
else if ( decisionTable != null )
configTree.setAttribute( DECISION_TABLE.getName(), decisionTable );
else if ( ruleAgent != null )
configTree.setAttribute( RULE_AGENT_PROPERTIES.getName(), ruleAgent );
else
throw new IllegalStateException("One of ruleFile, decisionTable or ruleAgent must be set");
if (ruleLanguage != null)
configTree.setAttribute( ListenerTagNames.RULE_LANGUAGE_TAG, ruleLanguage);
if ( messagePathList != null )
{
for (String messagePath : messagePathList)
{
ConfigTree objectPath = new ConfigTree( ContentBasedWiretap.OBJECT_PATH_TAG, configTree );
objectPath.setAttribute( ContentBasedWiretap.OBJECT_PATH, messagePath );
}
}
if ( entryPointFacts != null )
{
Set<Entry<String, List<String>>> entrySet = entryPointFacts.entrySet();
for (Entry<String, List<String>> entry : entrySet)
{
final String entryPointName = entry.getKey();
List<String> value = entry.getValue();
for (String path : value)
{
ConfigTree objectPath = new ConfigTree( ContentBasedWiretap.OBJECT_PATH_TAG, configTree );
objectPath.setAttribute( ContentBasedWiretap.OBJECT_PATH, path );
objectPath.setAttribute( ContentBasedWiretap.ENTRY_POINT, entryPointName );
}
}
}
if ( stateful )