Addon that provide tree snapshoting (folder versioning)
Switch branches/tags
release-10.3-I20180919_0126 release-10.2 release-10.2-I20180705_0132 release-10.2-I20180703_0125 release-10.2-I20180515_0125 release-10.1 release-9.10 release-9.10-HF18 release-9.10-HF17 release-9.10-HF16 release-9.10-HF15 release-9.10-HF14 release-9.10-HF13 release-9.10-HF12 release-9.10-HF11 release-9.10-HF10 release-9.10-HF09 release-9.10-HF08 release-9.10-HF07 release-9.10-HF06 release-9.10-HF05 release-9.10-HF04 release-9.10-HF03 release-9.10-HF02 release-9.10-HF01 release-9.3 release-9.2 release-9.1 release-8.10.1 release-8.10 release-8.10-HF36 release-8.10-HF35 release-8.10-HF34 release-8.10-HF33 release-8.10-HF32 release-8.10-HF31 release-8.10-HF30 release-8.10-HF29 release-8.10-HF28 release-8.10-HF27 release-8.10-HF26 release-8.10-HF25 release-8.10-HF24 release-8.10-HF23 release-8.10-HF22 release-8.10-HF21 release-8.10-HF20 release-8.10-HF19 release-8.10-HF18 release-8.10-HF17 release-8.10-HF16 release-8.10-HF15 release-8.10-HF14 release-8.10-HF13 release-8.10-HF12 release-8.10-HF11 release-8.10-HF10 release-8.10-HF09 release-8.10-HF08 release-8.10-HF07 release-8.10-HF06 release-8.10-HF05 release-8.10-HF04 release-8.10-HF03 release-8.10-HF02 release-8.10-HF01 release-8.3 release-8.2 release-8.1 release-7.10 release-7.10-HF45 release-7.10-HF44 release-7.10-HF43 release-7.10-HF42 release-7.10-HF41 release-7.10-HF40 release-7.10-HF39 release-7.10-HF38 release-7.10-HF37 release-7.10-HF36 release-7.10-HF35 release-7.10-HF34 release-7.10-HF33 release-7.10-HF33-I20171026_0823 release-7.10-HF32 release-7.10-HF31 release-7.10-HF30 release-7.10-HF29 release-7.10-HF28 release-7.10-HF27 release-7.10-HF26 release-7.10-HF25 release-7.10-HF24 release-7.10-HF23 release-7.10-HF22 release-7.10-HF21 release-7.10-HF20 release-7.10-HF19 release-7.10-HF18 release-7.10-HF17
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
nuxeo-tree-snapshot-core
nuxeo-tree-snapshot-jsf
nuxeo-tree-snapshot-web-ui
.gitignore
README.md
pom.xml

README.md

nuxeo-tree-snapshot

About

This Nuxeo Platform Addon provides tree snapshoting feature (i.e. folder versioning).

Default repository versioning model only supports leaf versioning, so if you need a version (snapshot) a complete tree this addon can help you.

What it does

Here is a typical use case example (actually, this is the output of the unit test in verbose mode) :

Building

mvn clean install

Deploying

Copy the built artifacts into $NUXEO_HOME/templates/custom/bundles/ and activate the "custom" template.

QA results

Build Status

Initial Tree

Dumping Live docs in repository

/root -  -- root
/root/folder1 -  -- Folder 1
/root/folder1/doc12 - 0.0 -- Doc 12
/root/folder1/folder11 -  -- Folder 11
/root/folder1/folder13 -  -- Folder 13
/root/folder1/folder13/folder131 -  -- Folder 131
/root/folder1/folder13/folder131/doc1311 - 0.1 -- Doc 1311
/root/folder1/folder13/folder131/doc1312 - 0.1+ -- Doc 1312
/root/folder2 -  -- Folder 2

Initial Tree Snapshot

root -- 0.1
 folder2 -- 0.1
 folder1 -- 0.1
  folder11 -- 0.1
  folder13 -- 0.1
   folder131 -- 0.1
    doc1312 -- 0.2
    doc1311 -- 0.1
  doc12 -- 0.1

new Tree after updating a doc

Dumping Live docs in repository

/root - 0.1 -- root
/root/folder1 - 0.1 -- Folder 1
/root/folder1/doc12 - 0.1 -- Doc 12
/root/folder1/folder11 - 0.1 -- Folder 11
/root/folder1/folder13 - 0.1 -- Folder 13
/root/folder1/folder13/folder131 - 0.1 -- Folder 131
/root/folder1/folder13/folder131/doc1311 - 0.1+ -- Doc 1311
/root/folder1/folder13/folder131/doc1312 - 0.2 -- Doc 1312
/root/folder2 - 0.1 -- Folder 2

new Snapshot of the tree

root -- 0.2
 folder2 -- 0.1
 folder1 -- 0.2
  folder11 -- 0.1
  folder13 -- 0.2
   folder131 -- 0.2
    doc1312 -- 0.2
    doc1311 -- 0.2
  doc12 -- 0.1

new Tree after cutting a branch

Dumping Live docs in repository

/root - 0.2 -- root
/root/folder1 - 0.2 -- Folder 1
/root/folder1/doc12 - 0.1 -- Doc 12
/root/folder1/folder11 - 0.1 -- Folder 11
/root/folder2 - 0.1 -- Folder 2

new Snapshot of the tree

root -- 0.3
 folder2 -- 0.1
 folder1 -- 0.3
  folder11 -- 0.1
  doc12 -- 0.1

new Tree after restore on version 0.2

Dumping Live docs in repository

/root - 0.2 -- root
/root/folder1 - 0.2 -- Folder 1
/root/folder1/doc12 - 0.1 -- Doc 12
/root/folder1/folder11 - 0.1 -- Folder 11
/root/folder1/folder13 - 0.2 -- Folder 13
/root/folder1/folder13/folder131 - 0.2 -- Folder 131
/root/folder1/folder13/folder131/doc-1311 - 0.2 -- Doc 1311
/root/folder1/folder13/folder131/doc-1312 - 0.2 -- Doc 1312
/root/folder2 - 0.1 -- Folder 2

Using the Addon API

Simple versioning

The API is provided by an Aadapter system. If myfolder is a folderish DocumentModel that you want to snapshot, the code should look like :

Snapshotable snapshotable = myfolder.getAdapter(Snapshotable.class);
Snapshot snapshot = snapshotable.createSnapshot(VersioningOption.MINOR);

In order to be seen as "Snapshotable", your folderish object must have the facet Snapshotable :

<doctype name="SnapshotableFolder" extends="Folder">
  <facet name="Snapshotable"/>
</doctype>

Publishing

This addons also provides a contribution to the publisher service so that you can publish a tree via the publisher.

Proxy handling

TODO This addon also provides helpers for handling proxies :

  • adding a document to a proxy folder actually adds it to its target folder, see TestSnapshotingAndProxies.testAddAndGetProxyFolderChildren()

About Nuxeo

Nuxeo dramatically improves how content-based applications are built, managed and deployed, making customers more agile, innovative and successful. Nuxeo provides a next generation, enterprise ready platform for building traditional and cutting-edge content oriented applications. Combining a powerful application development environment with SaaS-based tools and a modular architecture, the Nuxeo Platform and Products provide clear business value to some of the most recognizable brands including Verizon, Electronic Arts, Sharp, FICO, the U.S. Navy, and Boeing. Nuxeo is headquartered in New York and Paris. More information is available at www.nuxeo.com.