1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.applications.description;
12 import org.astrogrid.applications.Application;
13 import org.astrogrid.applications.description.exception.InterfaceDescriptionNotFoundException;
14 import org.astrogrid.applications.description.exception.ParameterDescriptionNotFoundException;
15 import org.astrogrid.community.User;
16 import org.astrogrid.workflow.beans.v1.Tool;
17 /*** Description of a CEA Application
18 * @author Noel Winstanley nw@jb.man.ac.uk 25-May-2004
19 *
20 */
21 public interface ApplicationDescription {
22 /*** Access the name of the application. Each application should be uniquely identified by its name.
23 * @return a string in format <tt><i>authority-id</i>/<i>application-name</i></tt>
24 * @todo wonder if the name of an application should be an ivo:// style thingie? - as its something that is indexable into the registry, etc.
25 * @todo this would be better called ID to be compatible with the idea of what it is in the registry
26 */
27 public String getName();
28
29 /*** Access the name of the application that is to be used for display purposes.
30 * @return a human friendly name for the application.
31 */
32 public String getUIName();
33
34 /***
35 * Access a short description of the purpose of the application.
36 * @return the description.
37 */
38 public String getAppDescription();
39 /***
40 * Acess the list of all parameters defined for this application (no matter what interface they occur in).
41 * @return the array of parameter definitions
42 */
43
44 /***
45 * Access a URL that acts as a reference to a (non-CEA) humanreadable description.
46 * @return
47 */
48 public String getReferenceURL();
49 public ParameterDescription[] getParameterDescriptions();
50 /***
51 * Access the description for a named parameter
52 * @param name the parameter to look up
53 * @return the associated description
54 * @throws ParameterDescriptionNotFoundException if the application does not recognize the parameter name
55 */
56 public ParameterDescription getParameterDescription(String name) throws ParameterDescriptionNotFoundException;
57 /***
58 * Gets the named interface.
59 * @param name the name of the interface to look up.
60 * @return the associated <tt>ApplicationInterface</tt>
61 * @throws InterfaceDescriptionNotFoundException if the application does not provide an interface of this name.
62 */
63 public ApplicationInterface getInterface(String name) throws InterfaceDescriptionNotFoundException;
64
65 /*** list all the interfaces supported by this application */
66 public ApplicationInterface[] getInterfaces();
67
68 /***
69 * Apply this application description to a set of parameters, to create an instance of the application, ready to execute.
70 * @param callerAssignedID external identifer for the new application. This identifier is assigned by the caller, but is not used within CEA for distinguishing the application
71 * @param user the user whose permissions to execute this tool under
72 * @param tool data object that defines which interface to call, and with what parameter values.
73 * @return an <tt>Application</tt>
74 * @throws Exception
75 * @todo should this not be throwing a CEAException?
76 */
77 public Application initializeApplication(String callerAssignedID, User user, Tool tool) throws Exception;
78 }
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107