4 package uk.ac.vamsas.objects;
\r
6 import uk.ac.vamsas.client.Vobject;
\r
7 import uk.ac.vamsas.client.VorbaId;
\r
10 * Provides methods to map between VorbaIds and arbitrary object references
\r
11 * for use by a vamsas Application when moving between its own datamodel and the
\r
12 * Vamsas session objects.
\r
13 * The implementing class needs a valid client-document instance if it is expected
\r
14 * to be able to register newly created vObjects. Normally this will be the case if
\r
15 * the implementing class has been generated by an IClient implementation which will
\r
16 * also have passed it a reference to the current valid IClientDocument instance for
\r
17 * that application's document access thread.
\r
18 * TODO: add remove/clear binding functions - currently you can just pass a null
\r
19 * to either argument for bindAppsObjectToVamsasObject to remove the binding from memory.
\r
23 public interface IVorbaBinding {
\r
25 * get the Vamsas session object bound to an internal object.
\r
27 * @return valid session object or Null.
\r
29 Vobject getVamsasObjectFor(Object appObject);
\r
31 * Get the Application's own object bound to an existing Vamsas session object
\r
32 * @param vObject - object in vamsas document
\r
33 * @return apps object bound to the vamsas document object
\r
35 Object getAppsObjectFor(uk.ac.vamsas.client.Vobject vObject);
\r
38 * Record a mapping between a vamsas document object and an application's internal object.
\r
39 * If either appObject or vObject parameters are null then any existing
\r
40 * binding to the non-null object will be deleted
\r
42 * @param vObject - if newly created then it will be registered using the uk.ac.vamsas.client.IClientDocument.registerObject method.
\r
44 void bindAppsObjectToVamsasObject(Object appObject, uk.ac.vamsas.client.Vobject vObject);
\r