2 * This file is part of the Vamsas Client version 0.1.
\r
3 * Copyright 2009 by Jim Procter, Iain Milne, Pierre Marguerite,
\r
4 * Andrew Waterhouse and Dominik Lindner.
\r
6 * Earlier versions have also been incorporated into Jalview version 2.4
\r
7 * since 2008, and TOPALi version 2 since 2007.
\r
9 * The Vamsas Client is free software: you can redistribute it and/or modify
\r
10 * it under the terms of the GNU Lesser General Public License as published by
\r
11 * the Free Software Foundation, either version 3 of the License, or
\r
12 * (at your option) any later version.
\r
14 * The Vamsas Client is distributed in the hope that it will be useful,
\r
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
17 * GNU Lesser General Public License for more details.
\r
19 * You should have received a copy of the GNU Lesser General Public License
\r
20 * along with the Vamsas Client. If not, see <http://www.gnu.org/licenses/>.
\r
22 package uk.ac.vamsas.objects;
\r
24 import uk.ac.vamsas.client.Vobject;
\r
25 import uk.ac.vamsas.client.VorbaId;
\r
28 * Provides methods to map between VorbaIds and arbitrary object references for
\r
29 * use by a vamsas Application when moving between its own datamodel and the
\r
30 * Vamsas session objects. The implementing class needs a valid client-document
\r
31 * instance if it is expected to be able to register newly created vObjects.
\r
32 * Normally this will be the case if the implementing class has been generated
\r
33 * by an IClient implementation which will also have passed it a reference to
\r
34 * the current valid IClientDocument instance for that application's document
\r
35 * access thread. TODO: add remove/clear binding functions - currently you can
\r
36 * just pass a null to either argument for bindAppsObjectToVamsasObject to
\r
37 * remove the binding from memory.
\r
42 public interface IVorbaBinding {
\r
44 * get the Vamsas session object bound to an internal object.
\r
47 * @return valid session object or Null.
\r
49 Vobject getVamsasObjectFor(Object appObject);
\r
52 * Get the Application's own object bound to an existing Vamsas session object
\r
55 * - object in vamsas document
\r
56 * @return apps object bound to the vamsas document object
\r
58 Object getAppsObjectFor(uk.ac.vamsas.client.Vobject vObject);
\r
61 * Record a mapping between a vamsas document object and an application's
\r
62 * internal object. If either appObject or vObject parameters are null then
\r
63 * any existing binding to the non-null object will be deleted
\r
67 * - if newly created then it will be registered using the
\r
68 * uk.ac.vamsas.client.IClientDocument.registerObject method.
\r
70 void bindAppsObjectToVamsasObject(Object appObject,
\r
71 uk.ac.vamsas.client.Vobject vObject);
\r