update author list in license for (JAL-826)
[jalview.git] / src / jalview / ws / params / ParamDatastoreI.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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 of the License, or (at your option) any later version.
10  * 
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 package jalview.ws.params;
19
20 import java.io.IOException;
21 import java.util.List;
22
23 public interface ParamDatastoreI
24 {
25
26   public List<WsParamSetI> getPresets();
27
28   public WsParamSetI getPreset(String name);
29
30   public List<ArgumentI> getServiceParameters();
31
32   public boolean presetExists(String name);
33
34   public void deletePreset(String name);
35
36   /**
37    * writes or overwrites the record for a modifiable WsParamSetI entry with a
38    * given name in the datastore.
39    * 
40    * @param presetName
41    * @param text
42    * @param jobParams
43    *          may throw an illegal argument RunTimeException if the presetName
44    *          overwrites an existing, unmodifiable preset.
45    */
46   public void storePreset(String presetName, String text,
47           List<ArgumentI> jobParams);
48
49   /**
50    * update an existing instance with a new name, descriptive text and
51    * parameters.
52    * 
53    * @param oldName
54    * @param presetName
55    * @param text
56    * @param jobParams
57    */
58   public void updatePreset(String oldName, String presetName, String text,
59           List<ArgumentI> jobParams);
60
61   /**
62    * factory method - builds a service specific parameter object using the given
63    * data
64    * 
65    * @param name
66    * @param description
67    * @param applicable
68    *          URLs
69    * @param parameterfile
70    *          Service specific jalview parameter file (as returned from new
71    *          method)
72    * @return null or valid WsParamSetI object for this service.
73    */
74
75   public WsParamSetI parseServiceParameterFile(String name,
76           String description, String[] serviceURL, String parameters)
77           throws IOException;
78
79   /**
80    * create the service specific parameter file for this pset object.
81    * 
82    * @param pset
83    * @return string representation of the parameters specified by this set.
84    * @throws IOException
85    */
86   public String generateServiceParameterFile(WsParamSetI pset)
87           throws IOException;
88
89 }