|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.osesb.configuration.XMLConfiguration
org.osesb.msgrouting.configuration.DroolsXMLMessageTypeHelperConfiguration
public class DroolsXMLMessageTypeHelperConfiguration
Configures a DroolsXMLMessageTypeHelper.
DroolsXMLMessageTypeHelper extends DefaultXMLMessageTypeHelper with a getMessageType() method that incorporates a Drools rule. DefaultXMLMessageTypeHelper is the default XMLMessageTypeHelper class and is constructed with a XMLMessageTypeXPathExpressionListConfiguration. DefaultXMLMessageTypeHelper applies the configured XPath expressions to a XML message until a messageType is determined. DefaultXMLMessageTypeHelper#getMessagetype() returns the messageType as a QName, where the namespaceURI is the XML document namespace (if any) and the localPart is the value for the element or attribute that is given by a XPath expression. DroolsXMLMessageTypeHelper is constructed with a DroolsXMLMessageTypeHelperConfiguration, which combines XMLMessageTypeXPathExpressionListConfiguration and DroolsRuleApplierConfiguration. DroolsXMLMessageTypeHelper allows for more complex determination of the messageType for a XML message as follows:
| Field Summary | |
|---|---|
protected DroolsRuleApplierConfiguration |
droolsRuleApplierConfiguration
The required DroolsRuleApplierConfiguration, which configures the location of the Drools Rule file and an optional XPathExpressionListConfiguration which can be used to extract XML Nodes for evaluation by the configured Drools rules. |
protected XMLMessageTypeXPathExpressionListConfiguration |
xmlMessageTypeXPathExpressionListConfiguration
The optional XMLMessageTypeXPathExpressionListConfiguration, which configures XPath expressions for extracting message types from XML messages using the default implementation of XMLMessageTypeHelper, which is DefaultXMLMessageTypeHelper. |
| Fields inherited from class org.osesb.configuration.XMLConfiguration |
|---|
configFilePath, configurationProperties, constructedFromConfigFile, contentModelElement, ftpClientConfiguration, jaxrpcClientConfiguration, jdbcConfiguration, jmsClientConfiguration, log, rootConfigurationAttributes, smtpClientConfiguration, systemProperties, thisClassName |
| Constructor Summary | |
|---|---|
DroolsXMLMessageTypeHelperConfiguration(org.w3c.dom.Element contentModelElement)
Creates a new instance of DroolsXMLMessageTypeHelperConfiguration given the content model Element. |
|
DroolsXMLMessageTypeHelperConfiguration(java.lang.String configFile)
Creates a new instance of DroolsXMLMessageTypeHelperConfiguration given a XML configuration file. |
|
DroolsXMLMessageTypeHelperConfiguration(java.lang.String configFile,
java.lang.String xpathExpression)
Creates a new instance of DroolsXMLMessageTypeHelperConfiguration given a XML configuration file and a XPath expression that evaluates to the element that marks the beginning of the configuration. |
|
| Method Summary | |
|---|---|
DroolsRuleApplierConfiguration |
getDroolsRuleApplierConfiguration()
Return the required DroolsRuleApplierConfiguration, which configures the location of the Drools Rule file and an optional XPathExpressionListConfiguration which can be used to extract XML Nodes for evaluation by the configured Drools rules. |
XMLMessageTypeXPathExpressionListConfiguration |
getXmlMessageTypeXPathExpressionListConfiguration()
Return the optional XMLMessageTypeXPathExpressionListConfiguration, which configures XPath expressions for extracting message types from XML messages using the default implementation of XMLMessageTypeHelper, which is DefaultXMLMessageTypeHelper. |
protected void |
loadDroolsRuleApplierConfiguration()
Loads the required DroolsRuleApplierConfiguration, which configures the location of the Drools Rule file and an optional XPathExpressionListConfiguration which can be used to extract XML Nodes for evaluation by the configured Drools rules. |
protected void |
loadXMLMessageTypeXPathExpressionListConfiguration()
Loads the optional XMLMessageTypeXPathExpressionListConfiguration, which configures XPath expressions for extracting message types from XML messages using the default implementation of XMLMessageTypeHelper, which is DefaultXMLMessageTypeHelper. |
static void |
main(java.lang.String[] args)
main() For testing and sandboxing. |
java.lang.String |
toString()
Returns the String representation of this MessageRouterConfiguration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected XMLMessageTypeXPathExpressionListConfiguration xmlMessageTypeXPathExpressionListConfiguration
protected DroolsRuleApplierConfiguration droolsRuleApplierConfiguration
| Constructor Detail |
|---|
public DroolsXMLMessageTypeHelperConfiguration(java.lang.String configFile)
throws java.lang.Exception
configFile - The path to the XML configuration file, which
is specified as a resource path or as a file system
path that is relative to the path specified
by the ConfigurationConstants.CONFIG_PATH_SYSTEMPROPERTY
System Property.
java.lang.Exception - if there is a problem reading or parsing the
configuration file.
public DroolsXMLMessageTypeHelperConfiguration(java.lang.String configFile,
java.lang.String xpathExpression)
throws java.lang.Exception
configFile - The XML configuration document to parse.xpathExpression - A XPath expression that evaluates to the
element that marks the beginning of the
configuration.
java.lang.Exception - if there is a problem reading or parsing the
configuration file.
public DroolsXMLMessageTypeHelperConfiguration(org.w3c.dom.Element contentModelElement)
throws java.lang.Exception
contentModelElement - The top level Element for the
for the configuration.
java.lang.Exception - if there is a fatal error transversing the
configuration content model enclosed by contentModelElement.| Method Detail |
|---|
protected final void loadXMLMessageTypeXPathExpressionListConfiguration()
throws java.lang.Exception
java.lang.Exception - if there is a fatal error transversing the DOM
that contains the configuration content model.
protected final void loadDroolsRuleApplierConfiguration()
throws java.lang.Exception
java.lang.Exception - if there is a fatal error transversing the DOM
that contains the configuration content model.public XMLMessageTypeXPathExpressionListConfiguration getXmlMessageTypeXPathExpressionListConfiguration()
public DroolsRuleApplierConfiguration getDroolsRuleApplierConfiguration()
public java.lang.String toString()
toString in class XMLConfigurationpublic static void main(java.lang.String[] args)
args - commandline arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||