Create, update a navigation. When the navigation state is not null, the
navigation will be created or updated depending on whether or not the
navigation already exists.
Save the specified context state to the persistent storage. The operation
takes the pending changes done to the tree and attempt to save them to the
persistent storage. When conflicts happens, a merge will be attempted
however it can lead to a failure.
Update the specified context argument with the most recent
state. The update operation will affect the entire tree even if the
context argument is not the root of the tree. The
context argument determines the root from which the
scope argument applies to.
The update operation compares the actual tree and the most recent version
of the same tree. When the scope argument is not null, it will
be used to augment the tree with new nodes. During the operation, any
modification done to the tree wil be reported as a change to the optional
listener argument.
The update operates recursively by doing a comparison of the node intrisic
state (name or state) and its structural state (the children). The
comparison between the children of two nodes is done thanks to the Longest
Common Subsequence algorithm to minimize the number of changes to perform.
The operation assumes that no changes have been performed on the actual
tree.
Rebase the specified context argument with the most recent
state. The rebase operation will affect the entire tree even if the
context argument is not the root of the tree. The
context argument determines the root from which the
scope argument applies to.
The rebase operation compares the actual tree and the most recent version
of the same tree. When the scope argument is not null, it will
be used to augment the tree with new nodes. During the operation, any
modification done to the tree wil be reported as a change to the optional
listener argument.
The rebase operates in a similar way of the update operation, however it
assumes that it can have pending changes done to the tree (i.e changes that
have not been saved). Actually a rebase operation with no changes will do
the same than an update operation. The rebase operation attempts to bring
the most recent changes to the tree, by doing a rebase of the pending
operations on the actual tree. When conflicting changes exist, a merge will
be attempted, however it could fail and lead to a non resolvable situation.