crisp.wbwiki.client
Interface WikiService

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
WikiServiceImpl

public interface WikiService
extends com.google.gwt.user.client.rpc.RemoteService


Method Summary
 Page synchronize(Integer lastVersionLoadedByClient, String modifiedContentInClient)
          Synchronizes the state between client and server.
 

Method Detail

synchronize

Page synchronize(Integer lastVersionLoadedByClient,
                 String modifiedContentInClient)
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.


Copyright © 2006. All Rights Reserved.