org.broadleafcommerce.common.resource.service
Class ResourceMinificationServiceImpl

java.lang.Object
  extended by org.broadleafcommerce.common.resource.service.ResourceMinificationServiceImpl
All Implemented Interfaces:
ResourceMinificationService

@Service(value="blResourceMinificationService")
public class ResourceMinificationServiceImpl
extends Object
implements ResourceMinificationService

Author:
Andre Azzolini (apazzolini)
See Also:
ResourceMinificationService

Field Summary
protected  boolean disableOptimizations
           
protected  boolean enabled
           
protected  int linebreak
           
protected static org.apache.commons.logging.Log LOG
           
protected  boolean munge
           
protected  boolean preserveAllSemiColons
           
protected  boolean verbose
           
 
Constructor Summary
ResourceMinificationServiceImpl()
           
 
Method Summary
protected  org.mozilla.javascript.ErrorReporter getLogBasedErrorReporter()
           
 byte[] minify(String filename, byte[] bytes)
          Given the source byte[], will return a byte[] that represents the YUI-compressor minified version of the byte[].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG

enabled

@Value(value="${minify.enabled}")
protected boolean enabled

linebreak

@Value(value="${minify.linebreak}")
protected int linebreak

munge

@Value(value="${minify.munge}")
protected boolean munge

verbose

@Value(value="${minify.verbose}")
protected boolean verbose

preserveAllSemiColons

@Value(value="${minify.preserveAllSemiColons}")
protected boolean preserveAllSemiColons

disableOptimizations

@Value(value="${minify.disableOptimizations}")
protected boolean disableOptimizations
Constructor Detail

ResourceMinificationServiceImpl

public ResourceMinificationServiceImpl()
Method Detail

minify

public byte[] minify(String filename,
                     byte[] bytes)
Description copied from interface: ResourceMinificationService
Given the source byte[], will return a byte[] that represents the YUI-compressor minified version of the byte[]. The behavior of this method is controlled via the following properties:

Specified by:
minify in interface ResourceMinificationService
Returns:
the minified bytes

getLogBasedErrorReporter

protected org.mozilla.javascript.ErrorReporter getLogBasedErrorReporter()


Copyright © 2013. All Rights Reserved.