Class XsltSaxonEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.support.ScheduledPollEndpoint
org.apache.camel.support.DefaultPollingEndpoint
org.apache.camel.support.ProcessorEndpoint
org.apache.camel.component.xslt.XsltEndpoint
org.apache.camel.component.xslt.saxon.XsltSaxonEndpoint
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@ManagedResource(description="Managed XsltSaxonEndpoint")
@UriEndpoint(firstVersion="3.0.0",
scheme="xslt-saxon",
title="XSLT Saxon",
syntax="xslt-saxon:resourceUri",
producerOnly=true,
category={CORE,TRANSFORMATION})
public class XsltSaxonEndpoint
extends org.apache.camel.component.xslt.XsltEndpoint
Transform XML payloads using an XSLT template using Saxon.
-
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.camel.component.xslt.XsltBuildercreateBuilderForCustomStylesheet(String template, org.apache.camel.Exchange exchange) protected XsltSaxonBuilderprotected voiddoInit()protected voiddoStart()net.sf.saxon.Configurationbooleanbooleanprotected voidloadResource(String resourceUri, org.apache.camel.component.xslt.XsltBuilder xslt) Loads the resource.voidsetAllowStAX(boolean allowStAX) Whether to allow using StAX as the javax.xml.transform.Source.voidsetSaxonConfiguration(net.sf.saxon.Configuration saxonConfiguration) To use a custom Saxon configurationvoidsetSaxonConfigurationProperties(Map<String, Object> configurationProperties) To set custom Saxon configuration propertiesvoidsetSaxonExtensionFunctions(String extensionFunctions) Allows you to use a custom net.sf.saxon.lib.ExtensionFunctionDefinition.voidsetSaxonExtensionFunctions(List<Object> extensionFunctions) Allows you to use a custom net.sf.saxon.lib.ExtensionFunctionDefinition.voidsetSaxonReaderProperties(Map<String, Object> saxonReaderProperties) To set custom Saxon Reader propertiesvoidsetSecureProcessing(boolean secureProcessing) Feature for XML secure processing (see javax.xml.XMLConstants).Methods inherited from class org.apache.camel.component.xslt.XsltEndpoint
clearCachedStylesheet, configureOutput, doStop, findOrCreateEndpoint, getEntityResolver, getErrorListener, getOutput, getParameters, getResourceUri, getResultHandlerFactory, getTransformerCacheSize, getTransformerFactory, getTransformerFactoryClass, getTransformerFactoryConfigurationStrategy, getUriResolver, getXslt, getXsltMessageLogger, isAllowTemplateFromHeader, isCacheCleared, isCacheStylesheet, isContentCache, isDeleteOutputFile, isFailOnNullBody, onExchange, setAllowTemplateFromHeader, setCacheCleared, setContentCache, setDeleteOutputFile, setEntityResolver, setErrorListener, setFailOnNullBody, setOutput, setParameters, setResourceUri, setResultHandlerFactory, setTransformerCacheSize, setTransformerFactory, setTransformerFactoryClass, setTransformerFactoryConfigurationStrategy, setUriResolver, setXslt, setXsltMessageLoggerMethods inherited from class org.apache.camel.support.ProcessorEndpoint
createPollingConsumer, createProcessor, createProducer, getProcessor, setProcessorMethods inherited from class org.apache.camel.support.DefaultPollingEndpoint
createConsumerMethods inherited from class org.apache.camel.support.ScheduledPollEndpoint
configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelayMethods inherited from class org.apache.camel.support.DefaultEndpoint
configureExchange, configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
XsltSaxonEndpoint
-
-
Method Details
-
getSaxonExtensionFunctions
-
setSaxonExtensionFunctions
Allows you to use a custom net.sf.saxon.lib.ExtensionFunctionDefinition. You would need to add camel-saxon to the classpath. The function is looked up in the registry, where you can comma to separate multiple values to lookup. -
setSaxonExtensionFunctions
Allows you to use a custom net.sf.saxon.lib.ExtensionFunctionDefinition. You would need to add camel-saxon to the classpath. The function is looked up in the registry, where you can comma to separate multiple values to lookup. -
getSaxonConfiguration
public net.sf.saxon.Configuration getSaxonConfiguration() -
setSaxonConfiguration
public void setSaxonConfiguration(net.sf.saxon.Configuration saxonConfiguration) To use a custom Saxon configuration -
getSaxonConfigurationProperties
-
setSaxonConfigurationProperties
To set custom Saxon configuration properties -
getSaxonReaderProperties
-
setSaxonReaderProperties
To set custom Saxon Reader properties -
isAllowStAX
@ManagedAttribute(description="Whether to allow using StAX as the javax.xml.transform.Source") public boolean isAllowStAX() -
setAllowStAX
public void setAllowStAX(boolean allowStAX) Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) does not support StAXSource. -
isSecureProcessing
public boolean isSecureProcessing() -
setSecureProcessing
public void setSecureProcessing(boolean secureProcessing) Feature for XML secure processing (see javax.xml.XMLConstants). This is enabled by default. However, when using Saxon Professional you may need to turn this off to allow Saxon to be able to use Java extension functions. -
doInit
- Overrides:
doInitin classorg.apache.camel.component.xslt.XsltEndpoint- Throws:
Exception
-
doStart
- Overrides:
doStartin classorg.apache.camel.component.xslt.XsltEndpoint- Throws:
Exception
-
createXsltBuilder
- Overrides:
createXsltBuilderin classorg.apache.camel.component.xslt.XsltEndpoint- Throws:
Exception
-
createBuilderForCustomStylesheet
protected org.apache.camel.component.xslt.XsltBuilder createBuilderForCustomStylesheet(String template, org.apache.camel.Exchange exchange) throws Exception - Overrides:
createBuilderForCustomStylesheetin classorg.apache.camel.component.xslt.XsltEndpoint- Throws:
Exception
-
loadResource
protected void loadResource(String resourceUri, org.apache.camel.component.xslt.XsltBuilder xslt) throws TransformerException, IOException Loads the resource.- Overrides:
loadResourcein classorg.apache.camel.component.xslt.XsltEndpoint- Parameters:
resourceUri- the resource to load- Throws:
TransformerException- is thrown if error loading resourceIOException- is thrown if error loading resource
-