Interface ResourceResolverChain
public interface ResourceResolverChain
A contract for invoking a chain ofResourceResolver
s where each resolver is given a reference to the chain allowing it to delegate when necessary.- Since:
- 4.1
- Author:
- Jeremy Grelle, Rossen Stoyanchev, Sam Brannen
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Resource
resolveResource(HttpServletRequest request, String requestPath, List<? extends Resource> locations)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.String
resolveUrlPath(String resourcePath, List<? extends Resource> locations)
Resolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.
Method Detail
resolveResource
Resource resolveResource(HttpServletRequest request, String requestPath, List<? extends Resource> locations)
Resolve the supplied request and request path to aResource
that exists under one of the given resource locations.- Parameters:
request
- the current requestrequestPath
- the portion of the request path to uselocations
- the locations to search in when looking up resources- Returns:
- the resolved resource or
null
if unresolved
resolveUrlPath
String resolveUrlPath(String resourcePath, List<? extends Resource> locations)
Resolve the externally facing public URL path for clients to use to access the resource that is located at the given internal resource path.This is useful when rendering URL links to clients.
- Parameters:
resourcePath
- the internal resource pathlocations
- the locations to search in when looking up resources- Returns:
- the resolved public URL path or
null
if unresolved