941321bc783fc04a1c8c5ad25a8602958089b07d
[vamsas.git] / src / uk / ac / vamsas / client / IObjectUpdate.java
1 package uk.ac.vamsas.client;\r
2 \r
3 /**\r
4  * Methods implemented by a Vamsas Application's Object Update handler\r
5  * @author vamsas\r
6  * Introduced November 2006 Vamsas Meeting\r
7  * TODO: verify this is sufficient for the per-object update event mechanism\r
8  */\r
9 public interface IObjectUpdate {\r
10   /**\r
11    * Called by the library to find out which vamsas document object this update handler is interested in\r
12    * @return class that extends org.vamsas.Vobject\r
13    */\r
14   Class getRootVobject();\r
15   /**\r
16    * Called to test if this handler is to be called for updates to any Vobjects below the Root Vobject in the vamsas document.\r
17    * @return false means IObjectUpdate.update(updated, cdoc) will only be called with instances of type getRootVobject(). \r
18    */\r
19   boolean handlesSubtreeUpdates();\r
20   /**\r
21    * Method called by Vamsas Client Library for all updated objects that the handler is registered for.\r
22    * @param updated\r
23    * @param cdoc\r
24    */\r
25   void update(uk.ac.vamsas.client.Vobject updated, uk.ac.vamsas.client.IClientDocument cdoc);\r
26 }\r