Hi,
I'm starting work on SLING-60, and I think I'll add this new interface
to the microsling.api package:
public interface ResourceResolver {
Result resolveResource(HttpServletRequest req) throws Exception;
public static class Result {
...
public Resource getResource();
// Indicates which part of the request URI path
// was used to resolve the resource (see SLING-60)
// This is usually the Resource's JCR path, but I have
// this vague feeling that decoupling them might be
// good (if only to expose this method here)
public String getResolutionPath();
}
}
In this way the (to be improved) SlingRequestPathInfoParser stays
decoupled, SlingRequestContext will pass it the above
getResolutionPath() so that the selectors, extensions and suffix take
the actual path used for resource resolution into account.
Comments are welcome (before it's too late ;-)
-Bertrand