Node correspondence governs the behavior of the update method. This method causes this node to be updated to reflect the state of its corresponding node in srcWorkspace.



update(String srcWorkspaceName)

If this node does have a corresponding node in the workspace srcWorkspaceName, then this replaces this node and its subtree with a clone of the corresponding node and its subtree.

If this node does not have a corresponding node in the workspace srcWorkspaceName, then the update method has no effect.

If the update succeeds, the changes made to this node and its subtree are persisted immediately, there is no need to call save.

Note that update does not respect the checked-in status of nodes. An update may change a node even if it is currently checked-in (this fact is only relevant in an implementation that supports versioning, see 8.2 Versioning).

If the specified srcWorkspace does not exist, a NoSuchWorkspaceException is thrown.

If the current session does not have sufficient permissions to perform the operation, then an AccessDeniedException is thrown.

An InvalidItemStateException is thrown if this Session (not necessarily this Node) has pending unsaved changes.

A LockException is thrown if a lock prevents the update.

A RepositoryException is thrown if another error occurs.