Hello,

the topic has been moved from the Sling Users List, as we went from support
to development :)

On Thu, Jan 15, 2015 at 3:08 PM, Bertrand Delacretaz wrote:


> On Thu, Jan 15, 2015 at 3:38 PM, Robert Munteanu <rombert@...> wrote:
> > ...You _might_ be able to get away with creating a new resource provider,
> > based on the jcr resource provider....



(...)



This comes up from time to time but for some reason it seems like no
> one needed this enough to implement it so far. But that would be a
> good addition to Sling IMO.


Last week I spend some time on implementing the versioning support.
Creating new version was already possible (via :operation=checkin and
checkout), so to complete the support I added 3 features:

1. Returning given version of the resource via semicolon-separated
parameters

It was already discussed 5 years ago in the SLING-848. I added the
parameters support in ResourceResolver and modified the JcrResourceResolver
to handle the v parameter. More info on the implementation and the pull
request can be found in the JIRA comment [1].

2. Listing all versions

Bertrand suggested that new GET servlet bound to V selector and json
extension could display all versions. I implemented this as a part of the
SLING-4318. Pull request and description in JIRA comment [2].

3. Restoring old version

I added new SlingPostServlet operation [3] to restore a version referenced
by its number or label. Implemented as a part of the SLING-4318. Pull
request and description in the same comment as above [2].

Looking forward to some feedback, especially from people involved in the
previous discussions on Sling Users and JIRA-848.

[1]
https://issues.apache.org/jira/browse/SLING-848?focusedCommentId=14288340
[2]
https://issues.apache.org/jira/browse/SLING-4318?focusedCommentId=14289243
[3]
http://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html#slingpostservlet-operations

Best regards,
Tomek

-- 
Tomek Rękawek
Senior Software Engineer

Cognifide Polska Sp. z o.o.
skype: trekawek

www.cognifide.com

Reply via email to