org.springframework.integration.xml.transformer
Class MarshallingTransformer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.transformer.AbstractTransformer
org.springframework.integration.xml.transformer.MarshallingTransformer
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, NamedComponent, Transformer
public class MarshallingTransformer
- extends AbstractTransformer
An implementation of AbstractTransformer
that delegates to an OXM Marshaller
.
- Author:
- Mark Fisher, Jonas Partner
Method Summary |
java.lang.Object |
doTransform(Message<?> message)
Subclasses must implement this method to provide the transformation
logic. |
void |
setExtractPayload(boolean extractPayload)
Specify whether the source Message's payload should be extracted prior
to marshalling. |
void |
setResultFactory(ResultFactory resultFactory)
|
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MarshallingTransformer
public MarshallingTransformer(org.springframework.oxm.Marshaller marshaller,
ResultTransformer resultTransformer)
throws javax.xml.parsers.ParserConfigurationException
- Throws:
javax.xml.parsers.ParserConfigurationException
MarshallingTransformer
public MarshallingTransformer(org.springframework.oxm.Marshaller marshaller)
throws javax.xml.parsers.ParserConfigurationException
- Throws:
javax.xml.parsers.ParserConfigurationException
setResultFactory
public void setResultFactory(ResultFactory resultFactory)
setExtractPayload
public void setExtractPayload(boolean extractPayload)
- Specify whether the source Message's payload should be extracted prior
to marshalling. This value is set to "true" by default. To send the
Message itself as input to the Marshaller instead, set this to "false".
doTransform
public java.lang.Object doTransform(Message<?> message)
- Description copied from class:
AbstractTransformer
- Subclasses must implement this method to provide the transformation
logic. If the return value is itself a Message, it will be used as the
result. Otherwise, any non-null return value will be used as the payload
of the result Message.
- Specified by:
doTransform
in class AbstractTransformer