public class DefaultResourceResolver extends Object implements DelegateResourceResolver
AbstractPrefixedLookupPathResolver
to manage a default
case (no lookup found).Constructor and Description |
---|
DefaultResourceResolver(AbstractPrefixedLookupPathResolver delegate)
Initialize the resolver with the mandatory delegate.
|
Modifier and Type | Method and Description |
---|---|
ResourceResolver |
getActualResourceResolver()
Finds the final delegated
ResourceResolver by any level of
delegation. |
Resource |
getResource(ResourcePath path)
Find the resource using the resource path (or its name).
|
ResolvedPath |
resolve(ResourcePath path)
Resolves an unresolved/string path into a
ResolvedPath . |
boolean |
supports(ResourcePath path)
Indicates if the resource path can be handled by this resource resolver
or not.
|
public DefaultResourceResolver(AbstractPrefixedLookupPathResolver delegate)
delegate
- the resolver that will do the real resource resolutionpublic ResolvedPath resolve(ResourcePath path)
ResourceResolver
ResolvedPath
.resolve
in interface ResourceResolver
path
- the path to the resourcepublic boolean supports(ResourcePath path)
ResourceResolver
supports
in interface ResourceResolver
path
- the name or the path of the resourcepublic Resource getResource(ResourcePath path) throws ResourceResolutionException
ResourceResolver
getResource
in interface ResourceResolver
path
- the path of the resourceResourceResolutionException
- when the resource couldn't be foundpublic ResourceResolver getActualResourceResolver()
DelegateResourceResolver
ResourceResolver
by any level of
delegation.getActualResourceResolver
in interface DelegateResourceResolver
ResourceResolver
that can be translated to an template
engine adapterCopyright © 2021. All rights reserved.