Class XsltComponent

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultComponent
org.apache.camel.component.xslt.XsltComponent
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Component, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasCamelContext, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

@Component("xslt") public class XsltComponent extends org.apache.camel.support.DefaultComponent
The XSLT Component is for performing XSLT transformations of messages
  • Field Summary

    Fields inherited from class org.apache.camel.support.service.BaseService

    BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    configureEndpoint(org.apache.camel.Endpoint endpoint, String remaining, Map<String,Object> parameters)
     
    protected org.apache.camel.Endpoint
    createEndpoint(String uri, String remaining, Map<String,Object> parameters)
     
    protected XsltEndpoint
     
     
     
     
     
    boolean
     
    boolean
     
    void
    setAllowTemplateFromHeader(boolean allowTemplateFromHeader)
    Whether to allow to use resource template from header or not (default false).
    void
    setContentCache(boolean contentCache)
    Cache for the resource content (the stylesheet file) when it is loaded.
    void
    setTransformerFactoryClass(String transformerFactoryClass)
    To use a custom XSLT transformer factory, specified as a FQN class name
    void
    A configuration strategy to apply on freshly created instances of TransformerFactory.
    void
    To use a custom UriResolver.
    void
    To use a custom UriResolver which depends on a dynamic endpoint resource URI.

    Methods inherited from class org.apache.camel.support.DefaultComponent

    afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI

    Methods inherited from class org.apache.camel.support.service.BaseService

    build, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Constructor Details

    • XsltComponent

      public XsltComponent()
  • Method Details

    • getUriResolverFactory

      public XsltUriResolverFactory getUriResolverFactory()
    • setUriResolverFactory

      public void setUriResolverFactory(XsltUriResolverFactory uriResolverFactory)
      To use a custom UriResolver which depends on a dynamic endpoint resource URI. Should not be used together with the option 'uriResolver'.
    • getUriResolver

      public URIResolver getUriResolver()
    • setUriResolver

      public void setUriResolver(URIResolver uriResolver)
      To use a custom UriResolver. Should not be used together with the option 'uriResolverFactory'.
    • isAllowTemplateFromHeader

      public boolean isAllowTemplateFromHeader()
    • setAllowTemplateFromHeader

      public void setAllowTemplateFromHeader(boolean allowTemplateFromHeader)
      Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential security vulnerability if the header is coming from a malicious user, so use this with care.
    • isContentCache

      public boolean isContentCache()
    • setContentCache

      public void setContentCache(boolean contentCache)
      Cache for the resource content (the stylesheet file) when it is loaded. If set to false Camel will reload the stylesheet file on each message processing. This is good for development. A cached stylesheet can be forced to reload at runtime via JMX using the clearCachedStylesheet operation.
    • getTransformerFactoryConfigurationStrategy

      public TransformerFactoryConfigurationStrategy getTransformerFactoryConfigurationStrategy()
    • setTransformerFactoryConfigurationStrategy

      public void setTransformerFactoryConfigurationStrategy(TransformerFactoryConfigurationStrategy transformerFactoryConfigurationStrategy)
      A configuration strategy to apply on freshly created instances of TransformerFactory.
    • getTransformerFactoryClass

      public String getTransformerFactoryClass()
    • setTransformerFactoryClass

      public void setTransformerFactoryClass(String transformerFactoryClass)
      To use a custom XSLT transformer factory, specified as a FQN class name
    • createEndpoint

      protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
      Specified by:
      createEndpoint in class org.apache.camel.support.DefaultComponent
      Throws:
      Exception
    • createXsltEndpoint

      protected XsltEndpoint createXsltEndpoint(String uri)
    • configureEndpoint

      protected void configureEndpoint(org.apache.camel.Endpoint endpoint, String remaining, Map<String,Object> parameters) throws Exception
      Throws:
      Exception