public class JsonXsltSender extends XsltSender
DEFAULT_INDENT, DEFAULT_OMIT_XML_DECLARATION, DEFAULT_OUTPUT_METHOD, DEFAULT_XPATH_OUTPUT_METHOD, threadLifeCycleEventListener, txManager
parameterNamesMustBeUnique, paramList
log
Constructor and Description |
---|
JsonXsltSender() |
Modifier and Type | Method and Description |
---|---|
void |
configure()
The
configure() method instantiates a transformer for the specified
XSL. |
protected ContentHandler |
createHandler(Message input,
ThreadConnector threadConnector,
PipeLineSession session,
TransformerPool poolToUse,
MessageOutputStream target) |
protected XMLReader |
getXmlReader(PipeLineSession session,
ContentHandler handler,
BiConsumer<AutoCloseable,String> closeOnCloseRegister) |
boolean |
isJsonResult() |
MessageOutputStream |
provideOutputStream(PipeLineSession session,
IForwardTarget next)
return a
MessageOutputStream that can be used to write a message to, that then will be processed in a streaming way. |
void |
setJsonResult(boolean jsonResult)
When
true , the xml result of the transformation is converted back to json |
void |
setNamespaceDefs(String namespaceDefs)
Namespace defintions for xpathExpression.
|
close, filterInput, getTransformerPoolToUse, isDisableOutputEscaping, isSynchronous, open, sendMessage, setDebugInput, setDisableOutputEscaping, setHandleLexicalEvents, setIndentXml, setNamespaceAware, setOmitXmlDeclaration, setOutputType, setRemoveNamespaces, setSkipEmptyTags, setStreamingXslt, setStyleSheetCacheSize, setStyleSheetName, setStyleSheetNameSessionKey, setXpathExpression, setXslt2, setXsltVersion
canProvideOutputStream, sendMessage, supportsOutputStreamPassThrough
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
createBean, getLogPrefix, getName, setApplicationContext, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setThreadLifeCycleEventListener
consumesSessionVariable
sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
addParameter, getParameterList
public void configure() throws ConfigurationException
XsltSender
configure()
method instantiates a transformer for the specified
XSL. If the stylesheetName cannot be accessed, a ConfigurationException is thrown.configure
in interface IConfigurable
configure
in interface ISender
configure
in class XsltSender
ConfigurationException
public MessageOutputStream provideOutputStream(PipeLineSession session, IForwardTarget next) throws StreamingException
IOutputStreamingSupport
MessageOutputStream
that can be used to write a message to, that then will be processed in a streaming way.
If a target MessageOutputStream is required to stream output to, this can be obtained from next
, if specified.
If the implementor of this method is a pipe, and it is the last one in the chain of streaming pipes, it must provide the appropriate
forward in the provide MessageOutputStream.
If the class cannot provide an outputstream, it must return null.
If the provider of an outputstream is a pipe itself, it must provide a proper pipeforward in the provided outputstreamprovideOutputStream
in interface IOutputStreamingSupport
provideOutputStream
in class XsltSender
StreamingException
protected ContentHandler createHandler(Message input, ThreadConnector threadConnector, PipeLineSession session, TransformerPool poolToUse, MessageOutputStream target) throws StreamingException
createHandler
in class XsltSender
StreamingException
protected XMLReader getXmlReader(PipeLineSession session, ContentHandler handler, BiConsumer<AutoCloseable,String> closeOnCloseRegister) throws ParserConfigurationException, SAXException
getXmlReader
in class XsltSender
ParserConfigurationException
SAXException
public void setJsonResult(boolean jsonResult)
true
, the xml result of the transformation is converted back to jsonpublic boolean isJsonResult()
public void setNamespaceDefs(String namespaceDefs)
XsltSender
prefix=namespaceuri
-definitions. For some other use cases (NOT xpathExpression), one entry can be without a prefix, that will define the default namespace.
If left empty, an the xpathExpression will match any namespacesetNamespaceDefs
in class XsltSender
Copyright © 2023 Frank!Framework. All rights reserved.