1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.mySpace.mySpaceServer;
12
13 import org.astrogrid.Configurator;
14
15 /***
16 * The <code>MSC</code> class represents
17 *
18 * @author CLQ
19 * @version 1.0 24-Jul-2003
20 * @see
21 * @see
22 * @since AstroGrid 1.2
23 */
24 public class MSC extends Configurator {
25
26 public static final String
27 /*** Three letter acronym for this subsystem within the overall AstroGrid system...
28 * "MSC" stands for MySpaceServerComponent */
29 SUBSYSTEM_ACRONYM = "MSC" ;
30
31 public static final String
32 /*** Configuration file for this component. */
33 CONFIG_FILENAME = "ASTROGRID_myspaceserverconfig.xml" ;
34
35 public static final String
36 /*** Catalog name for mySpaceServer, required for jConfig. */
37 CATLOG = "MYSPACESERVER";
38
39 public static String
40 /*** location on MySpaceServer where dataholders are stroed.*/
41 dataHolderFolder = "DATAHOLDERFOLDER",
42 /*** copy command when transfering large files.*/
43 copyCommand = "COPY_COMMAND",
44 /*** upper limit to NOT user copy command to transfer file.*/
45 sizeLimit = "SIZELIMIT";
46
47 public static String
48 /*** response string if SUCCESS*/
49 SUCCESS = "SUCCESS",
50 /*** response string if fail*/
51 FAULT = "FAULT";
52
53
54 private static MSC
55 singletonMMC = new MSC() ;
56
57
58 private MSC(){
59 super() ;
60 }
61
62
63 public static MSC getInstance() {
64 return singletonMMC ;
65 }
66
67
68 /***
69 *
70 * Static getter for properties from the component's configuration.
71 * <p>
72 *
73 * @param key - the property key within category
74 * @param category - the category within the configuration
75 * @return the String value of the property, or the empty string if null
76 *
77 * @see org.jconfig.jConfig
78 **/
79 public static String getProperty( String key, String category ) {
80 return Configurator.getProperty( SUBSYSTEM_ACRONYM, key, category ) ;
81 }
82
83 protected String getConfigFileName() { return CONFIG_FILENAME ; }
84 protected String getSubsystemAcronym() { return SUBSYSTEM_ACRONYM ; }
85
86 }