Changeset 1649
- Timestamp:
- 12/09/11 20:37:32 (13 years ago)
- Location:
- MDUTILS/src/eu/clarin/cmdi/mdservice/internal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MDUTILS/src/eu/clarin/cmdi/mdservice/internal/MDTransformer.java
r1622 r1649 101 101 102 102 public Properties getConfig(){ 103 if (config == null){ 104 return Utils.getConfig(); 103 if (config == null){ // shouldn't happen - config should be set by the calling app. 104 // if not - try to use the default config 105 return Utils.getAppConfig(""); 105 106 } 106 107 return config; -
MDUTILS/src/eu/clarin/cmdi/mdservice/internal/Utils.java
r1645 r1649 129 129 */ 130 130 //obsolete 131 public static Properties getConfig() { 131 /* 132 * public static Properties getConfig() { 133 132 134 if (config==null) { 133 135 loadConfig(config_path); … … 135 137 return config; 136 138 } 139 */ 140 /** 141 * Returns the properties loaded from the configuration, 142 * the parameter allows to distinguish which application's properties to get 143 * if parameter="" first properties-object will be delivered 144 * if no config-properties are loaded null is returned. 145 */ 137 146 public static Properties getAppConfig(String appname){ 138 return config_hashtable.get(appname); 147 Properties ret_prop = null; 148 if (config_hashtable.size() > 0) 149 { 150 if (appname.equals("")) { 151 //if no appname specified return the first Properties element available. 152 ret_prop = config_hashtable.elements().nextElement(); 153 } else { 154 ret_prop = config_hashtable.get(appname); 155 } 156 } 157 158 return ret_prop; 139 159 } 140 160 /**
Note: See TracChangeset
for help on using the changeset viewer.