Example usage for org.apache.wicket.css ICssCompressor compress

List of usage examples for org.apache.wicket.css ICssCompressor compress

Introduction

In this page you can find the example usage for org.apache.wicket.css ICssCompressor compress.

Prototype

String compress(String original);

Source Link

Document

Remove comments and white spaces from the text resource

Usage

From source file:org.artifactory.common.wicket.contributor.ResourcePackage.java

License:Open Source License

public ResourcePackage addCssTemplate(final String path) {
    add(new IHeaderContributor() {
        @Override/*from w ww. j  a v  a2s  .com*/
        public void renderHead(IHeaderResponse response) {
            String script = readInterpolatedString(path);
            ICssCompressor compressor = Application.get().getResourceSettings().getCssCompressor();
            if (compressor != null) {
                script = compressor.compress(script);
            }
            response.renderCSS(script, null);
        }
    });
    return this;
}