Interface ResourceMinificationService
- All Known Implementing Classes:
ResourceMinificationServiceImpl
public interface ResourceMinificationService
Service responsible for interacting with YUI-compressor or Google Closure Compiler to minify JS/CSS resources.
Property to enable minification: minify.enabled - whether or not to actually perform minification
- Author:
- Andre Azzolini (apazzolini)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether or not the system is allowed to minify bundled resources.byte[]
Given the source byte[], will return a byte[] that represents the minified version of the byte[]org.springframework.core.io.Resource
minify
(org.springframework.core.io.Resource originalResource) Delegates tominify(Resource, String)
where the filename argument is originalResource.getFilename().org.springframework.core.io.Resource
Given aResource
, will return a resource that represents the minified version.
-
Method Details
-
minify
Given the source byte[], will return a byte[] that represents the minified version of the byte[]- Parameters:
filename
-bytes
-- Returns:
- the minified bytes
-
getEnabled
boolean getEnabled()Indicates whether or not the system is allowed to minify bundled resources.- Returns:
- the value of the system property "minify.enabled"
-
minify
org.springframework.core.io.Resource minify(org.springframework.core.io.Resource originalResource) Delegates tominify(Resource, String)
where the filename argument is originalResource.getFilename().- Parameters:
originalResource
-- Returns:
-
minify
org.springframework.core.io.Resource minify(org.springframework.core.io.Resource originalResource, String filename) Given aResource
, will return a resource that represents the minified version.- Parameters:
orginalResource
-the
- name of resource- Returns:
- The minified resource
-