srcAbsPath (and its entire subtree) to the new location at destAbsPath. Method can help to avoid performance impacts on "rename" of big trees. Rename means move of node within same parent. Keep in mind that this method will not give a performance growth on renaming of small trees but even probably will cause a decrease. Also it means that all listeners connected with descendants will not get events. Also in case of QuotaManager it will call re-calculating size of moved node and this will affect performance decrease. In order to persist the change, a save must be called on either the session or a common ancestor to both the source and destination locations.
ConstraintViolationException is thrown either immediately or on save if performing this operation would violate a node type or implementation-specific constraint. Implementations may differ on when this validation is performed. As well, a ConstraintViolationException will be thrown on save if an attempt is made to separately save either the source or destination node.
Note that this behavior differs from that of {@link Workspace#move}, which operates directly in the persistent workspace and does not require a save.
destAbsPath provided must not have an index on its final element. If it does then a RepositoryException is thrown. Strictly speaking, the destAbsPath parameter is actually an absolute path to the parent node of the new location, appended with the new name desired for the moved node. It does not specify a position within the child node ordering (if such ordering is supported). If ordering is supported by the node type of the parent node of the new location, then the newly moved node is appended to the end of the child node list. This method cannot be used to move just an individual property by itself. It moves an entire node and its subtree (including, of course, any properties contained therein). If no node exists at srcAbsPath or no node exists one level above destAbsPath (in other words, there is no node that will serve as the parent of the moved item) then a PathNotFoundException is thrown either immediately or on save. Implementations may differ on when this validation is performed. An ItemExistsException is thrown either immediately or on save if a property already exists at destAbsPath or a node already exists there and same-name siblings are not allowed. Implementations may differ on when this validation is performed. A VersionException is thrown either immediately or on save if the parent node of destAbsPath or the parent node of srcAbsPath] is versionable and checked-in, or is non-versionable and its nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed. A LockException is thrown either immediately or on save if a lock prevents the move. Implementations may differ on when this validation is performed.
@param srcAbsPath the root of the subtree to be moved.
@param destAbsPath the location to which the subtree is to be moved.
@param triggerEventsForDescendantsOnRename indicates need of triggering events for all descendants in treeif move is a rename.
@throws ItemExistsException if a property already exists atdestAbsPath or a node already exist there, and same name siblings are not allowed and this implementation performs this validation immediately instead of waiting until save.
@throws PathNotFoundException if either srcAbsPath or destAbsPath cannot be found and thisimplementation performs this validation immediately instead of waiting until save.
@throws VersionException if the parent node of destAbsPath or the parent node of srcAbsPathis versionable and checked-in, or or is non-verionable and its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until save.
@throws ConstraintViolationException if a node-type or other constraint violation is detected immediately and thisimplementation performs this validation immediately instead of waiting until save.
@throws LockException if the move operation would violate a lock and thisimplementation performs this validation immediately instead of waiting until save.
@throws RepositoryException if the last element of destAbsPath has an index or if another error occurs.
| |