1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.portal.workflow;
12
13 import org.astrogrid.Configurator ;
14
15 /***
16 * The <code>WKF</code> class represents
17 *
18 * @author Jeff Lusted
19 * @version 1.0 08-Jul-2003
20 * @see
21 * @see
22 * @since AstroGrid 1.2
23 */
24 public class WKF extends org.astrogrid.Configurator {
25
26 private static final String
27 /*** Three letter acronym for this subsystem within the overall AstroGrid system...
28 * "WKF" stands for Workflow */
29 SUBSYSTEM_ACRONYM = "WKF" ;
30
31 private static final String
32 /*** Configuration file for this component. */
33 CONFIG_FILENAME = "ASTROGRID_workflowconfig.xml" ;
34
35 public static final String
36 /*** Workflow category within the component's configuration */
37 WORKFLOW_CATEGORY = "WORKFLOW" ,
38 /*** Key within component's configuration identifying the template used for single step jobs. */
39 WORKFLOW_TEMPLATE_SINGLESTEP = "TEMPLATE.SINGLESTEP" ,
40 /*** Key within component's configuration identifying the template used for two step sequence. */
41 WORKFLOW_TEMPLATE_TWOSTEPSEQUENCE = "TEMPLATE.TWOSTEPSEQUENCE" ,
42 /*** Key within component's configuration identifying the template used for two step flow. */
43 WORKFLOW_TEMPLATE_TWOSTEPFLOW = "TEMPLATE.TWOSTEPFLOW" ;
44
45 public static final String
46 /*** MySpace category within the component's configuration */
47 MYSPACE_CATEGORY = "MYSPACE" ,
48 /*** Key within component's configuration identifying the MySpace URL. */
49 MYSPACE_URL = "URL" ,
50 /*** Key within component's configuration identifying the MySpace cache directory. */
51 MYSPACE_CACHE_DIRECTORY = "CACHE_DIRECTORY" ,
52 /*** Key within component's configuration identifying the template for making a MySpace request. */
53 MYSPACE_REQUEST_TEMPLATE = "TEMPLATE.REQUEST" ;
54
55 public static final String
56 /*** Jes category within the component's configuration */
57 JES_CATEGORY = "JES" ,
58 /*** Key within component's configuration identifying the Jes URL. */
59 JES_URL = "URL" ;
60
61 public static final String
62 /*** Tools List category within the component's configuration */
63 TOOLS_LIST_CATEGORY = "TOOLS_LIST" ,
64 /*** Key within component's configuration identifying the total tools. */
65 TOOLS_LIST_TOTAL = "TOTAL" ,
66 /*** Partial key within component's configuration identifying a tool. */
67 TOOLS_LIST_NAME = "NAME." ;
68
69 public static final String
70 /*** Tools category within the component's configuration */
71 TOOL_CATEGORY = "dummy value" ,
72 TOOL_DOCUMENTATION = "DOCUMENTATION",
73 TOOL_INPUT_PARAMS_TOTAL = "INPUT_PARAMS.TOTAL",
74 TOOL_INPUT_PARAM_NAME = "INPUT_PARAM.NAME." ,
75 TOOL_INPUT_PARAM_DOCUMENTATION = "INPUT_PARAM.DOCUMENTATION.",
76 TOOL_INPUT_PARAM_TYPE = "INPUT_PARAM.TYPE." ,
77 TOOL_INPUT_PARAM_CARDINALITY_MIN = "INPUT_PARAM.CARDINALITY.MIN." ,
78 TOOL_INPUT_PARAM_CARDINALITY_MAX = "INPUT_PARAM.CARDINALITY.MAX." ,
79 TOOL_OUTPUT_PARAMS_TOTAL = "OUTPUT_PARAMS.TOTAL" ,
80 TOOL_OUTPUT_PARAM_NAME = "OUTPUT_PARAM.NAME.",
81 TOOL_OUTPUT_PARAM_DOCUMENTATION = "OUTPUT_PARAM.DOCUMENTATION.",
82 TOOL_OUTPUT_PARAM_TYPE = "OUTPUT_PARAM.TYPE." ,
83 TOOL_OUTPUT_PARAM_CARDINALITY_MIN = "OUTPUT_PARAM.CARDINALITY.MIN.",
84 TOOL_OUTPUT_PARAM_CARDINALITY_MAX = "OUTPUT_PARAM_CARDINALITY_MAX." ;
85
86
87 private static WKF
88 singletonWKF = new WKF() ;
89
90
91 private WKF(){
92 super() ;
93 }
94
95
96 public static WKF getInstance() {
97 return singletonWKF ;
98 }
99
100
101
102 /***
103 *
104 * Static getter for properties from the component's configuration.
105 * <p>
106 *
107 * @param key - the property key within category
108 * @param category - the category within the configuration
109 * @return the String value of the property, or the empty string if null
110 *
111 * @see org.jconfig.jConfig
112 **/
113 public static String getProperty( String key, String category ) {
114 return Configurator.getProperty( SUBSYSTEM_ACRONYM, key, category ) ;
115 }
116
117 protected String getConfigFileName() { return CONFIG_FILENAME ; }
118 protected String getSubsystemAcronym() { return SUBSYSTEM_ACRONYM ; }
119
120
121 /***
122 * Name bound in server.xml of URL of config file
123 * @return JNDI name
124 * @see org.astrogrid.Configurator#getJNDIName()
125 */
126 protected String getJNDIName() {
127 return "org.astrogrid.workflow.config.url";
128 }
129
130
131 }