Package org.frankframework.pipes
Class XsltPipe
java.lang.Object
org.frankframework.core.TransactionAttributes
org.frankframework.pipes.AbstractPipe
org.frankframework.pipes.FixedForwardPipe
org.frankframework.pipes.XsltPipe
- All Implemented Interfaces:
HasTransactionAttribute
,IConfigurable
,IConfigurationAware
,IForwardTarget
,INamedObject
,IPipe
,IScopeProvider
,IWithParameters
,EventThrowing
,HasStatistics
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
JsonXsltPipe
@Category(BASIC)
@EnterpriseIntegrationPattern(TRANSLATOR)
public class XsltPipe
extends FixedForwardPipe
implements org.springframework.beans.factory.InitializingBean
Perform an XSLT transformation with a specified stylesheet.
- Author:
- Johan Verrips
- Parameters
- any parameters defined on the pipe will be applied to the created transformer
-
Field Summary
Fields inherited from class org.frankframework.pipes.AbstractPipe
parameterNamesMustBeUnique
Fields inherited from class org.frankframework.core.TransactionAttributes
log
Fields inherited from interface org.frankframework.core.IPipe
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addParameter
(IParameter rhs) Add a parameter to the list of parametersvoid
void
Theconfigure()
method instantiates a transformer for the specified XSL.protected XsltSender
doPipe
(Message input, PipeLineSession session) This is where the action takes place.return the Parametersvoid
setDisableOutputEscaping
(boolean b) void
setHandleLexicalEvents
(boolean b) void
setIndentXml
(boolean b) void
The functional name of this pipe.void
setNamespaceDefs
(String namespaceDefs) void
setOmitXmlDeclaration
(boolean b) void
setOutputType
(TransformerPool.OutputType outputType) void
setRemoveNamespaces
(boolean b) void
setSessionKey
(String newSessionKey) Deprecated, for removal: This API element is subject to removal in a future version.void
setSkipEmptyTags
(boolean b) void
setStreamingXslt
(boolean streamingActive) If true, then this pipe will process the XSLT while streaming in a different thread.void
setStyleSheetCacheSize
(int size) void
setStyleSheetName
(String stylesheetName) void
setStyleSheetNameSessionKey
(String newSessionKey) void
setXpathExpression
(String string) void
setXsltVersion
(int xsltVersion) void
start()
Perform necessary action to start the pipe.void
stop()
Perform necessary actions to stop thePipe
.
For instance, closing JMS connections, DBMS connections etc.Methods inherited from class org.frankframework.pipes.FixedForwardPipe
getIfParam, getIfValue, getOnlyIfSessionKey, getOnlyIfValue, getParameterValue, getSuccessForward, getUnlessSessionKey, getUnlessValue, isSkipOnEmptyInput, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
Methods inherited from class org.frankframework.pipes.AbstractPipe
addForward, consumesSessionVariable, createBean, findForward, getAdapter, getApplicationContext, getChompCharSize, getConfigurationClassLoader, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getEventSourceName, getForwards, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getLocker, getLogIntermediaryResults, getMaxThreads, getName, getPipeLine, getSecLogSessionKeys, getStoreResultInSessionKey, hasRegisteredForward, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, registerEvent, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setEventPublisher, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setPipeLine, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, sizeStatisticsEnabled, throwEvent
Methods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, getTransactionAttribute, getTransactionTimeout, getTxDef, isTransacted, isTransacted, setTransacted, setTransactionAttribute, setTransactionTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.frankframework.core.IPipe
throwEvent
-
Constructor Details
-
XsltPipe
public XsltPipe()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
createXsltSender
-
configure
Theconfigure()
method instantiates a transformer for the specified XSL. If the stylesheetname cannot be accessed, a ConfigurationException is thrown.- Specified by:
configure
in interfaceIConfigurable
- Specified by:
configure
in interfaceIPipe
- Overrides:
configure
in classFixedForwardPipe
- Throws:
ConfigurationException
-
start
Description copied from interface:IPipe
Perform necessary action to start the pipe. This method is executed after theIPipe.configure()
method, for each start and stop command of the adapter.- Specified by:
start
in interfaceIPipe
- Overrides:
start
in classAbstractPipe
- Throws:
PipeStartException
-
stop
public void stop()Description copied from interface:IPipe
Perform necessary actions to stop thePipe
.
For instance, closing JMS connections, DBMS connections etc.- Specified by:
stop
in interfaceIPipe
- Overrides:
stop
in classAbstractPipe
-
doPipe
Description copied from interface:IPipe
This is where the action takes place. Pipes may only throw a PipeRunException, to be handled by the caller of this object. Implementations must either consume the message, or pass it on to the next Pipe in the PipeRunResult. If the result of the Pipe does not depend on the input, like for theFixedResultPipe
, the Pipe can schedule the input to be closed at session exit, by callingMessage.closeOnCloseOf(PipeLineSession, String)
This allows the previous Pipe to release any resources (e.g. connections) that it might have kept open until the message was consumed. Doing so avoids connections leaking from pools, while it enables efficient streaming processing of data while it is being read from a stream.- Specified by:
doPipe
in interfaceIPipe
- Throws:
PipeRunException
-
setStreamingXslt
public void setStreamingXslt(boolean streamingActive) If true, then this pipe will process the XSLT while streaming in a different thread. Can be used to switch streaming xslt off for debugging purposes- Default value
- set by appconstant xslt.streaming.default
-
getParameterList
Description copied from class:AbstractPipe
return the Parameters- Specified by:
getParameterList
in interfaceIWithParameters
- Overrides:
getParameterList
in classAbstractPipe
-
addParameter
Description copied from class:AbstractPipe
Add a parameter to the list of parameters- Specified by:
addParameter
in interfaceIWithParameters
- Overrides:
addParameter
in classAbstractPipe
-
setStyleSheetName
-
setStyleSheetNameSessionKey
-
setStyleSheetCacheSize
-
setXpathExpression
-
getXpathExpression
-
setOmitXmlDeclaration
-
setDisableOutputEscaping
-
setNamespaceDefs
-
getNamespaceDefs
-
setOutputType
-
setIndentXml
-
setRemoveNamespaces
-
setHandleLexicalEvents
-
setSkipEmptyTags
-
setXsltVersion
-
setSessionKey
@Deprecated(forRemoval=true, since="7.7.0") @ConfigurationWarning("Please use \'storeResultInSessionKey\' with preserveInput=true") public void setSessionKey(String newSessionKey) Deprecated, for removal: This API element is subject to removal in a future version.If set, then the XsltPipe stores it result in the session using the supplied sessionKey, and returns its input as result -
setName
Description copied from class:AbstractPipe
The functional name of this pipe. Can be referenced by thepath
attribute of aPipeForward
.- Specified by:
setName
in interfaceINamedObject
- Overrides:
setName
in classAbstractPipe
-
getSender
-