To restore a node N to the state recorded by its version with version name “x.y”, the application calls N.restore("x.y", removeExisting)10. Assuming that the version node representing the version named “x.y” is node V, then the following will occur:
The child node and properties of N will be changed, removed or added to, depending on their corresponding copies in V and their own OnParentVersion attributes (see 8.2.11 OnParentVersion Attribute, for details). The second parameter of Node.restore is the removeExisting flag which governs what happens if nodes that are being introduced into the subtree of N as a result of the restore have the same UUID as existing node is in the workspace outside the subtree of N (see 188.8.131.52 Node Versioning Methods).
N’s jcr:baseVersion property will be changed to point to V.
N’s jcr:isCheckedOut property is set to false.
Unlike most other operations that alter the state of a node, restore works regardless of whether the node in question is checked-out or checked-in.