@Service(value="blResourceMinificationService") public class ResourceMinificationServiceImpl extends Object implements ResourceMinificationService
ResourceMinificationService| Modifier and Type | Field and Description |
|---|---|
static String |
CSS_TYPE |
protected boolean |
disableOptimizations |
static String |
JS_TYPE |
protected int |
linebreak |
protected static org.apache.commons.logging.Log |
LOG |
protected boolean |
munge |
protected boolean |
preserveAllSemiColons |
protected boolean |
verbose |
| Constructor and Description |
|---|
ResourceMinificationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllowSingleMinification()
Indicates whether or not the system is allowed to attempt to minify individual files.
|
boolean |
getEnabled()
Indicates whether or not the system is allowed to minify bundled resources.
|
protected String |
getFileType(org.springframework.core.io.Resource originalResource,
String filename)
Return a SupportedFileType
|
protected org.mozilla.javascript.ErrorReporter |
getLogBasedErrorReporter() |
protected void |
minify(BufferedReader in,
BufferedWriter out,
String filename,
String type) |
org.springframework.core.io.Resource |
minify(org.springframework.core.io.Resource originalResource)
Delegates to
ResourceMinificationService.minify(Resource, String) where the filename argument is originalResource.getFilename(). |
org.springframework.core.io.Resource |
minify(org.springframework.core.io.Resource originalResource,
String filename)
Given a
Resource, will return a resource that represents the YUI-compressor minified version. |
byte[] |
minify(String filename,
byte[] bytes)
Given the source byte[], will return a byte[] that represents the YUI-compressor minified version
of the byte[].
|
protected static final org.apache.commons.logging.Log LOG
public static String CSS_TYPE
public static String JS_TYPE
@Value(value="${minify.linebreak}")
protected int linebreak
@Value(value="${minify.munge}")
protected boolean munge
@Value(value="${minify.verbose}")
protected boolean verbose
@Value(value="${minify.preserveAllSemiColons}")
protected boolean preserveAllSemiColons
@Value(value="${minify.disableOptimizations}")
protected boolean disableOptimizations
public boolean getEnabled()
ResourceMinificationServicegetEnabled in interface ResourceMinificationServicepublic boolean getAllowSingleMinification()
ResourceMinificationServicegetAllowSingleMinification in interface ResourceMinificationServicepublic byte[] minify(String filename, byte[] bytes)
ResourceMinificationServiceminify in interface ResourceMinificationServicepublic org.springframework.core.io.Resource minify(org.springframework.core.io.Resource originalResource)
ResourceMinificationServiceResourceMinificationService.minify(Resource, String) where the filename argument is originalResource.getFilename().minify in interface ResourceMinificationServicepublic org.springframework.core.io.Resource minify(org.springframework.core.io.Resource originalResource,
String filename)
ResourceMinificationServiceResource, will return a resource that represents the YUI-compressor minified version.
The behavior of this method is controlled via the following properties:
minify in interface ResourceMinificationServiceprotected void minify(BufferedReader in, BufferedWriter out, String filename, String type) throws IOException
IOExceptionprotected String getFileType(org.springframework.core.io.Resource originalResource, String filename)
originalResource - filename - protected org.mozilla.javascript.ErrorReporter getLogBasedErrorReporter()
Copyright © 2017. All rights reserved.