applied LGPLv3 and source code formatting.
[vamsas.git] / src / uk / ac / vamsas / client / IVorbaIdFactory.java
1 /*
2  * This file is part of the Vamsas Client version 0.1. 
3  * Copyright 2009 by Jim Procter, Iain Milne, Pierre Marguerite, 
4  *  Andrew Waterhouse and Dominik Lindner.
5  * 
6  * Earlier versions have also been incorporated into Jalview version 2.4 
7  * since 2008, and TOPALi version 2 since 2007.
8  * 
9  * The Vamsas Client is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *  
14  * The Vamsas Client is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU Lesser General Public License for more details.
18  * 
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with the Vamsas Client.  If not, see <http://www.gnu.org/licenses/>.
21  */
22 package uk.ac.vamsas.client;
23
24 /**
25  * @author jimp middleware interface for generating new VorbaId objects for a
26  *         particular vamsas client based on the current session, user and
27  *         client handle. Generally implemented by instances of the vamsas
28  *         library api only.
29  */
30 public interface IVorbaIdFactory {
31   /**
32    * construct a new id appropriate for this client in the vamsas session.
33    * 
34    * @param vobject
35    *          TODO
36    * 
37    * @return valid VorbaId for session, or null if VorbaIdFactory not configured
38    *         correctly.
39    */
40   public abstract VorbaId makeVorbaId(Vobject vobject);
41
42   public abstract SessionHandle getSessionHandle();
43
44   public abstract ClientHandle getClientHandle();
45
46   public abstract UserHandle getUserHandle();
47
48   /**
49    * called when an object is touched by the vamsas library prior to writing to
50    * record last hash for the object's VorbaId
51    * 
52    * @param vobject
53    */
54   public abstract void updateHashValue(Vobject vobject);
55 }