Class XsltPipe

All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, HasTransactionAttribute, IConfigurable, IForwardTarget, IPipe, IScopeProvider, IWithParameters, NameAware, EventThrowing, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle
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
  • Constructor Details

    • XsltPipe

      public XsltPipe()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • createXsltSender

      protected XsltSender createXsltSender()
    • configure

      public void configure() throws ConfigurationException
      The configure() method instantiates a transformer for the specified XSL. If the stylesheetname cannot be accessed, a ConfigurationException is thrown.
      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class FixedForwardPipe
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • start

      public void start()
      Description copied from interface: IPipe
      Perform necessary action to start the pipe. This method is executed after the IConfigurable.configure() method, for each start and stop command of the adapter.
      Specified by:
      start in interface IPipe
      Specified by:
      start in interface org.springframework.context.Lifecycle
      Overrides:
      start in class AbstractPipe
    • stop

      public void stop()
      Description copied from interface: IPipe
      Perform necessary actions to stop the Pipe.
      For instance, closing JMS connections, DBMS connections etc.
      Specified by:
      stop in interface IPipe
      Specified by:
      stop in interface org.springframework.context.Lifecycle
      Overrides:
      stop in class AbstractPipe
    • doPipe

      public @NonNull PipeRunResult doPipe(@NonNull Message input, @NonNull PipeLineSession session) throws PipeRunException
      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.
      Specified by:
      doPipe in interface IPipe
      Throws:
      PipeRunException
    • getParameterList

      public @NonNull ParameterList getParameterList()
      Description copied from class: AbstractPipe
      Returns the parameters.
      Specified by:
      getParameterList in interface IWithParameters
      Overrides:
      getParameterList in class AbstractPipe
    • addParameter

      public void addParameter(IParameter rhs)
      Description copied from class: AbstractPipe
      Adds a parameter to the list of parameters.
      Specified by:
      addParameter in interface IWithParameters
      Overrides:
      addParameter in class AbstractPipe
    • setStyleSheetName

      @ReferTo(XsltSender.class) public void setStyleSheetName(String stylesheetName)
    • setStyleSheetNameSessionKey

      @ReferTo(XsltSender.class) public void setStyleSheetNameSessionKey(String newSessionKey)
    • setStyleSheetCacheSize

      @ReferTo(XsltSender.class) public void setStyleSheetCacheSize(int size)
    • setXpathExpression

      @ReferTo(XsltSender.class) public void setXpathExpression(String string)
    • getXpathExpression

      public String getXpathExpression()
    • setOmitXmlDeclaration

      @ReferTo(XsltSender.class) public void setOmitXmlDeclaration(boolean b)
    • setDisableOutputEscaping

      @ReferTo(XsltSender.class) public void setDisableOutputEscaping(boolean b)
    • setNamespaceDefs

      @ReferTo(XsltSender.class) public void setNamespaceDefs(String namespaceDefs)
    • getNamespaceDefs

      public String getNamespaceDefs()
    • setOutputType

      @ReferTo(XsltSender.class) public void setOutputType(TransformerPool.OutputType outputType)
    • setIndentXml

      @ReferTo(XsltSender.class) public void setIndentXml(boolean b)
    • setRemoveNamespaces

      @ReferTo(XsltSender.class) public void setRemoveNamespaces(boolean b)
    • setHandleLexicalEvents

      @ReferTo(XsltSender.class) public void setHandleLexicalEvents(boolean b)
    • setSkipEmptyTags

      @ReferTo(XsltSender.class) public void setSkipEmptyTags(boolean b)
    • setXsltVersion

      @ReferTo(XsltSender.class) public void setXsltVersion(int xsltVersion)
    • setName

      public void setName(String name)
      Description copied from interface: IPipe
      The functional name of this pipe. It can be referenced by the path attribute of a PipeForward.
      Specified by:
      setName in interface IPipe
      Specified by:
      setName in interface NameAware
      Overrides:
      setName in class AbstractPipe