1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.mySpace.mySpaceManager;
12
13 import org.astrogrid.Configurator;
14
15 /***
16 * The <code>MMC</code> class represents
17 *
18 * @author CLQ
19 * @version 1.0 17-Jul-2003
20 * @see
21 * @see
22 * @since AstroGrid 1.2
23 */
24 public class MMC extends Configurator {
25
26 public static final String
27 /*** Three letter acronym for this subsystem within the overall AstroGrid system...
28 * "MMC" stands for MySpaceManagerComponent */
29 SUBSYSTEM_ACRONYM = "MMC" ;
30
31 public static final String
32 /*** Configuration file for this component. */
33 CONFIG_FILENAME = "ASTROGRID_myspacemanagerconfig.xml" ;
34
35 public static final String
36 /*** Catalog name for mySpaceServer, required for jConfig.*/
37 CATLOG = "MYSPACEMANAGER";
38
39
40 public static String
41 /*** Location of MySpace Registry files */
42 REGISTRYCONF = "REGISTRYCONF" ,
43 /*** URL Location of MySpaceManager. */
44 mySpaceManagerLoc = "MYSPACEMANAGERURL",
45 /*** URL Location of MySpaceServer. */
46 serverManagerLoc = "MYSPACESERVERURL",
47 /*** URLs all MySpaceManager within the astrogrid system*/
48 MYSPACEMANAGERURLs = "MYSPACEMANAGERURLs";
49
50 public static String
51 /*** response template*/
52 RESPONSE = "TEMPLATE.RESPONSE",
53 /*** response header template*/
54 D_RESPONSE_HEAD ="TEMPLATE.RESPONSEHEAD",
55 /*** response element template*/
56 D_RESPONSE_ELEMENT ="TEMPLATE.RESPONSEELEMENT",
57 /*** response footer template*/
58 D_RESPONSE_FOOT ="TEMPLATE.RESPONSEFOOT";
59
60 public static String
61 /*** response string if SUCCESS*/
62 SUCCESS = "SUCCESS",
63 /*** response string if fail*/
64 FAULT = "FAULT";
65
66
67 private static MMC
68 singletonMMC = new MMC() ;
69
70
71 private MMC(){
72 super() ;
73 }
74
75
76 public static MMC getInstance() {
77 return singletonMMC ;
78 }
79
80
81 /***
82 *
83 * Static getter for properties from the component's configuration.
84 * <p>
85 *
86 * @param key - the property key within category
87 * @param category - the category within the configuration
88 * @return the String value of the property, or the empty string if null
89 *
90 * @see org.jconfig.jConfig
91 **/
92 public static String getProperty( String key, String category ) {
93 return Configurator.getProperty( SUBSYSTEM_ACRONYM, key, category ) ;
94 }
95
96 protected String getConfigFileName() { return CONFIG_FILENAME ; }
97 protected String getSubsystemAcronym() { return SUBSYSTEM_ACRONYM ; }
98
99 }