|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.context.IntegrationObjectSupport org.springframework.integration.transformer.AbstractTransformer org.springframework.integration.xml.transformer.XsltPayloadTransformer
public class XsltPayloadTransformer
Thread safe XSLT transformer implementation which returns a transformed
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.
Constructor Summary | |
---|---|
XsltPayloadTransformer(Resource xslResource)
|
|
XsltPayloadTransformer(Resource xslResource,
ResultTransformer resultTransformer)
|
|
XsltPayloadTransformer(javax.xml.transform.Templates templates)
|
|
XsltPayloadTransformer(javax.xml.transform.Templates templates,
ResultTransformer resultTransformer)
|
Method Summary | |
---|---|
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. |
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 |
setResultFactory(ResultFactory resultFactory)
Sets the ResultFactory |
void |
setSourceFactory(SourceFactory sourceFactory)
Sets the SourceFactory. |
void |
setXslParameterMappings(java.util.Map<java.lang.String,Expression> xslParameterMappings)
|
void |
setXsltParamHeaders(java.lang.String[] xsltParamHeaders)
|
Methods inherited from class org.springframework.integration.transformer.AbstractTransformer |
---|
transform |
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
afterPropertiesSet, getBeanFactory, getComponentName, 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 |
Constructor Detail |
---|
public XsltPayloadTransformer(javax.xml.transform.Templates templates) throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
public XsltPayloadTransformer(Resource xslResource) throws java.lang.Exception
java.lang.Exception
public XsltPayloadTransformer(Resource xslResource, ResultTransformer resultTransformer) throws java.lang.Exception
java.lang.Exception
public XsltPayloadTransformer(javax.xml.transform.Templates templates, ResultTransformer resultTransformer) throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
Method Detail |
---|
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,Expression> xslParameterMappings)
public void setXsltParamHeaders(java.lang.String[] xsltParamHeaders)
public java.lang.String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class IntegrationObjectSupport
protected java.lang.Object doTransform(Message<?> message) throws java.lang.Exception
AbstractTransformer
doTransform
in class AbstractTransformer
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |