You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/01/29 14:31:37 UTC

[jira] Commented: (SLING-198) Extend ResourceResolver to make it more flexible

    [ https://issues.apache.org/jira/browse/SLING-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563516#action_12563516 ] 

Felix Meschberger commented on SLING-198:
-----------------------------------------

Added method definitions to the Sling API in Rev. 616302.

> Extend ResourceResolver to make it more flexible
> ------------------------------------------------
>
>                 Key: SLING-198
>                 URL: https://issues.apache.org/jira/browse/SLING-198
>             Project: Sling
>          Issue Type: Improvement
>          Components: API, Resource, ServletResolver
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> As a result of defining a virtual resource tree (SLING-197) we have a need to modify the ResourceResolver API in two respects:
> (1) Add ResourceResolver.resolve(String absPath)
> This method behaves exactly as ResourceResolver.resolve(HttpServletRequest) except, that the latter method may make use of additional request properties, such as request headers or parameters while the resolve(String) method only has the string to work on.
> Currently the resolve(HttpServletRequest) method does nothing more than use the HttpServletRequest.getPathInfo() to resolve the resource, thus both implementations would actually be equivalent.
> The absPath argument is an absolute path. Resolution fails for relative paths.
> (2) Support relative paths in ResourceResolver.getResource(String path)
> Currently this method is defined to throw a SlingException if the path is relative. This should be changed such that the ResourceResolver applies some search path logic to find a resource with the given relative path
> The search path logic is comparable to how *nix systems use the PATH environment variable.
> This method may then be used by multiple users such as Servlet/Script resolution.
> (3) Add ResourceResolver.map(String) method
> This method applies the reverse mappings of the ResourceResolver.resolve(String absPath) method to return a path suitable for both resolver() methods. This allows for the creation of link paths for resources.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.