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.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,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.
-
-
Constructor Summary
Constructors Constructor Description XsltSaxonEndpoint(String endpointUri, org.apache.camel.Component component)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XsltSaxonBuilder
createXsltBuilder()
protected void
doInit()
protected void
doStart()
net.sf.saxon.Configuration
getSaxonConfiguration()
Map<String,Object>
getSaxonConfigurationProperties()
List<Object>
getSaxonExtensionFunctions()
Map<String,Object>
getSaxonReaderProperties()
boolean
isAllowStAX()
protected void
loadResource(String resourceUri, org.apache.camel.component.xslt.XsltBuilder xslt)
Loads the resource.void
setAllowStAX(boolean allowStAX)
Whether to allow using StAX as the javax.xml.transform.Source.void
setSaxonConfiguration(net.sf.saxon.Configuration saxonConfiguration)
To use a custom Saxon configurationvoid
setSaxonConfigurationProperties(Map<String,Object> configurationProperties)
To set custom Saxon configuration propertiesvoid
setSaxonExtensionFunctions(String extensionFunctions)
Allows you to use a custom net.sf.saxon.lib.ExtensionFunctionDefinition.void
setSaxonExtensionFunctions(List<Object> extensionFunctions)
Allows you to use a custom net.sf.saxon.lib.ExtensionFunctionDefinition.void
setSaxonReaderProperties(Map<String,Object> saxonReaderProperties)
To set custom Saxon Reader properties-
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, isCacheCleared, isCacheStylesheet, isContentCache, isDeleteOutputFile, isFailOnNullBody, onExchange, setCacheCleared, setContentCache, setDeleteOutputFile, setEntityResolver, setErrorListener, setFailOnNullBody, setOutput, setParameters, setResourceUri, setResultHandlerFactory, setTransformerCacheSize, setTransformerFactory, setTransformerFactoryClass, setTransformerFactoryConfigurationStrategy, setUriResolver, setXslt
-
Methods inherited from class org.apache.camel.support.ProcessorEndpoint
createPollingConsumer, createProcessor, createProducer, getProcessor, setProcessor
-
Methods 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, setUseFixedDelay
-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
-
Methods 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, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
XsltSaxonEndpoint
public XsltSaxonEndpoint(String endpointUri, org.apache.camel.Component component)
-
-
Method Detail
-
setSaxonExtensionFunctions
public void setSaxonExtensionFunctions(List<Object> extensionFunctions)
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
public void setSaxonExtensionFunctions(String extensionFunctions)
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
-
setSaxonConfigurationProperties
public void setSaxonConfigurationProperties(Map<String,Object> configurationProperties)
To set custom Saxon configuration properties
-
setSaxonReaderProperties
public void setSaxonReaderProperties(Map<String,Object> saxonReaderProperties)
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.
-
doInit
protected void doInit() throws Exception
- Overrides:
doInit
in classorg.apache.camel.component.xslt.XsltEndpoint
- Throws:
Exception
-
doStart
protected void doStart() throws Exception
- Overrides:
doStart
in classorg.apache.camel.component.xslt.XsltEndpoint
- Throws:
Exception
-
createXsltBuilder
protected XsltSaxonBuilder createXsltBuilder() throws Exception
- Overrides:
createXsltBuilder
in 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:
loadResource
in 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
-
-