On Tue, Dec 30, 2014 at 5:47 PM, Bruce Edge <[email protected]> wrote: > I need to expose a CRUD API that allows the clients add new versions of > existing content as well as retrieve older versions of content. This seems > like something that has probably come up before so I was curious what the > appropriate sling-like API looked like for a versioned content pool. > I know that versioning is a JCR feature and not specifically associated with > sling, but as sling is the JCR REST API, what, if any, versioning features > are exposed from sling?
The Sling resource API does not expose any versioning features. > I may have missed the sling docs on this, if so, please just point me to them. > It feels wrong to code most of an app to sling's API, then reach around > behind it to deal with the versioning aspect. What I've turned up so far > seems to imply that this is what you have to do, i.e.: not use sling when > dealing with versions. You _might_ be able to get away with creating a new resource provider, based on the jcr resource provider. That provider will use the javax.jcr.version.VersionManager to return a Node-backed Resource for the requested version. Robert > Does the sling API recognize a mix:versionable node, and if so, how is it > treated differently. > > -Bruce >
