ResourceTransformer with an optional helper method
for resolving public links within a transformed resource.
| Modifier and Type | Field and Description |
|---|---|
| private ResourceUrlProvider |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private ResourceUrlProvider | |
| public ResourceUrlProvider | |
| protected String | Returns: the resolved URL, or if not resolvablethe path to a resource that needs to be re-written resourcePath, HttpServletRequest the current request request, Resource the resource being transformed resource, ResourceTransformerChain the transformer chain transformerChain)A transformer can use this method when a resource being transformed contains links to other resources. |
| public void | setResourceUrlProvider(ResourceUrlProvider resourceUrlProvider)
Configure a |
| protected String | Returns: the absolute request path for the given resource paththe relative path to transform path, HttpServletRequest the referer request request)Transform the given relative request path to an absolute path, taking the path of the given request as a point of reference. |
| resourceUrlProvider | back to summary |
|---|---|
| private ResourceUrlProvider resourceUrlProvider
| |
| ResourceTransformerSupport | back to summary |
|---|---|
| public ResourceTransformerSupport() | |
| findResourceUrlProvider | back to summary |
|---|---|
private ResourceUrlProvider findResourceUrlProvider(HttpServletRequest request)
| |
| getResourceUrlProvider | back to summary |
|---|---|
| public ResourceUrlProvider getResourceUrlProvider() Return the configured
| |
| resolveUrlPath | back to summary |
|---|---|
| protected String resolveUrlPath(String resourcePath, HttpServletRequest request, Resource resource, ResourceTransformerChain transformerChain) A transformer can use this method when a resource being transformed contains links to other resources. Such links need to be replaced with the public facing link as determined by the resource resolver chain (e.g. the public URL may have a version inserted).
| |
| setResourceUrlProvider | back to summary |
|---|---|
| public void setResourceUrlProvider(ResourceUrlProvider resourceUrlProvider) Configure a | |
| toAbsolutePath | back to summary |
|---|---|
| protected String toAbsolutePath(String path, HttpServletRequest request) Transform the given relative request path to an absolute path, taking the path of the given request as a point of reference. The resulting path is also cleaned from sequences like "path/..".
| |