Package org.frankframework.senders
Class JsonXsltSender
java.lang.Object
org.frankframework.senders.AbstractSender
org.frankframework.senders.AbstractSenderWithParameters
org.frankframework.senders.XsltSender
org.frankframework.senders.JsonXsltSender
- All Implemented Interfaces:
IConfigurable
,IConfigurationAware
,INamedObject
,IScopeProvider
,ISender
,ISenderWithParameters
,IWithParameters
,IThreadCreator
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
Perform an XSLT transformation with a specified stylesheet on a JSON input, yielding JSON, yielding JSON, XML or text.
JSON input is transformed into XML map, array, string, integer and boolean elements, in the namespace http://www.w3.org/2013/XSL/json.
The XSLT stylesheet or XPathExpression operates on these element.
- Author:
- Gerrit van Brakel
- See Also:
-
Field Summary
Fields inherited from class org.frankframework.senders.XsltSender
DEFAULT_INDENT, DEFAULT_OMIT_XML_DECLARATION, DEFAULT_OUTPUT_METHOD, DEFAULT_XPATH_OUTPUT_METHOD, threadLifeCycleEventListener, txManager
Fields inherited from class org.frankframework.senders.AbstractSenderWithParameters
parameterNamesMustBeUnique, paramList
Fields inherited from class org.frankframework.senders.AbstractSender
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Theconfigure()
method instantiates a transformer for the specified XSL.protected ContentHandler
createHandler
(Message input, ThreadConnector threadConnector, PipeLineSession session, TransformerPool poolToUse, ContentHandler handler, MessageBuilder messageBuilder) protected XMLReader
getXmlReader
(PipeLineSession session, ContentHandler handler) boolean
void
setJsonResult
(boolean jsonResult) Whentrue
, the xml result of the transformation is converted back to jsonvoid
setNamespaceDefs
(String namespaceDefs) Namespace definitions for xpathExpression.void
setXmlDebugger
(IXmlDebugger xmlDebugger) Methods inherited from class org.frankframework.senders.XsltSender
filterInput, getDisableOutputEscaping, getIndentXml, getNamespaceDefs, getOmitXmlDeclaration, getOutputType, getStreamingXslt, getStyleSheetName, getStyleSheetNameSessionKey, getTransformerPoolToUse, getXpathExpression, getXsltVersion, isDebugInput, isDisableOutputEscaping, isHandleLexicalEvents, isRemoveNamespaces, isSkipEmptyTags, sendMessage, setDebugInput, setDisableOutputEscaping, setHandleLexicalEvents, setIndentXml, setOmitXmlDeclaration, setOutputType, setRemoveNamespaces, setSkipEmptyTags, setStreamingXslt, setStyleSheetCacheSize, setStyleSheetName, setStyleSheetNameSessionKey, setThreadLifeCycleEventListener, setTxManager, setXpathExpression, setXsltVersion, start, stop
Methods inherited from class org.frankframework.senders.AbstractSenderWithParameters
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
Methods inherited from class org.frankframework.senders.AbstractSender
createBean, getApplicationContext, getConfigurationClassLoader, getLogPrefix, getName, setApplicationContext, setName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.IConfigurationAware
getApplicationContext, getName
Methods inherited from interface org.frankframework.core.INamedObject
getName, setName
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrow
-
Constructor Details
-
JsonXsltSender
public JsonXsltSender()
-
-
Method Details
-
configure
Description copied from class:XsltSender
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 interfaceISender
- Overrides:
configure
in classXsltSender
- Throws:
ConfigurationException
-
createHandler
protected ContentHandler createHandler(Message input, ThreadConnector threadConnector, PipeLineSession session, TransformerPool poolToUse, ContentHandler handler, MessageBuilder messageBuilder) throws TransformerException - Overrides:
createHandler
in classXsltSender
- Throws:
TransformerException
-
getXmlReader
- Overrides:
getXmlReader
in classXsltSender
-
setJsonResult
public void setJsonResult(boolean jsonResult) Whentrue
, the xml result of the transformation is converted back to json- Default value
- true
-
isJsonResult
public boolean isJsonResult() -
setNamespaceDefs
Namespace definitions for xpathExpression. Must be in the form of a comma or space separated list ofprefix=namespaceuri
definitions- Overrides:
setNamespaceDefs
in classXsltSender
- Default value
- j=http://www.w3.org/2013/XSL/json
-
getXmlDebugger
-
setXmlDebugger
-