public class AppCacheManifestTransformer extends ResourceTransformerSupport
ResourceTransformer
implementation that helps handling resources
within HTML5 AppCache manifests for HTML5 offline applications.
This transformer:
ResourceResolver
strategies
This hash is computed using the content of the appcache manifest and the content of the linked resources; so changing a resource linked in the manifest or the manifest itself should invalidate the browser cache.
Constructor and Description |
---|
AppCacheManifestTransformer()
Create an AppCacheResourceTransformer that transforms files with extension ".manifest".
|
AppCacheManifestTransformer(java.lang.String fileExtension)
Create an AppCacheResourceTransformer that transforms files with the extension
given as a parameter.
|
Modifier and Type | Method and Description |
---|---|
Resource |
transform(HttpServletRequest request,
Resource resource,
ResourceTransformerChain transformerChain)
Transform the given resource.
|
getResourceUrlProvider, resolveUrlPath, setResourceUrlProvider
public AppCacheManifestTransformer()
public AppCacheManifestTransformer(java.lang.String fileExtension)
public Resource transform(HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain) throws java.io.IOException
ResourceTransformer
request
- the current requestresource
- the resource to transformtransformerChain
- the chain of remaining transformers to delegate tonull
)java.io.IOException
- if the transformation fails