DynamicServiceLocator
uses this.@Deprecated @Removal(version="3.11.0") public class XpathTradingRelationshipCreator extends java.lang.Object implements TradingRelationshipCreator
Implementation of TradingRelationshipCreator
which populates the
TradingRelationship
with values returned from configurable xpaths.
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.
XPath.newXPathInstance(DocumentBuilderFactoryBuilder, NamespaceContext)
In the adapter configuration file this class is aliased as xpath-trading-relationship-creator which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
XpathTradingRelationshipCreator()
Deprecated.
Creates a new instance.
|
XpathTradingRelationshipCreator(java.lang.String srcXp,
java.lang.String destXp,
java.lang.String typeXp)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
TradingRelationship |
create(AdaptrisMessage msg)
Deprecated.
Create a
TradingRelationship from an
AdaptrisMessage . |
java.lang.String |
getDestinationXpath()
Deprecated.
Returns the metadata key used to obtain the destination.
|
KeyValuePairSet |
getNamespaceContext()
Deprecated.
|
java.lang.String |
getSourceXpath()
Deprecated.
Returns the metadata key used to obtain the source.
|
java.lang.String |
getTypeXpath()
Deprecated.
Returns the metadata key used to obtain the type.
|
DocumentBuilderFactoryBuilder |
getXmlDocumentFactoryConfig()
Deprecated.
|
void |
setDestinationXpath(java.lang.String s)
Deprecated.
Sets the metadata key used to obtain the destination.
|
void |
setNamespaceContext(KeyValuePairSet kvps)
Deprecated.
Set the namespace context for resolving namespaces.
|
void |
setSourceXpath(java.lang.String s)
Deprecated.
Sets the metadata key used to obtain the source.
|
void |
setTypeXpath(java.lang.String s)
Deprecated.
Sets the metadata key used to obtain the type.
|
void |
setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml)
Deprecated.
|
public XpathTradingRelationshipCreator()
Creates a new instance. Default keys are empty String
s.
public XpathTradingRelationshipCreator(java.lang.String srcXp, java.lang.String destXp, java.lang.String typeXp)
public TradingRelationship create(AdaptrisMessage msg) throws CoreException
TradingRelationshipCreator
Create a TradingRelationship
from an
AdaptrisMessage
.
create
in interface TradingRelationshipCreator
msg
- the AdaptrisMessage
to processTradingRelationship
CoreException
- wrapping any Exceptions
which occur#create(AdaptrisMessage)
public java.lang.String getDestinationXpath()
Returns the metadata key used to obtain the destination.
public void setDestinationXpath(java.lang.String s)
Sets the metadata key used to obtain the destination. May not be null or empty.
s
- the metadata key used to obtain the destinationpublic java.lang.String getSourceXpath()
Returns the metadata key used to obtain the source.
public void setSourceXpath(java.lang.String s)
Sets the metadata key used to obtain the source. May not be null or empty.
s
- the metadata key used to obtain the sourcepublic java.lang.String getTypeXpath()
Returns the metadata key used to obtain the type.
public void setTypeXpath(java.lang.String s)
Sets the metadata key used to obtain the type. May not be null or empty.
s
- the metadata key used to obtain the typepublic KeyValuePairSet getNamespaceContext()
public void setNamespaceContext(KeyValuePairSet kvps)
kvps
- the namespace contextSimpleNamespaceContext.create(KeyValuePairSet)
public DocumentBuilderFactoryBuilder getXmlDocumentFactoryConfig()
public void setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml)