class DefaultResourceResolverChain extends java.lang.Object implements ResourceResolverChain
ResourceResolverChain
for invoking a list
of ResourceResolver
s.Modifier and Type | Field and Description |
---|---|
private int |
index |
private java.util.List<ResourceResolver> |
resolvers |
Constructor and Description |
---|
DefaultResourceResolverChain(java.util.List<? extends ResourceResolver> resolvers) |
Modifier and Type | Method and Description |
---|---|
private ResourceResolver |
getNext() |
Resource |
resolveResource(HttpServletRequest request,
java.lang.String requestPath,
java.util.List<? extends Resource> locations)
Resolve the supplied request and request path to a
Resource that
exists under one of the given resource locations. |
java.lang.String |
resolveUrlPath(java.lang.String resourcePath,
java.util.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.
|
private final java.util.List<ResourceResolver> resolvers
private int index
public DefaultResourceResolverChain(java.util.List<? extends ResourceResolver> resolvers)
public Resource resolveResource(HttpServletRequest request, java.lang.String requestPath, java.util.List<? extends Resource> locations)
ResourceResolverChain
Resource
that
exists under one of the given resource locations.resolveResource
in interface ResourceResolverChain
request
- the current requestrequestPath
- the portion of the request path to uselocations
- the locations to search in when looking up resourcesnull
if unresolvedpublic java.lang.String resolveUrlPath(java.lang.String resourcePath, java.util.List<? extends Resource> locations)
ResourceResolverChain
This is useful when rendering URL links to clients.
resolveUrlPath
in interface ResourceResolverChain
resourcePath
- the internal resource pathlocations
- the locations to search in when looking up resourcesnull
if unresolvedprivate ResourceResolver getNext()