|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.resource.CssUrlReplacer
public class CssUrlReplacer
This compressor is used to replace URLs within CSS files with URLs created from
PackageResourceReferences that belongs to their corresponding resources (e.g images).The scope of
the CSS file is used to create the PackageResourceReferences. The compress method is not
compressing any content, but replacing the URLs with Wicket representatives.
Usage:
this.getResourceSettings().setCssCompressor(new CssUrlReplacer());
Field Summary | |
---|---|
static String |
EMBED_BASE64
Used to be append to CSS URLs (background-image: url('Beer.gif?embedBase64');). |
Constructor Summary | |
---|---|
CssUrlReplacer()
Creates a css url replacer |
|
CssUrlReplacer(Collection<String> excludes)
Creates a css url replacer |
Method Summary | |
---|---|
String |
compress(String original)
Remove comments and white spaces from the text resource |
Collection<String> |
getExcludes()
Gets excluded css file names |
String |
process(String input,
Class<?> scope,
String name)
Replaces the URLs of CSS resources with Wicket representatives. |
void |
setExcludes(Collection<String> excludes)
Sets a list of css file names to be excluded |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EMBED_BASE64
Constructor Detail |
---|
public CssUrlReplacer()
public CssUrlReplacer(Collection<String> excludes)
excludes
- css file names to be excludedMethod Detail |
---|
public String process(String input, Class<?> scope, String name)
process
in interface IScopeAwareTextResourceProcessor
input
- The original input to processscope
- The scope class of the package resourcename
- The name of the package resource
public String compress(String original)
ITextResourceCompressor
compress
in interface ITextResourceCompressor
public Collection<String> getExcludes()
public void setExcludes(Collection<String> excludes)
excludes
- a list with css file names to be excluded
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |