If user {@code suzy} in tenant {@code acme} deletes a file with id {@code testFileId} and named {@code testFile}in folder with id {@code testFolderId} and named {@code testFolder} then this implementation upon anon-permanent delete will move the file such that the new absolute path and properties of the "deleted" node will be as follows.
Trash Structure 2
Uses JCR XPath queries for iteration and filtering. File ID nodes exist to prevent same-name sibling conflicts. Original parent folder path stored in property. All delete-related properties stored in file ID node to avoid the need to checkout versioned files when they are deleted. Note that use of JCR XPath queries may require enabling features in the JCR implementation./pentaho/acme/home/suzy/.trash/pho:testFileId/testFile /pentaho/acme/home/suzy/.trash/pho:testFileId/pho:deletedDate (deleted date property) /pentaho/acme/home/suzy/.trash/pho:testFileId/pho:origName (original filename property) /pentaho/acme/home/suzy/.trash/pho:testFileId/pho:origParentFolderPath (original parent folder path property)
Trash Structure 1 (aka legacy)
Uses node iterators and {@link javax.jcr.Node#getNodes(String)} when filtering. File ID nodes exist to preventsame-name sibling conflicts. Original parent folder path derived from folder ID node name. All delete-related properties stored in file ID node to avoid the need to checkout versioned files when they are deleted./pentaho/acme/home/suzy/.trash/pho:testFolderId/pho:testFileId/testFile /pentaho/acme/home/suzy/.trash/pho:testFolderId/pho:testFileId/pho:deletedDate (deleted date property)
Assumptions:
By storing deleted files inside the user's home folder, the user's recycle bin is effectively private. This is desirable because a deleted file with confidential information should not be seen by anyone else except the deleting user.
@author mlowery
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|