jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Securing Workspace#copy
Date Wed, 05 Feb 2014 17:40:43 GMT

we had a short discussion in our weekly oak meeting wrt Workspace#copy
and Root#copy and the unresolved issue OAK-920 [0].

currently the copy in oak works as follows:

1. low level copy of the complete subtree on the NodeBuilder
2. subsequent clean-up in oak-jcr on the accessible items generating
   new uuids for referenceable nodes and updated references.

this results in a complete copy of the source tree while potentially
only adjusting uuids/references partially. the latter has been discussed
at [1], where jukka actually convinced me that in fact only content
accessible to the editing session should be copied (which is not what
we do at the moment).

that behavior (only copying accessible content) is also how the copy used
to be implemented in jackrabbit-core.

while discussing this, we thought about changing the implementation of
Root#copy as follows in order to (hopefully) address the issues
we are currently facing:

- flag the copy-target like we do it for the move operations
- perform the low-level copy (as we do it today)
- create commit hooks that
  > detect the copy-target and retrieve the source for comparison
  > removes subtrees that are not accessible on the source tree (OAK-920)
  > generates new uuids for referenceable nodes and adjusts references and
    thus moving the logic from oak-jcr to the low-level implementation
  > generates new version histories (see OAK-918)
  > fixes lock related issues (see OAK-919)

maybe we also want to discuss on whether or not it would make sense to
define the copy operation on the oak api to be also a singular 'workspace'
operations as it is the case in JCR... this would prevent us from ending
up having nested and complex combinations of copy, move and other
in the same commit. one possibility for this was to place the copy on the
ContentSession and instead of the Root.


kind regards

[0] https://issues.apache.org/jira/browse/OAK-920

View raw message