Class ResourcesRequest
java.lang.Object
org.broadleafcommerce.common.web.request.ResourcesRequest
Keeps track of the resources needed for <blc:bundle> and <blc:bundlepreload> tags so that the list
of files does not need to be duplicated across both tags.
- Author:
- Jacob Mitash
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the bundle for the bundle name, prefix, and file list if previously used on this request.void
Saves the bundled file to the request so it can be recalled later in the templatevoid
Saves the bundled file to the request so it can be recalled later in the template
-
Field Details
-
bundlesRequested
-
-
Constructor Details
-
ResourcesRequest
public ResourcesRequest()
-
-
Method Details
-
getBundle
public ResourcesRequestBundle getBundle(@Nonnull String name, String mappingPrefix, List<String> files) Gets the bundle for the bundle name, prefix, and file list if previously used on this request.Note that the mapping prefix and file list will be assumed to be the same if not provided.
- Parameters:
name
- the name of the bundle to search formappingPrefix
- the mapping prefix of the bundle request, or null if not providedfiles
- the list of files of the bundle request, or null if not provided- Returns:
- the bundle request if found, otherwise null
-
saveBundle
Saves the bundled file to the request so it can be recalled later in the template- Parameters:
name
- the name of the bundlemappingPrefix
- the mapping prefix of the bundlefiles
- the list of files in the bundlebundlePath
- the path of the resulting bundle
-
saveBundle
public void saveBundle(String name, String mappingPrefix, List<String> files, List<String> bundledFilePaths) Saves the bundled file to the request so it can be recalled later in the template- Parameters:
name
- the name of the bundlemappingPrefix
- the mapping prefix of the bundlefiles
- the list of files in the bundlebundledFilePaths
- the list of unbundled file paths to include in the template
-