com.xpn.xwiki.wysiwyg.server.plugin.sync
Interface SyncEngine


@ComponentRole
public interface SyncEngine

This class is responsible for synchronizing the editors when the real-time editing is enabled.

Version:
$Id: SyncEngine.java 24746 2009-10-28 10:51:16Z mflorea $

Method Summary
 SyncStatus getSyncStatus(java.lang.String key)
           
 void setSyncStatus(java.lang.String key, SyncStatus syncStatus)
          Sets the status of a synchronization key.
 SyncResult sync(SyncStatus syncStatus, Revision revision, int version)
          Commits the given revision and updates the status.
 

Method Detail

getSyncStatus

SyncStatus getSyncStatus(java.lang.String key)
Parameters:
key - a synchronization key; this can be for instance the full name of the edited page
Returns:
the status of the given key; this can be for instance the latest version of the edited page

setSyncStatus

void setSyncStatus(java.lang.String key,
                   SyncStatus syncStatus)
Sets the status of a synchronization key. It can be used for instance to update the latest version of the edited content.

Parameters:
key - the synchronization key
syncStatus - the new status for the given key

sync

SyncResult sync(SyncStatus syncStatus,
                Revision revision,
                int version)
                throws SyncException
Commits the given revision and updates the status.

Parameters:
syncStatus - the latest version of the content
revision - the revision to be committed
version - the revision version; specifies what version is affected by the given revision
Returns:
the result of the synchronization
Throws:
SyncException - if the synchronization fails


Copyright © 2004-2010 XWiki. All Rights Reserved.