Class DefaultJavascriptProcessor
- java.lang.Object
-
- com.composum.sling.clientlibs.processor.AbstractClientlibRenderer
-
- com.composum.sling.clientlibs.processor.DefaultJavascriptProcessor
-
- All Implemented Interfaces:
JavascriptProcessor
,ClientlibProcessor
,ClientlibRenderer
public class DefaultJavascriptProcessor extends AbstractClientlibRenderer implements JavascriptProcessor
Since there is currently (as of mid-2017) no Java javascript minifier library that works sufficiently well, this does nothing and relies on minified siblings for each javascript, generated e.g. with minify-maven-plugin. (Yui is not sufficient.)
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientlibConfiguration
clientlibConfig
-
Fields inherited from interface com.composum.sling.clientlibs.service.ClientlibProcessor
DEFAULT_CHARSET
-
-
Constructor Summary
Constructors Constructor Description DefaultJavascriptProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getLinkTemplate()
The link template we use when rendering.InputStream
processContent(InputStream source, ProcessorContext context)
Transforms the content and result in a stream with the probably changed content - for pipes.-
Methods inherited from class com.composum.sling.clientlibs.processor.AbstractClientlibRenderer
renderClientlibLinks, renderClientlibLinks
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.composum.sling.clientlibs.service.ClientlibRenderer
renderClientlibLinks
-
-
-
-
Field Detail
-
clientlibConfig
protected ClientlibConfiguration clientlibConfig
-
-
Method Detail
-
getLinkTemplate
protected String getLinkTemplate()
Description copied from class:AbstractClientlibRenderer
The link template we use when rendering.- Specified by:
getLinkTemplate
in classAbstractClientlibRenderer
-
processContent
public InputStream processContent(InputStream source, ProcessorContext context)
Description copied from interface:ClientlibProcessor
Transforms the content and result in a stream with the probably changed content - for pipes.- Specified by:
processContent
in interfaceClientlibProcessor
- Parameters:
source
- the original to process by the processor. the processor returns a different stream, this must be closed by the processor.- Returns:
- the transformation result - might also be the originial sourceStream if switched off
-
-