public class XsltPayloadTransformer extends AbstractTransformer 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.
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(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 |
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) |
transform
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
public 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)
public void setResultFactory(ResultFactory resultFactory)
public void setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory)
public void setAlwaysUseResultFactory(boolean alwaysUseResultFactory)
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.BeanClassLoaderAware
public java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
protected void onInit() throws java.lang.Exception
IntegrationObjectSupport
onInit
in class IntegrationObjectSupport
java.lang.Exception
protected java.lang.Object doTransform(Message<?> message) throws java.lang.Exception
AbstractTransformer
doTransform
in class AbstractTransformer
java.lang.Exception