View Javadoc

1   /*$Id: ApplicationDescription.java,v 1.5 2004/11/27 13:20:02 pah Exp $
2    * Created on 25-May-2004
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid 
7    * Software License version 1.2, a copy of which has been included 
8    * with this distribution in the LICENSE.txt file.  
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  $Log: ApplicationDescription.java,v $
81  Revision 1.5  2004/11/27 13:20:02  pah
82  result of merge of pah_cea_bz561 branch
83  
84  Revision 1.4.38.1  2004/11/04 16:58:33  pah
85  improve registry entry building
86  
87  Revision 1.4  2004/08/28 07:17:34  pah
88  commandline parameter passing - unit tests ok
89  
90  Revision 1.3  2004/07/26 00:57:46  nw
91  javadoc
92  
93  Revision 1.2  2004/07/01 11:16:22  nw
94  merged in branch
95  nww-itn06-componentization
96  
97  Revision 1.1.2.2  2004/07/01 01:42:46  nw
98  final version, before merge
99  
100 Revision 1.1.2.1  2004/06/14 08:56:58  nw
101 factored applications into sub-projects,
102 got packaging of wars to work again
103 
104 Revision 1.7.8.1  2004/05/28 10:23:10  nw
105 checked in early, broken version - but it builds and tests (fail)
106  
107 */