Class XpathSyntaxIdentifier
- java.lang.Object
-
- com.adaptris.core.services.routing.SyntaxIdentifierBase
-
- com.adaptris.core.services.routing.SyntaxIdentifierImpl
-
- com.adaptris.core.services.routing.XmlSyntaxIdentifierImpl
-
- com.adaptris.core.services.routing.XpathSyntaxIdentifier
-
- All Implemented Interfaces:
ComponentLifecycle
,Condition
,SyntaxIdentifier
public class XpathSyntaxIdentifier extends XmlSyntaxIdentifierImpl
SyntaxIdentifier implementation using XPATH.If the
DocumentBuilderFactoryBuilder
has been explicitly set to be not namespace aware and the document does in fact contain namespaces, then Saxon can cause merry havoc in the sense that//NonNamespaceXpath
doesn't work if the document has namespaces in it. We have included a shim so that behaviour can be toggled based on what you have configured.Since 3.10.0 this class implements
Condition
which means that it can be used as part of the conditional services; if used in such a manner, then configuration is contextual, get/setDestination will be ignored (but may still have to be configured due to validation- See Also:
XPath.newXPathInstance(DocumentBuilderFactoryBuilder, NamespaceContext)
In the adapter configuration file this class is aliased as routing-xpath-syntax-identifier which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description XpathSyntaxIdentifier()
XpathSyntaxIdentifier(java.util.List<java.lang.String> xpaths, java.lang.String dest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isThisSyntax(java.lang.String message)
Determine if this SyntaxIdentifer considers the message to match all the configured patterns.-
Methods inherited from class com.adaptris.core.services.routing.XmlSyntaxIdentifierImpl
createDocument, createXPath, getNamespaceContext, getXmlDocumentFactoryConfig, setNamespaceContext, setXmlDocumentFactoryConfig
-
Methods inherited from class com.adaptris.core.services.routing.SyntaxIdentifierImpl
addPattern, getPatterns, setPatterns
-
Methods inherited from class com.adaptris.core.services.routing.SyntaxIdentifierBase
getDestination, setDestination
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
Methods inherited from interface com.adaptris.core.services.routing.SyntaxIdentifier
evaluate
-
-
-
-
Method Detail
-
isThisSyntax
public boolean isThisSyntax(java.lang.String message) throws ServiceException
Description copied from interface:SyntaxIdentifier
Determine if this SyntaxIdentifer considers the message to match all the configured patterns.- Parameters:
message
- the message to identify against.- Returns:
- true if it matches.
- Throws:
ServiceException
- if there was an error with the pattern.- See Also:
SyntaxIdentifier.isThisSyntax(java.lang.String)
-
-