From 148c608d278e4bd9d2410e9d01bdc80e4faa3ec4 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 15 Dec 2006 11:07:07 +0000 Subject: [PATCH] extracted from the jalview.io.VamsasDatastore bindjv2obj and associated methods. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@310 be28352e-c001-0410-b1a7-c7978e42abec --- src/uk/ac/vamsas/objects/IVorbaBinding.java | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/uk/ac/vamsas/objects/IVorbaBinding.java diff --git a/src/uk/ac/vamsas/objects/IVorbaBinding.java b/src/uk/ac/vamsas/objects/IVorbaBinding.java new file mode 100644 index 0000000..9b62052 --- /dev/null +++ b/src/uk/ac/vamsas/objects/IVorbaBinding.java @@ -0,0 +1,40 @@ +/** + * + */ +package uk.ac.vamsas.objects; + +import uk.ac.vamsas.client.Vobject; +import uk.ac.vamsas.client.VorbaId; + +/** + * Provides methods to map between VorbaIds and arbitrary object references + * for use by a vamsas Application when moving between its own datamodel and the + * Vamsas session objects. + * The implementing class needs a valid client-document instance if it is expected + * to be able to register newly created vObjects. Normally this will be the case if + * the implementing class has been generated by an IClient implementation which will + * also have passed it a reference to the current valid IClientDocument instance for + * that application's document access thread. + * @author JimP + */ +public interface IVorbaBinding { +/** + * get the Vamsas session object bound to an internal object. + * @param appObject + * @return valid session object or Null. + */ + Vobject getVamsasObjectFor(Object appObject); + /** + * Get the Application's own object bound to an existing Vamsas session object + * @param vObject - object in vamsas document + * @return apps object bound to the vamsas document object + */ + Object getAppsObjectFor(uk.ac.vamsas.client.Vobject vObject); + + /** + * Record a mapping between a vamsas document object and an application's internal object. + * @param appObject + * @param vObject - this must have been + */ + void bindAppsObjectToVamsasObject(Object appObject, uk.ac.vamsas.client.Vobject vObject); +} -- 1.7.10.2