Class CssUrlMapper
- java.lang.Object
-
- com.composum.sling.clientlibs.processor.CssUrlMapper
-
- All Implemented Interfaces:
ClientlibProcessor
public class CssUrlMapper extends Object implements ClientlibProcessor
A simple processor to map URLs embedded in CSS files.
-
-
Field Summary
Fields Modifier and Type Field Description static PatternURL_PATTERN-
Fields inherited from interface com.composum.sling.clientlibs.service.ClientlibProcessor
DEFAULT_CHARSET
-
-
Constructor Summary
Constructors Constructor Description CssUrlMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringmap(ProcessorContext context, String url)voidmap(String css, Writer writer, ProcessorContext context)InputStreamprocessContent(InputStream source, ProcessorContext context)Transforms the content and result in a stream with the probably changed content - for pipes.
-
-
-
Field Detail
-
URL_PATTERN
public static final Pattern URL_PATTERN
-
-
Method Detail
-
processContent
public InputStream processContent(InputStream source, ProcessorContext context) throws IOException
Description copied from interface:ClientlibProcessorTransforms the content and result in a stream with the probably changed content - for pipes.- Specified by:
processContentin 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
- Throws:
IOException
-
map
public void map(String css, Writer writer, ProcessorContext context)
-
map
public String map(ProcessorContext context, String url)
-
-