@Service(value="blResourceBundlingService") public class ResourceBundlingServiceImpl extends Object implements ResourceBundlingService
ResourceBundlingService| Modifier and Type | Field and Description |
|---|---|
protected Map<String,List<String>> |
additionalBundleFiles |
protected Map<String,Collection<org.springframework.core.io.Resource>> |
bundles |
protected net.sf.ehcache.Cache |
bundleVersionsCache |
protected ResourceRequestExtensionManager |
extensionManager |
protected BroadleafFileService |
fileService |
protected static org.apache.commons.logging.Log |
LOG |
protected ResourceMinificationService |
minifyService |
protected StatisticsService |
statisticsService |
| 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) |
Map<String,Collection<org.springframework.core.io.Resource>> |
getBundles() |
protected String |
getBundleVersion(LinkedHashMap<String,org.springframework.core.io.Resource> foundResources) |
net.sf.ehcache.Cache |
getBundleVersionsCache() |
protected String |
getCacheKey(String unversionedBundleName) |
protected String |
getResourcePath(String name)
Returns the resource path for the given name in URL-format (meaning, / separators)
|
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 Map<String,Collection<org.springframework.core.io.Resource>> bundles
protected net.sf.ehcache.Cache bundleVersionsCache
protected BroadleafFileService fileService
protected ResourceMinificationService minifyService
protected StatisticsService statisticsService
protected ResourceRequestExtensionManager extensionManager
public org.springframework.core.io.Resource getBundle(String versionedBundleName)
ResourceBundlingServicegetBundle in interface ResourceBundlingServiceprotected org.springframework.core.io.Resource readBundle(String versionedBundleName)
protected String getResourcePath(String name)
name - protected org.springframework.core.io.Resource createBundle(String versionedBundleName)
protected void saveBundle(org.springframework.core.io.Resource resource)
public String getVersionedBundleName(String unversionedBundleName)
ResourceBundlingServicegetVersionedBundleName in interface ResourceBundlingServicepublic boolean hasBundle(String versionedBundle)
hasBundle in interface ResourceBundlingServicepublic String registerBundle(String bundleName, List<String> files, BroadleafResourceHttpRequestHandler handler) throws IOException
ResourceBundlingServiceregisterBundle in interface ResourceBundlingServiceIOExceptionprotected String getBundleVersion(LinkedHashMap<String,org.springframework.core.io.Resource> foundResources) throws IOException
IOExceptionpublic List<String> getAdditionalBundleFiles(String bundleName)
getAdditionalBundleFiles in interface ResourceBundlingServicepublic void setAdditionalBundleFiles(Map<String,List<String>> additionalBundleFiles)
public net.sf.ehcache.Cache getBundleVersionsCache()
getBundleVersionsCache in interface ResourceBundlingServicepublic Map<String,Collection<org.springframework.core.io.Resource>> getBundles()
getBundles in interface ResourceBundlingServiceCopyright © 2014. All rights reserved.