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

Tomek Rękawek commented on SLING-4318:
--------------------------------------

The {{;v=1.0}} parameter support has been implemented in SLING-848. I also 
prepared two other features related to versioning, mentioned in the comment 
above:

*Version list servlet*

Using *V* selector allows to get the version history for a given resource. Data 
are presented in following format:

{code}
curl http://localhost:4502/content/test.V.tidy.json
{
  "jcr:rootVersion": {
    "created": "Fri Jan 23 2015 11:02:09 GMT+0100",
    "successors": ["1.0"],
    "predecessors": [],
    "labels": ["firstVersion"],
    "baseVersion": false
    },
  "1.0": {
    "created": "Fri Jan 23 2015 11:02:11 GMT+0100",
    "successors": ["1.1"],
    "predecessors": ["jcr:rootVersion"],
    "labels": ["secondVersion", "afterChanges"],
    "baseVersion": true
  }
}
{code}

Pull request: https://github.com/apache/sling/pull/58/files

*Restore operation*

The new {{:operation=restore parameter}} allows to restore a resource to a 
given version referenced by name or label:

{code}
curl -X POST -F :operation=restore -F :version=1.0 
http://localhost:4502/content/test
{code}

Pull request: https://github.com/apache/sling/pull/59/files

I'm looking forward to feedback.

> Sling resource API does not expose any versioning features - bounty offered.
> ----------------------------------------------------------------------------
>
>                 Key: SLING-4318
>                 URL: https://issues.apache.org/jira/browse/SLING-4318
>             Project: Sling
>          Issue Type: New Feature
>          Components: Documentation, JCR, Servlets
>    Affects Versions: Servlets Resolver 2.3.8
>         Environment: N/A
>            Reporter: Bruce Edge
>              Labels: api, crud, servlet-api, versioning, versions
>
> The javax.jcr.version.VersionManager is not exposed in the sling resource API:
> http://thread.gmane.org/gmane.comp.apache.sling.user/1610
> My company is interested in paying for this development. Please contact if 
> interested.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to