Class JsltTransformService
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,ConfigComment,ConnectedService,MessageEventGenerator,Service,StateManagedComponent
In the adapter configuration file this class is aliased as jslt-transform-service which is the preferred alternative to the fully qualified classname when building your configuration.
-
Field Summary
Fields inherited from class com.adaptris.core.ServiceImp
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoiddoService(AdaptrisMessage msg) The connection that wraps any underlying caching required.getUrl()Set the URL that contains the transformation you wish to execute.@NonNull JsltVariablesAny additional variables you want to pass into the JSLT transformation.protected voidvoidprepare()voidsetConnection(AdaptrisConnection connection) The connection that wraps any underlying caching required.voidSet the URL that contains the transformation you wish to execute.voidsetVariables(@NonNull JsltVariables variables) Any additional variables you want to pass into the JSLT transformation.voidstart()voidstop()Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, enabled, getComments, getContinueOnFail, getEnabled, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setComments, setContinueOnFail, setEnabled, setIsTrackingEndpoint, setUniqueIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueIdMethods inherited from interface com.adaptris.core.ComponentLifecycle
close, initMethods inherited from interface com.adaptris.core.ConfigComment
getComments, setCommentsMethods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpointMethods inherited from interface com.adaptris.core.Service
continueOnFailure, enabled, isBranching, setUniqueIdMethods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
Constructor Details
-
JsltTransformService
public JsltTransformService()
-
-
Method Details
-
doService
- Specified by:
doServicein interfaceService- Throws:
ServiceException
-
prepare
- Specified by:
preparein interfaceComponentLifecycleExtension- Throws:
CoreException
-
initService
- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
start
- Specified by:
startin interfaceComponentLifecycle- Overrides:
startin classServiceImp- Throws:
CoreException
-
stop
public void stop()- Specified by:
stopin interfaceComponentLifecycle- Overrides:
stopin classServiceImp
-
closeService
protected void closeService()- Specified by:
closeServicein classServiceImp
-
withUrl
-
withConnection
-
withVariables
-
getUrl
Set the URL that contains the transformation you wish to execute.Although named as a URL it can resolve the JSLT file from either the classpath or filesystem depending on the value here.
- /Users/interlok/work/runtime/my.jslt - either file or classpath
- my.jslt - either file or classpath
- file:////Users/interlok/path/to/my.jslt - considered an absolute local file URL, but classpath will be checked as a last resort for /Users/interlok/path/to/my.jslt
- file:///C:/Users/interlok/path/to/my.jslt - explicit absolute URL (windows style)
- https://myserver.com/path/to/my.jslt - explicit absolute URL supported by the JVM
This also supports the
%message{}syntax to resolve metadata.- See Also:
-
setUrl
Set the URL that contains the transformation you wish to execute.Although named as a URL it can resolve the JSLT file from either the classpath or filesystem depending on the value here.
- /Users/interlok/work/runtime/my.jslt - either file or classpath
- my.jslt - either file or classpath
- file:////Users/interlok/path/to/my.jslt - considered an absolute local file URL, but classpath will be checked as a last resort for /Users/interlok/path/to/my.jslt
- file:///C:/Users/interlok/path/to/my.jslt - explicit absolute URL (windows style)
- https://myserver.com/path/to/my.jslt - explicit absolute URL supported by the JVM
This also supports the
%message{}syntax to resolve metadata.- See Also:
-
getVariables
Any additional variables you want to pass into the JSLT transformation.Check passing values to jslt for what this means. Conceptually it is very similar to
XmlTransformParametersif you have dynamic values that you need to provide to your JSLT mapping. -
setVariables
Any additional variables you want to pass into the JSLT transformation.Check passing values to jslt for what this means. Conceptually it is very similar to
XmlTransformParametersif you have dynamic values that you need to provide to your JSLT mapping. -
getConnection
The connection that wraps any underlying caching required.When using the cache note that the JSLT Expression is not serializable so distributed caches may not work as you expect; in this instance the cache key will be the URL as resolved during first execution.
This defaults to a normal
CacheConnectionwith aNullCacheImplementationif not explicit configured.- Specified by:
getConnectionin interfaceConnectedService
-
setConnection
The connection that wraps any underlying caching required.When using the cache note that the JSLT Expression is not serializable so distributed caches may not work as you expect; in this instance the cache key will be the URL as resolved during first execution.
This defaults to a normal
CacheConnectionwith aNullCacheImplementationif not explicit configured.- Specified by:
setConnectionin interfaceConnectedService
-