public interface ResourceBundlingService
ResourceBundleProcessor
and
ResourcePreloadProcessor
to generate bundles for static resources.Modifier and Type | Method and Description |
---|---|
boolean |
checkForRegisteredBundleFile(String versionedBundleName)
Tells if the given versioned bundle exists
|
List<String> |
findBundlesNameByResourceFileName(String fileName)
Returns names of bundles which contain the given file
|
List<String> |
getAdditionalBundleFiles(String bundleName)
Through configuration, you can provide additional files that will be automatically included for any bundle.
|
org.springframework.core.io.Resource |
rebuildBundledResource(String requestedBundleName)
Returns a newly rebuilt bundled resource given that the passed requestedBundleName had previously been built and cached/persisted via
the
resolveBundleResourceName(String, String, List) method. |
boolean |
removeBundle(String bundleName) |
org.springframework.core.io.Resource |
resolveBundleResource(String versionedBundleResourceName)
Returns a Resource for passed in versionedBundleResourceName.
|
String |
resolveBundleResourceName(String requestedBundleName,
String mappingPrefix,
List<String> files)
Returns a file name representing a versioned copy of the bundle.
|
String |
resolveBundleResourceName(String requestedBundleName,
String mappingPrefix,
List<String> files,
String bundleAppend)
Returns a file name representing a versioned copy of the bundle with the
bundleAppend text appended
to the end of the bundle. |
org.springframework.core.io.Resource rebuildBundledResource(String requestedBundleName)
resolveBundleResourceName(String, String, List)
method.requestedBundleName
- the requested bundle nameString resolveBundleResourceName(String requestedBundleName, String mappingPrefix, List<String> files)
First computes the bundle version by examining the files in the bundle. If the bundle does not exist, this method will create it.
requestedBundleName
- the requested bundle namemappingPrefix
- the path prefix for the bundlefiles
- the files the bundle should containString resolveBundleResourceName(String requestedBundleName, String mappingPrefix, List<String> files, String bundleAppend)
bundleAppend
text appended
to the end of the bundle.
First computes the bundle version by examining the files in the bundle. If the bundle does not exist, this method will create it.
requestedBundleName
- the requested bundle namemappingPrefix
- the path prefix for the bundlefiles
- the files the bundle should containbundleAppend
- the text to append at the end of the bundleorg.springframework.core.io.Resource resolveBundleResource(String versionedBundleResourceName)
If the bundle does not exist, this method will attempt to create it by using the list
of files that were registered with the initial call to
resolveBundleResourceName(String, String, List)
versionedBundleResourceName
- the versioned bundle resource nameList<String> getAdditionalBundleFiles(String bundleName)
bundleName
- the name of the bundle to get additional files forboolean checkForRegisteredBundleFile(String versionedBundleName)
versionedBundleName
- the versioned bundle nameList<String> findBundlesNameByResourceFileName(String fileName)
fileName
- file to find in the bungleboolean removeBundle(String bundleName)
Copyright © 2022. All rights reserved.