Resolves the resource from the given
absPath
optionally taking
HttpServletRequest
into account, such as the value of the
Host
request header. Returns a {@link NonExistingResource} if the path cannot be resolved to an existingand accessible resource.
The difference between this method and the {@link #resolve(String)}method is, that this method may take request properties like the scheme, the host header or request parameters into account to resolve the resource.
@param request The http servlet request object providing more hints athow to resolve the absPath
. This parameter may be null
in which case the implementation should use reasonable defaults.
@param absPath The absolute path to be resolved to a resource. If thisparameter is null
, it is assumed to address the root of the resource tree. If the path is relative it is assumed relative to the root, that is a slash is prepended to the path before resolving it.
@return The {@link Resource} addressed by the absPath
or a{@link NonExistingResource} if no such resource can be resolved.
@throws org.apache.sling.api.SlingException Or a subclass thereof may bethrown if an error occurs trying to resolve the resource.
@throws IllegalStateException if this resource resolver has already been{@link #close() closed}.
@since 2.0.4