Synchronizes the state between client and server.
More specifically, saves the given new content (if any) to the server and
returns an up-to-date Page if necessary.
If the currently saved version of the page is the same
as lastVersionLoadedByClient, then null is returned since the
client's version is up-to-date already.
In that case, if modifiedContentInClient is not null
the client should increment his lastVersionLoadedByClient,
effectively "pretending" that it has received an updated from the server.
If the currently saved version of the page is NOT the
same as lastVersionLoadedByClient, some interference has occurred.
Probably someone else has edited the page concurrently.
In that case a new, up-to-date Page object will be returned to
the client.
- Parameters:
lastVersionLoadedByClient
- ¨
which version the client last loaded from the server, or null if nothing has been loaded yet.modifiedContentInClient
- which content to save, or null if nothing has been changed in the client.
in the client since lastVersionLoadedByClient
- Returns:
- an up-to-date Page object or null if the client is already up-to-date.