public class ResourceStoreDownloadController extends Object
ConcatenatedResourceStore
.Constructor and Description |
---|
ResourceStoreDownloadController(ConcatenatedResourceStore concatenatedResourceStore,
boolean handleConcatenatedFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
download(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String categoryName,
String suffix)
Handler for a GET request which will stream the content of the resource category.
|
protected File |
getFile(String categoryName,
boolean minimized)
Get the file for the category.
|
protected long |
getTimestamp(String categoryName)
Get the last modification timestamp for the category.
|
public ResourceStoreDownloadController(ConcatenatedResourceStore concatenatedResourceStore, boolean handleConcatenatedFile)
concatenatedResourceStore
- The resource store used by this controller.handleConcatenatedFile
- whether to stream the concatenated file or the property resource@RequestMapping(method=GET) public void download(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @RequestParam(value="category",required=true) String categoryName, @RequestParam(value="suffix",required=false) String suffix) throws Exception
request
- the servlet requestresponse
- the responsecategoryName
- is populated with value of the category parameter which defines the category to
retrievesuffix
- is populated with the value of the suffix parameter which defines whether the
minimized (value: -min) or original (any other value, preferably: -org) version of
the resource should be returned. If this parameter is missing the configuration
for the content of the resource store is used and if undefined the minimized
version is returned.Exception
protected File getFile(String categoryName, boolean minimized)
categoryName
- the name of the categoryminimized
- whether to get the minimized version of the fileprotected long getTimestamp(String categoryName)
categoryName
- the name of the categoryCopyright © 2019 Communote team. All rights reserved.