@Category(value="Basic") @SupportsOutputStreaming public class ForEachChildElementPipe extends StringIteratorPipe implements IThreadCreator
IteratingPipe.ItemCallback, IteratingPipe.StopReason
MessageSendingPipe.LinkMethod
HasStatistics.Action
Modifier and Type | Field and Description |
---|---|
int |
DEFAULT_XSLT_VERSION |
MAX_ITEMS_REACHED_FORWARD, msgTransformerPool, STOP_CONDITION_MET_FORWARD
INPUT_VALIDATOR_NAME_PREFIX, INPUT_VALIDATOR_NAME_SUFFIX, INPUT_WRAPPER_NAME_PREFIX, INPUT_WRAPPER_NAME_SUFFIX, MAX_RETRY_INTERVAL, MESSAGE_LOG_NAME_PREFIX, MESSAGE_LOG_NAME_SUFFIX, MIN_RETRY_INTERVAL, msgLog, OUTPUT_VALIDATOR_NAME_PREFIX, OUTPUT_VALIDATOR_NAME_SUFFIX, OUTPUT_WRAPPER_NAME_PREFIX, OUTPUT_WRAPPER_NAME_SUFFIX, PIPE_CLEAR_TIMEOUT_MONITOR_EVENT, PIPE_EXCEPTION_MONITOR_EVENT, PIPE_TIMEOUT_MONITOR_EVENT
AUTOMATIC_STREAMING
parameterNamesMustBeUnique
log
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT
Constructor and Description |
---|
ForEachChildElementPipe() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canProvideOutputStream()
returns true when:
a) the pipe might be able to accept an input by providing an OutputStream, and
b) there are no side effects configured that prevent handing over its PipeRunResult to the calling pipe (e.g.
|
void |
configure()
checks for correct configuration of forward
|
protected void |
createHandler(nl.nn.adapterframework.pipes.ForEachChildElementPipe.HandlerRecord result,
ThreadConnector<?> threadConnector,
Message input,
PipeLineSession session,
IteratingPipe.ItemCallback callback,
BiConsumer<AutoCloseable,String> closeOnCloseRegister) |
protected TransformerPool |
getExtractElementsTp() |
protected IteratingPipe.StopReason |
iterateOverInput(Message input,
PipeLineSession session,
Map<String,Object> threadContext,
IteratingPipe.ItemCallback callback) |
protected String |
makeEncapsulatingXslt(String rootElementname,
String xpathExpression,
int xsltVersion,
String namespaceDefs) |
protected MessageOutputStream |
provideOutputStream(PipeLineSession session)
provide the outputstream, or null if a stream cannot be provided.
|
void |
setContainerElement(String containerElement)
Element name (not an XPath-expression), qualified via attribute
namespaceDefs , used to determine the 'root' of elements to be iterated over, i.e. |
void |
setElementXPathExpression(String string)
XPath-expression used to determine the set of elements to be iterated over, i.e.
|
void |
setProcessFile(boolean b)
Deprecated.
|
void |
setRemoveNamespaces(boolean b)
If set
true namespaces (and prefixes) are removed from the items just before forwarding them to the sender. |
void |
setTargetElement(String targetElement)
Element name (not an XPath-expression), qualified via attribute
namespaceDefs , used to determine the type of elements to be iterated over, i.e. |
void |
setXslt2(boolean b)
Deprecated.
|
void |
setXsltVersion(int xsltVersion)
If set to
2 or 3 a Saxon (net.sf.saxon) XSLT processor 2.0 or 3.0 will be used, supporting XPath 2.0 or 3.0 respectively, otherwise an XSLT processor 1.0 (org.apache.xalan), supporting XPath 1.0. |
void |
start()
Perform necessary action to start the pipe.
|
void |
stop()
Perform necessary actions to stop the
Pipe .For instance, closing JMS connections, DBMS connections etc. |
createItemCallBack, getKey, setBlockPrefix, setBlockSize, setBlockSuffix, setCombineBlocks, setEndPosition, setEscapeXml, setLinePrefix, setLineSuffix, setStartPosition
canStreamToNextPipe, getItem, getIterator, getStopConditionTp, itemToMessage, iterateOverStatistics, sendMessage, setAddInputToResult, setCloseIteratorOnExit, setCollectResults, setIgnoreExceptions, setItemNoSessionKey, setMaxChildThreads, setMaxItems, setNamespaceDefs, setOmitXmlDeclaration, setOutputType, setParallel, setRemoveDuplicates, setRemoveXmlDeclarationInResults, setSender, setStopConditionXPathExpression, setStyleSheetName, setXpathExpression
consumesSessionVariable, doPipe, hasSizeStatistics, increaseRetryIntervalAndWait, preserve, propagateName, setAuditTrailNamespaceDefs, setAuditTrailSessionKey, setAuditTrailXPath, setCheckRootTag, setCheckXmlWellFormed, setCorrelationIDNamespaceDefs, setCorrelationIDSessionKey, setCorrelationIDStyleSheet, setCorrelationIDXPath, setExceptionOnResult, setHideMethod, setHideRegex, setInputValidator, setInputWrapper, setLabelNamespaceDefs, setLabelStyleSheet, setLabelXPath, setLinkMethod, setListener, setMaxRetries, setMessageLog, setName, setOutputValidator, setOutputWrapper, setPresumedTimeOutInterval, setResultOnTimeOut, setRetryMaxInterval, setRetryMinInterval, setRetryNamespaceDefs, setRetryXPath, setStreamResultToServlet, setStubFilename, setStubFileName, setTimeOutOnResult, setUseInputForExtract, supportsOutputStreamPassThrough
getNextPipe, getTargetStream, isStreamingActive, provideOutputStream, setStreamingActive
getParameterValue, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
addParameter, createBean, findForward, getAdapter, getEventSourceName, getForwards, getInSizeStatDummyObject, getOutSizeStatDummyObject, getParameterList, registerEvent, registerForward, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setLocker, setLogIntermediaryResults, setMaxThreads, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, throwEvent
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setThreadLifeCycleEventListener
getName
getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getGetInputFromFixedValue, getGetInputFromSessionKey, getLocker, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, setPipeLine, throwEvent
getMaxThreads
getApplicationContext, getName
getConfigurationClassLoader
getName
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttribute
public final int DEFAULT_XSLT_VERSION
public void configure() throws ConfigurationException
FixedForwardPipe
configure
in interface IConfigurable
configure
in interface IPipe
configure
in class StringIteratorPipe
ConfigurationException
public void start() throws PipeStartException
IPipe
IPipe.configure()
method, for each start and stop command of the
adapter.start
in interface IPipe
start
in class MessageSendingPipe
PipeStartException
public void stop()
IPipe
Pipe
.stop
in interface IPipe
stop
in class MessageSendingPipe
protected String makeEncapsulatingXslt(String rootElementname, String xpathExpression, int xsltVersion, String namespaceDefs)
protected void createHandler(nl.nn.adapterframework.pipes.ForEachChildElementPipe.HandlerRecord result, ThreadConnector<?> threadConnector, Message input, PipeLineSession session, IteratingPipe.ItemCallback callback, BiConsumer<AutoCloseable,String> closeOnCloseRegister) throws TransformerConfigurationException
protected boolean canProvideOutputStream()
StreamingPipe
canProvideOutputStream
in class MessageSendingPipe
protected MessageOutputStream provideOutputStream(PipeLineSession session) throws StreamingException
StreamingPipe
StreamingPipe.getNextPipe()
.provideOutputStream
in class IteratingPipe<String>
StreamingException
protected IteratingPipe.StopReason iterateOverInput(Message input, PipeLineSession session, Map<String,Object> threadContext, IteratingPipe.ItemCallback callback) throws SenderException, TimeoutException
iterateOverInput
in class IteratingPipe<String>
SenderException
TimeoutException
protected TransformerPool getExtractElementsTp()
@Deprecated @ConfigurationWarning(value="Please add a LocalFileSystemPipe with action=read in front of this pipe instead") public void setProcessFile(boolean b)
true
, the input is assumed to be the name of a file to be processed. Otherwise, the input itself is transformed. The character encoding will be read from the XML declarationpublic void setContainerElement(String containerElement)
namespaceDefs
, used to determine the 'root' of elements to be iterated over, i.e. the root of the set of child elements.
When empty, the pipe will iterate over each direct child element of the rootpublic void setTargetElement(String targetElement)
namespaceDefs
, used to determine the type of elements to be iterated over, i.e. the element name of each of the child elements.
When empty, the pipe will iterate over any direct child element of the root or specified containerElementpublic void setElementXPathExpression(String string)
public void setXsltVersion(int xsltVersion)
2
or 3
a Saxon (net.sf.saxon) XSLT processor 2.0 or 3.0 will be used, supporting XPath 2.0 or 3.0 respectively, otherwise an XSLT processor 1.0 (org.apache.xalan), supporting XPath 1.0. N.B. Be aware that setting this other than 1 might cause the input file being read as a whole in to memory, as XSLT Streaming is currently only supported by the XSLT Processor that is used for xsltVersion=1@Deprecated @ConfigurationWarning(value="It\'s value is now auto detected. If necessary, replace with a setting of xsltVersion") public void setXslt2(boolean b)
public void setRemoveNamespaces(boolean b)
true
namespaces (and prefixes) are removed from the items just before forwarding them to the sender. N.B. This takes place after the transformation for elementXPathExpression
if that is specifiedCopyright © 2023 Frank!Framework. All rights reserved.