You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Richard Groote <ri...@luminis.eu> on 2019/06/25 13:02:40 UTC

Versioning and restoring

Hello,

Currently we’re trying to integrate Apache OAK within our project.
We using a hierarchy of nodes and a node can have different kind of properties (that’s why we’re using node type nt:unstructured)

Some simple example structure:

  *   Music (nt:unstructured, no actual properties)
     *   Rock (nt:unstructured, no actual properties)
        *   Metallica (nt:unstructured, with a lot of properties, including binaries)
        *   U2 (nt:unstructured, with a lot of properties, including binaries)



Some scenario’s

  *   Editing the node U2 and adding / updating some properties (should result in a new version)
  *   Move the node U2 to a different hierarchy (Should be able restore it)
  *   Remove some of the node
  *   Versioning the complete music tree with my own label (used versionhistory.addVersionLabel())
  *   Restore a complete or part of the tree
  *   Restore a node to a specific version

Now I’ve some questions about versioning and restoring:

  *   Is the nt:unstructured the best node type or should I use another one for instance nt:folder, nt:file (may be create my own)
  *   Nt:unstructured used OPV version. When I use versionhistory.getVersionByLabel() than the child information contains ‘jcr:childVersionHistory’. This child information points to a node. But in my case this node is no longer retrieval because it has been deleted. Is in this case better to use a node type with OPV Copy
  *   Restore by label is currently not implemented by OAK. Does anyone know about some example of restoring (part of) tree based on a label.

Thanx, for all information. May be I missed some documentation

Richard



Re: Versioning and restoring

Posted by Richard Groote <ri...@luminis.eu>.
Thanx Angela,

I had already read the page you've mentioned. I was wondering if there a more documentation available about best practices, examples, etc.

May be someone has some ideas which node type hierarchy should be used  and how to work with restoring (part of) a tree.
Currently working with nt:unstructured and therefore using reference ( jrc:childVersion) but I think that does work well when node has been removed or moved in a next version

Kind Regards,

Richard


 



On 25/06/2019, 16:09, "Angela Schreiber" <an...@adobe.com.INVALID> wrote:

    Hi Richard
    
    Version with Oak should work according to the specification which you find at 
    https://docs.adobe.com/docs/en/spec/jcr/2.0/15_Versioning.html
    
    This includes all the details regarding OPV behavior upon restore. However, I quickly checked the implementation in oak-jcr and restore by label is indeed not supported today. I am sure Marcel Reutegger, who is the author of the version mgt in Oak can provider more insight on this.
    
    Hope that helps
    Angela
    ________________________________________
    From: Richard Groote <ri...@luminis.eu>
    Sent: Tuesday, June 25, 2019 3:02 PM
    To: oak-dev@jackrabbit.apache.org
    Subject: Versioning and restoring
    
    Hello,
    
    Currently we’re trying to integrate Apache OAK within our project.
    We using a hierarchy of nodes and a node can have different kind of properties (that’s why we’re using node type nt:unstructured)
    
    Some simple example structure:
    
      *   Music (nt:unstructured, no actual properties)
         *   Rock (nt:unstructured, no actual properties)
            *   Metallica (nt:unstructured, with a lot of properties, including binaries)
            *   U2 (nt:unstructured, with a lot of properties, including binaries)
    
    
    
    Some scenario’s
    
      *   Editing the node U2 and adding / updating some properties (should result in a new version)
      *   Move the node U2 to a different hierarchy (Should be able restore it)
      *   Remove some of the node
      *   Versioning the complete music tree with my own label (used versionhistory.addVersionLabel())
      *   Restore a complete or part of the tree
      *   Restore a node to a specific version
    
    Now I’ve some questions about versioning and restoring:
    
      *   Is the nt:unstructured the best node type or should I use another one for instance nt:folder, nt:file (may be create my own)
      *   Nt:unstructured used OPV version. When I use versionhistory.getVersionByLabel() than the child information contains ‘jcr:childVersionHistory’. This child information points to a node. But in my case this node is no longer retrieval because it has been deleted. Is in this case better to use a node type with OPV Copy
      *   Restore by label is currently not implemented by OAK. Does anyone know about some example of restoring (part of) tree based on a label.
    
    Thanx, for all information. May be I missed some documentation
    
    Richard
    
    
    


Re: Versioning and restoring

Posted by Marcel Reutegger <mr...@adobe.com.INVALID>.
Hi,

On 25.06.19, 16:09, "Angela Schreiber" <an...@adobe.com> wrote:
> Version with Oak should work according to the specification which you
> find at https://docs.adobe.com/docs/en/spec/jcr/2.0/15_Versioning.html
> 
> This includes all the details regarding OPV behavior upon restore.
> However, I quickly checked the implementation in oak-jcr and restore by
> label is indeed not supported today. I am sure Marcel Reutegger, who is
> the author of the version mgt in Oak can provider more insight on this.

When I implemented JCR versioning for Oak, restore by label was simply
not a priority, which is why it is currently not supported. Patches are
welcome if there's a need for this feature.

Regards
 Marcel


Re: Versioning and restoring

Posted by Angela Schreiber <an...@adobe.com.INVALID>.
Hi Richard

Version with Oak should work according to the specification which you find at 
https://docs.adobe.com/docs/en/spec/jcr/2.0/15_Versioning.html

This includes all the details regarding OPV behavior upon restore. However, I quickly checked the implementation in oak-jcr and restore by label is indeed not supported today. I am sure Marcel Reutegger, who is the author of the version mgt in Oak can provider more insight on this.

Hope that helps
Angela
________________________________________
From: Richard Groote <ri...@luminis.eu>
Sent: Tuesday, June 25, 2019 3:02 PM
To: oak-dev@jackrabbit.apache.org
Subject: Versioning and restoring

Hello,

Currently we’re trying to integrate Apache OAK within our project.
We using a hierarchy of nodes and a node can have different kind of properties (that’s why we’re using node type nt:unstructured)

Some simple example structure:

  *   Music (nt:unstructured, no actual properties)
     *   Rock (nt:unstructured, no actual properties)
        *   Metallica (nt:unstructured, with a lot of properties, including binaries)
        *   U2 (nt:unstructured, with a lot of properties, including binaries)



Some scenario’s

  *   Editing the node U2 and adding / updating some properties (should result in a new version)
  *   Move the node U2 to a different hierarchy (Should be able restore it)
  *   Remove some of the node
  *   Versioning the complete music tree with my own label (used versionhistory.addVersionLabel())
  *   Restore a complete or part of the tree
  *   Restore a node to a specific version

Now I’ve some questions about versioning and restoring:

  *   Is the nt:unstructured the best node type or should I use another one for instance nt:folder, nt:file (may be create my own)
  *   Nt:unstructured used OPV version. When I use versionhistory.getVersionByLabel() than the child information contains ‘jcr:childVersionHistory’. This child information points to a node. But in my case this node is no longer retrieval because it has been deleted. Is in this case better to use a node type with OPV Copy
  *   Restore by label is currently not implemented by OAK. Does anyone know about some example of restoring (part of) tree based on a label.

Thanx, for all information. May be I missed some documentation

Richard