@Service(value="blResourceMinificationService") public class ResourceMinificationServiceImpl extends Object implements ResourceMinificationService
ResourceMinificationService| Modifier and Type | Field and Description | 
|---|---|
| protected static String | COULD_NOT_MINIFY_RESOURCES_RETURNED_UNMINIFIED_BYTES | 
| static String | CSS_MIN | 
| static String | CSS_TYPE | 
| protected CssMinificationService | cssMinificationService | 
| protected org.springframework.core.env.Environment | environment | 
| static String | JS_MIN | 
| static String | JS_TYPE | 
| protected JavascriptMinificationService | jsMinificationService | 
| protected static org.apache.commons.logging.Log | LOG | 
| protected static String | MINIFICATION_IS_DISABLED_RETURNING_ORIGINAL_RESOURCE | 
| Constructor and Description | 
|---|
| ResourceMinificationServiceImpl() | 
| Modifier and Type | Method and Description | 
|---|---|
| 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 boolean | isPreviouslyMinifiedFile(org.springframework.core.io.Resource originalResource) | 
| 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 minified version. | 
| byte[] | minify(String filename,
      byte[] bytes)Given the source byte[], will return a byte[] that represents the minified version of the byte[] | 
protected static final org.apache.commons.logging.Log LOG
protected static final String MINIFICATION_IS_DISABLED_RETURNING_ORIGINAL_RESOURCE
protected static final String COULD_NOT_MINIFY_RESOURCES_RETURNED_UNMINIFIED_BYTES
public static String CSS_TYPE
public static String JS_TYPE
public static String JS_MIN
public static String CSS_MIN
@Autowired protected org.springframework.core.env.Environment environment
@Autowired protected JavascriptMinificationService jsMinificationService
@Autowired protected CssMinificationService cssMinificationService
public boolean getEnabled()
ResourceMinificationServicegetEnabled 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 minified version.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 boolean isPreviouslyMinifiedFile(org.springframework.core.io.Resource originalResource)
Copyright © 2020. All rights reserved.