@Service(value="blResourceBundlingService") public class ResourceBundlingServiceImpl extends Object implements ResourceBundlingService
ResourceBundlingService
Modifier and Type | Field and Description |
---|---|
protected Map<String,List<String>> |
additionalBundleFiles |
protected String |
assetFileSystemPath |
protected Map<String,Collection<org.springframework.core.io.Resource>> |
bundles |
protected net.sf.ehcache.Cache |
bundleVersionsCache |
protected static String |
DEFAULT_STORAGE_DIRECTORY |
protected static org.apache.commons.logging.Log |
LOG |
protected ResourceMinificationService |
minifyService |
Constructor and Description |
---|
ResourceBundlingServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.core.io.Resource |
createBundle(String versionedBundleName) |
Map<String,List<String>> |
getAdditionalBundleFiles() |
List<String> |
getAdditionalBundleFiles(String bundleName) |
org.springframework.core.io.Resource |
getBundle(String versionedBundleName)
For the given versioned bundle name, returns a Resource that holds the contents of the combined, and
possibly minified (if enabled) bundle.
|
protected String |
getBundleName(String bundleName,
String version) |
protected String |
getBundleVersion(LinkedHashMap<String,org.springframework.core.io.Resource> foundResources) |
protected net.sf.ehcache.Cache |
getBundleVersionsCache() |
protected String |
getFilePath(String name) |
String |
getVersionedBundleName(String unversionedBundleName)
For a given unversioned bundle name, such as "global.js", returns the currently known versioned bundle
name, such as "global12345.js".
|
boolean |
hasBundle(String versionedBundle) |
protected org.springframework.core.io.Resource |
readBundle(String versionedBundleName) |
String |
registerBundle(String bundleName,
List<String> files,
BroadleafResourceHttpRequestHandler handler)
Registers a new bundle with the given name to its files.
|
protected void |
saveBundle(org.springframework.core.io.Resource resource) |
void |
setAdditionalBundleFiles(Map<String,List<String>> additionalBundleFiles) |
protected static final org.apache.commons.logging.Log LOG
protected static final String DEFAULT_STORAGE_DIRECTORY
protected Map<String,Collection<org.springframework.core.io.Resource>> bundles
protected net.sf.ehcache.Cache bundleVersionsCache
@Value(value="${asset.server.file.system.path}") protected String assetFileSystemPath
protected ResourceMinificationService minifyService
public org.springframework.core.io.Resource getBundle(String versionedBundleName)
ResourceBundlingService
getBundle
in interface ResourceBundlingService
protected org.springframework.core.io.Resource readBundle(String versionedBundleName)
protected org.springframework.core.io.Resource createBundle(String versionedBundleName)
protected void saveBundle(org.springframework.core.io.Resource resource)
public String getVersionedBundleName(String unversionedBundleName)
ResourceBundlingService
getVersionedBundleName
in interface ResourceBundlingService
public boolean hasBundle(String versionedBundle)
hasBundle
in interface ResourceBundlingService
public String registerBundle(String bundleName, List<String> files, BroadleafResourceHttpRequestHandler handler) throws IOException
ResourceBundlingService
registerBundle
in interface ResourceBundlingService
IOException
protected String getBundleVersion(LinkedHashMap<String,org.springframework.core.io.Resource> foundResources) throws IOException
IOException
public List<String> getAdditionalBundleFiles(String bundleName)
getAdditionalBundleFiles
in interface ResourceBundlingService
public void setAdditionalBundleFiles(Map<String,List<String>> additionalBundleFiles)
protected net.sf.ehcache.Cache getBundleVersionsCache()
Copyright © 2014. All rights reserved.