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 2012/11/19 11:18:58 UTC

[jira] [Updated] (SLING-2670) Add support for suffix addressed resources

     [ https://issues.apache.org/jira/browse/SLING-2670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-2670:
-------------------------------------

    Attachment: SLING-2670.patch

Sounds reasonable. The implementation could be as simple as the attached patch.
                
> Add support for suffix addressed resources
> ------------------------------------------
>
>                 Key: SLING-2670
>                 URL: https://issues.apache.org/jira/browse/SLING-2670
>             Project: Sling
>          Issue Type: Improvement
>          Components: API
>            Reporter: Tobias Bocanegra
>            Priority: Minor
>         Attachments: SLING-2670.patch
>
>
> For web applications like user consoles or administration panels, it's common to store the layout information in the content (resource). This content can then be addressed naturally and the respective scripts then used to render the GUI of the console. When the console need to display information of existing resources, their path needs to be passed in the URL as well. one option is a query parameter, another the request suffix.
> eg:
> http://localhost:8080/content/webconsole/grid.html/content/products
> Every script or servlet needs to transform the suffix into a resource with something like:
> Resource targetResource = request.getResourceResolver().getResource(request.getRequestPathInfo().getSuffix());
> which is a bit repetitive, error prone and not cached.
> therefor I sugest to introduce:
> org.apache.sling.api.request.RequestPathInfo {
>     /**
>      * Returns the resource addressed by the suffix or null if the resource does not exist. The suffix is
>      * considered to address the resource directly as path.
>      */
>     Resource getSuffixResource();
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira