public class XsltPayloadTransformer extends AbstractXmlTransformer implements org.springframework.beans.factory.BeanClassLoaderAware
Source, Document, or String. If
alwaysUseSourceResultFactories is false (default) the following logic occurs
String payload in results in String payload out
Document payload in results in Document payload out
Source payload in results in Result payload out, type will be
determined by the ResultFactory, DomResultFactory by default.
If an instance of ResultTransformer is registered this will be used
to convert the result.
If alwaysUseSourceResultFactories is true then the ResultFactory and
SourceFactory will be used to create the Source from the
payload and the Result to pass into the transformer. An instance of
ResultTransformer can also be provided to convert the Result prior to
returning.
DOM_RESULT, STRING_RESULTEXPRESSION_PARSER, logger| Constructor and Description |
|---|
XsltPayloadTransformer(org.springframework.core.io.Resource xslResource) |
XsltPayloadTransformer(org.springframework.core.io.Resource xslResource,
ResultTransformer resultTransformer) |
XsltPayloadTransformer(org.springframework.core.io.Resource xslResource,
ResultTransformer resultTransformer,
java.lang.String transformerFactoryClassName) |
XsltPayloadTransformer(org.springframework.core.io.Resource xslResource,
java.lang.String transformerFactoryClassName) |
XsltPayloadTransformer(javax.xml.transform.Templates templates) |
XsltPayloadTransformer(javax.xml.transform.Templates templates,
ResultTransformer resultTransformer) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
doTransform(org.springframework.messaging.Message<?> message)
Subclasses must implement this method to provide the transformation
logic.
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setAlwaysUseResultFactory(boolean alwaysUseResultFactory)
Specify whether to always use result factory even for directly supported payload types
|
void |
setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)
Specify whether to always use source factory even for directly supported payload types.
|
void |
setBeanClassLoader(java.lang.ClassLoader classLoader) |
void |
setResultFactory(ResultFactory resultFactory)
Sets the ResultFactory.
|
void |
setResultFactoryName(java.lang.String resultFactoryName) |
void |
setResultType(java.lang.String resultType) |
void |
setSourceFactory(SourceFactory sourceFactory)
Sets the SourceFactory.
|
void |
setXslParameterMappings(java.util.Map<java.lang.String,org.springframework.expression.Expression> xslParameterMappings) |
void |
setXsltParamHeaders(java.lang.String[] xsltParamHeaders) |
getResultFactory, getResultFactoryName, getResultTypetransformafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringpublic XsltPayloadTransformer(javax.xml.transform.Templates templates)
public XsltPayloadTransformer(org.springframework.core.io.Resource xslResource)
public XsltPayloadTransformer(org.springframework.core.io.Resource xslResource,
ResultTransformer resultTransformer)
public XsltPayloadTransformer(org.springframework.core.io.Resource xslResource,
java.lang.String transformerFactoryClassName)
public XsltPayloadTransformer(org.springframework.core.io.Resource xslResource,
ResultTransformer resultTransformer,
java.lang.String transformerFactoryClassName)
public XsltPayloadTransformer(javax.xml.transform.Templates templates,
ResultTransformer resultTransformer)
public void setSourceFactory(SourceFactory sourceFactory)
sourceFactory - The source factory.public void setResultFactory(ResultFactory resultFactory)
setResultFactory in class AbstractXmlTransformerresultFactory - The result factory.public void setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)
alwaysUseSourceFactory - true to always use the source factory.public void setAlwaysUseResultFactory(boolean alwaysUseResultFactory)
alwaysUseResultFactory - true to always use the result factory.public void setXslParameterMappings(java.util.Map<java.lang.String,org.springframework.expression.Expression> xslParameterMappings)
public void setXsltParamHeaders(java.lang.String[] xsltParamHeaders)
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void setResultType(java.lang.String resultType)
setResultType in class AbstractXmlTransformerpublic void setResultFactoryName(java.lang.String resultFactoryName)
setResultFactoryName in class AbstractXmlTransformerpublic java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportprotected void onInit()
throws java.lang.Exception
IntegrationObjectSupportonInit in class AbstractXmlTransformerjava.lang.Exception - Any exception.protected java.lang.Object doTransform(org.springframework.messaging.Message<?> message)
throws java.lang.Exception
AbstractTransformerdoTransform in class AbstractTransformermessage - The message.java.lang.Exception - Any exception.