Class JsltTransformService

    • Constructor Detail

      • JsltTransformService

        public JsltTransformService()
    • Method Detail

      • getUrl

        public java.lang.String 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:
        ResourceLocator
      • setUrl

        public void setUrl​(java.lang.String url)
        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:
        ResourceLocator
      • getVariables

        @NonNull
        public @NonNull JsltVariables 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 XmlTransformParameters if you have dynamic values that you need to provide to your JSLT mapping.

      • setVariables

        public void setVariables​(@NonNull
                                 @NonNull JsltVariables variables)
        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 XmlTransformParameters if you have dynamic values that you need to provide to your JSLT mapping.

      • getConnection

        public AdaptrisConnection 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 CacheConnection with a NullCacheImplementation if not explicit configured.

        Specified by:
        getConnection in interface ConnectedService
      • setConnection

        public void setConnection​(AdaptrisConnection connection)
        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 CacheConnection with a NullCacheImplementation if not explicit configured.

        Specified by:
        setConnection in interface ConnectedService