adding various state flags for events
[vamsas.git] / src / org / vamsas / client / Events.java
index 00512a7..c1b80e0 100644 (file)
@@ -16,8 +16,8 @@ public class Events {
   /**
    * Generated when a new vamsas document is created (perhaps from some existing
    * Vamsas data) so an application may do its own data space initialization.
-   * TODO: decide if this is called when an app is connected to a stored
-   * session...
+   * Raised for a new application connecting to a vamsas document 
+   * which contains no existing data for that application.
    */
   public static final String DOCUMENT_CREATE = "org.vamsas.client.events.documentCreateEvent";
 
@@ -44,20 +44,23 @@ public class Events {
    * allow them to store any updates before an offline copy of the session is
    * created. Any client that handles this should call the
    * IClient.getDocument(), update and then IClient.updateDocument in the same
-   * handler thread.
+   * handler thread (the lock on the document is held until the handler exits).
    * EventName: <Vamsas-session URN>
    * NewValue: org.vamsas.client.IClient for session.
    */
   public static final String DOCUMENT_FINALIZEAPPDATA = "org.vamsas.client.events.DocumentFinalizeAppData";
 
   /**
-   * Generated by Vorba stub after the penultimate client makes a call to
-   * closeDocument(). Sequence is as follows : 1. All other vamsas clients have
-   * called closeDocument() 2. Final living client monitors closures, and
+   * Generated by Vorba stub for the sole remaining client, after the penultimate 
+   * client makes a call to finalizeClient(). It is only raised if the session has been modified since the 
+   * last call to storeDocument() by any application.
+   * LATER: copies of a document should be on a per-user basis for multi-user sessions. 
+   *  Sequence is as follows : 1. All other vamsas clients have
+   * called finalizeClient() 2. Final living client monitors closures, and
    * realises that it is last. 3. Final client generates event to prompt
    * associated application to inquire if the user wishes to save the document
    * for future reference.
-   *  * Any call to closeDocument in a thread other than the registered
+   *  * Any call to finalizeClient in a thread other than the registered
    * EventListener will block until the RequestToClose handler has exited.
    * 
    */