diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-02-26 10:29:36 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-02-26 10:29:36 +0100 |
| commit | 755bb76c94953b62a08e9fecf523bc5c42ec79ac (patch) | |
| tree | 63edd567272cd87edd55eeb55a5fc814e1f6079d /src/main/java/com/c2kernel/process/Gateway.java | |
| parent | 1faab1fd00f70881d4666d766fd0f033e172ff80 (diff) | |
Properties extended as ObjectProperties, which can return any Object,
and wrap int and boolean parsing. Gateway.getProperties() returns the
new ObjectProperty instance. Old Gateway property methods still present
but deprecated. Refs #149
Diffstat (limited to 'src/main/java/com/c2kernel/process/Gateway.java')
| -rw-r--r-- | src/main/java/com/c2kernel/process/Gateway.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/com/c2kernel/process/Gateway.java b/src/main/java/com/c2kernel/process/Gateway.java index b57e91b..0d9dbe6 100644 --- a/src/main/java/com/c2kernel/process/Gateway.java +++ b/src/main/java/com/c2kernel/process/Gateway.java @@ -26,6 +26,7 @@ import com.c2kernel.utils.CastorXMLUtility; import com.c2kernel.utils.FileStringUtility;
import com.c2kernel.utils.Language;
import com.c2kernel.utils.Logger;
+import com.c2kernel.utils.ObjectProperties;
/**************************************************************************
@@ -50,7 +51,7 @@ import com.c2kernel.utils.Logger; public class Gateway
{
- static private Properties mC2KProps;
+ static private ObjectProperties mC2KProps;
static private ModuleManager mModules;
static private org.omg.CORBA.ORB mORB;
static private boolean orbDestroyed = false;
@@ -60,7 +61,7 @@ public class Gateway static private CorbaServer mCorbaServer;
static private CastorXMLUtility mMarshaller;
static private AgentProxy mCurrentUser = null;
- static private ResourceLoader mResource;
+ static private ResourceLoader mResource;
@@ -91,7 +92,7 @@ public class Gateway static public void init(Properties props, ResourceLoader res) throws InvalidDataException {
// Init properties & resources
- mC2KProps = new Properties();
+ mC2KProps = new ObjectProperties();
mResource = res;
if (mResource == null) mResource = new Resource();
@@ -413,15 +414,18 @@ public class Gateway return getProperty("LocalCentre");
}
+ @Deprecated
static public String getProperty(String propName) {
return getProperty(propName, null);
}
+ @Deprecated
static public String getProperty(String propName, String defaultValue) {
if (mC2KProps == null) return defaultValue;
return mC2KProps.getProperty(propName, defaultValue);
}
+ @Deprecated
static public void setProperty(String propName, String propValue) {
if (mC2KProps == null) return;
mC2KProps.put(propName, propValue);
@@ -440,6 +444,9 @@ public class Gateway }
}
+ static public ObjectProperties getProperties() {
+ return mC2KProps;
+ }
static public String getKernelVersion() {
try {
|
