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

Tobias Bocanegra commented on SLING-848:
----------------------------------------

so consequently (according to rfc3986) , the v= parameter should be applicable 
to each segment. eg:

/content/home;v=1.0/tobi;v=1.5

(assuming  /content/home/tobi is currently deleted and did only exist in the 
version 1.0 of the 'home')

what is the "external" form of this?, probably:

/content/home;v=1.0/tobi.html;v=1.5

having the .html at the end makes no sense. 

but this makes each script logic that just appends the .html to the resource 
path pretty useless. 
the problem you have is:
- if you include the v= to the resource.getPath() the resource gets unusable 
for "normal" scripts,
- if you omit it from the path, the getResource() / getPath() is not symmetric

so maybe this is not such a good idea after all?


btw: i think the "component" of this issue is wrong.


> Support getting versioned resources by using uri path parameters
> ----------------------------------------------------------------
>
>                 Key: SLING-848
>                 URL: https://issues.apache.org/jira/browse/SLING-848
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR Install
>    Affects Versions: JCR Resource 2.0.2
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: JCR Resource 2.0.4
>
>
> Getting versioned content should be support thorough uri path parameters, 
> like /something/hello;v=1.1
> For jcr based resources the value of the version should either point to a 
> version name or label.
> In order to not change our existing apis, we introduce a new utility method 
> which removes all uri path parameters
> and returns a map of these. Every resource provider could use this utility 
> method and then decide to act on these
> parameters.
> If a requested version does not exists, a 404 is returned.
> If the requested node does not directly point to a versionable node, the 
> algorithm checks the parent hierarchy until a versionable node is found, and 
> tries to get the version of this node and then goes down the path again. If 
> the versionable node does not have the requested version or the child, a 404 
> is returned.

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

Reply via email to