Next version of JABA
[jabaws.git] / datamodel / compbio / metadata / Argument.java
1 /* Copyright (c) 2009 Peter Troshin\r
2  *  \r
3  *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0     \r
4  * \r
5  *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
6  *  Apache License version 2 as published by the Apache Software Foundation\r
7  * \r
8  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
9  *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
10  *  License for more details.\r
11  * \r
12  *  A copy of the license is in apache_license.txt. It is also available here:\r
13  * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
14  * \r
15  * Any republication or derived work distributed in source code form\r
16  * must include this copyright and license notice.\r
17  */\r
18 package compbio.metadata;\r
19 \r
20 import java.net.URL;\r
21 import java.util.List;\r
22 \r
23 /**\r
24  * An unmodifiable view for the options and parameters, with one exception - it\r
25  * allows to set a value\r
26  * \r
27  * @see Parameter\r
28  * @see Option\r
29  * \r
30  * @author pvtroshin\r
31  * \r
32  *         Date December 2009\r
33  * @param <T>\r
34  *            executable type\r
35  */\r
36 public interface Argument<T> {\r
37 \r
38     URL getFurtherDetails();\r
39 \r
40     String getDefaultValue();\r
41 \r
42     String getDescription();\r
43 \r
44     String getName();\r
45 \r
46     /**\r
47      * \r
48      * @return List of values allowed for an Argument\r
49      */\r
50     List<String> getPossibleValues();\r
51 \r
52     /**\r
53      * Set default values for the parameter or an option\r
54      * \r
55      * @param defaultValue\r
56      *            the value to be set\r
57      * @throws WrongParameterException\r
58      *             - when the value to be set is illegal. Wrong value for\r
59      *             numeric parameter is the value defined outside it , for\r
60      *             string type parameter, wrong value is the one which is not\r
61      *             listed in possible values list\r
62      * @see ValueConstrain\r
63      */\r
64     void setValue(String defaultValue) throws WrongParameterException;\r
65 \r
66 }\r