Merge commit 'alpha/update_2_12_for_2_11_2_series_merge^2' into HEAD
[jalview.git] / src / jalview / ws / jws2 / Jws2Client.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.ws.jws2;
22
23 import jalview.gui.AlignFrame;
24 import jalview.ws.api.ServiceWithParameters;
25 import jalview.ws.params.ArgumentI;
26 import jalview.ws.params.WsParamSetI;
27
28 import java.util.List;
29
30 import javax.swing.JMenu;
31
32 /**
33  * provides metadata for a jabaws2 service instance - resolves names, etc.
34  * 
35  * @author JimP
36  * 
37  */
38 public abstract class Jws2Client extends jalview.ws.WSClient
39 {
40   /**
41    * instantiate a new service client. preset and arguments are assumed to be
42    * valid for the service
43    * 
44    * @param _alignFrame
45    * @param preset
46    * @param arguments
47    */
48
49   public Jws2Client(AlignFrame _alignFrame, WsParamSetI preset,
50           List<ArgumentI> arguments)
51   {
52     super(_alignFrame, preset, arguments);
53
54   }
55
56   public Jws2Client()
57   {
58     // anonymous constructor - used for headless method calls only
59   }
60
61
62   /*
63    * Jws2Instance serviceHandle; (non-Javadoc)
64    * 
65    * @see jalview.ws.WSMenuEntryProviderI#attachWSMenuEntry(javax.swing.JMenu,
66    * jalview.gui.AlignFrame)
67    * 
68    * @Override public void attachWSMenuEntry(JMenu wsmenu, AlignFrame
69    * alignFrame) { if (serviceHandle==null) { throw new
70    * Error("Implementation error: No service handle for this Jws2 service."); }
71    * attachWSMenuEntry(wsmenu, serviceHandle, alignFrame); }
72    */
73   /**
74    * add the menu item for a particular jws2 service instance
75    * 
76    * @param wsmenu
77    * @param service
78    * @param alignFrame
79    */
80   abstract void attachWSMenuEntry(JMenu wsmenu,
81           final ServiceWithParameters service,
82           final AlignFrame alignFrame);
83
84
85 }