public class XpathProperty extends PropertyMapper
In the adapter configuration file this class is aliased as msmq-xpath-property which is the preferred alternative to the fully qualified classname when building your configuration.
logR
Constructor and Description |
---|
XpathProperty() |
XpathProperty(java.lang.String field,
java.lang.String value) |
XpathProperty(java.lang.String field,
java.lang.String value,
ByteTranslator bt) |
Modifier and Type | Method and Description |
---|---|
KeyValuePairSet |
getNamespaceContext() |
java.lang.String |
getXpath()
Return the XPath expression.
|
void |
map(AdaptrisMessage msg,
Message mqMsg)
Copy information from the AdaptrisMessage object into the MQMessage object.
|
void |
map(Message mqMsg,
AdaptrisMessage msg)
Copy information from the MQMessage object into the AdaptrisMessage object.
|
void |
setNamespaceContext(KeyValuePairSet namespaceContext)
Set the namespace context for resolving namespaces.
|
void |
setXpath(java.lang.String s)
Set the XPath Expression.
|
createProperty, getByteTranslator, getConvertNull, getPropertyName, setByteTranslator, setConvertNull, setPropertyName
public XpathProperty()
public XpathProperty(java.lang.String field, java.lang.String value)
field
- the field namevalue
- the value to map.public XpathProperty(java.lang.String field, java.lang.String value, ByteTranslator bt)
field
- the field namevalue
- the xpathbt
- the byte translatorpublic void map(AdaptrisMessage msg, Message mqMsg) throws MSMQException, CoreException
PropertyMapper
map
in class PropertyMapper
msg
- the AdaptrisMessage Object.mqMsg
- the MQMessage object.MSMQException
- for any MSMQ related ExceptionsCoreException
- for any framework related exceptionspublic void map(Message mqMsg, AdaptrisMessage msg) throws MSMQException, CoreException
PropertyMapper
map
in class PropertyMapper
mqMsg
- the MQMessage object.msg
- the AdaptrisMessage Object.MSMQException
- for any MSMQ related ExceptionsCoreException
- for any framework related exceptionspublic java.lang.String getXpath()
public void setXpath(java.lang.String s)
If the XPath will resolve to more than 1 item, then any one of items is used to populate the MQMessage field
s
- the value to setpublic KeyValuePairSet getNamespaceContext()
public void setNamespaceContext(KeyValuePairSet namespaceContext)
namespaceContext
- Copyright Adaptris