summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/process/Bootstrap.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-02-26 10:29:36 +0100
committerAndrew Branson <andrew.branson@cern.ch>2014-02-26 10:29:36 +0100
commit755bb76c94953b62a08e9fecf523bc5c42ec79ac (patch)
tree63edd567272cd87edd55eeb55a5fc814e1f6079d /src/main/java/com/c2kernel/process/Bootstrap.java
parent1faab1fd00f70881d4666d766fd0f033e172ff80 (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/Bootstrap.java')
-rw-r--r--src/main/java/com/c2kernel/process/Bootstrap.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/c2kernel/process/Bootstrap.java b/src/main/java/com/c2kernel/process/Bootstrap.java
index 5f23261..4f64adf 100644
--- a/src/main/java/com/c2kernel/process/Bootstrap.java
+++ b/src/main/java/com/c2kernel/process/Bootstrap.java
@@ -178,7 +178,7 @@ public class Bootstrap
}
CompositeActivity ca = new CompositeActivity();
- if (ns!=null && Gateway.getProperty("Module.debug", "false").equals("true")) {
+ if (ns!=null && Gateway.getProperties().getBoolean("Module.debug", false)) {
String wf;
if (itemType.equals("CA")) wf = "ManageCompositeActDef";
else if (itemType.equals("EA")) wf = "ManageElementaryActDef";
@@ -272,7 +272,7 @@ public class Bootstrap
*/
public static void checkAdminAgents() throws Exception {
// check for administrative user
- String adminPassword = Gateway.getProperty("AdminPassword", "admin12345");
+ String adminPassword = Gateway.getProperties().getProperty("AdminPassword", "admin12345");
checkAgent("admin", adminPassword, "Admin", false);
@@ -284,7 +284,7 @@ public class Bootstrap
}
public static void createServerItem() throws Exception {
- String serverName = Gateway.getProperty("ItemServer.name");
+ String serverName = Gateway.getProperties().getProperty("ItemServer.name");
thisServerPath = new DomainPath("/servers/"+serverName);
EntityPath serverEntity;
try {
@@ -300,12 +300,12 @@ public class Bootstrap
Gateway.getStorage().put(serverEntity.getSysKey(), new Property("Name", serverName, false), null);
Gateway.getStorage().put(serverEntity.getSysKey(), new Property("Type", "Server", false), null);
Gateway.getStorage().put(serverEntity.getSysKey(), new Property("KernelVersion", Gateway.getKernelVersion(), true), null);
- if (Gateway.getProperty("ItemServer.Proxy.port") != null)
+ if (Gateway.getProperties().getProperty("ItemServer.Proxy.port") != null)
Gateway.getStorage().put(serverEntity.getSysKey(),
- new Property("ProxyPort", Gateway.getProperty("ItemServer.Proxy.port"), true), null);
+ new Property("ProxyPort", Gateway.getProperties().getProperty("ItemServer.Proxy.port"), false), null);
Gateway.getStorage().put(serverEntity.getSysKey(),
new Property("ConsolePort", String.valueOf(Logger.getConsolePort()), true), null);
- Gateway.getProxyManager().connectToProxyServer(Gateway.getProperty("ItemServer.name"), Integer.parseInt(Gateway.getProperty("ItemServer.Proxy.port")));
+ Gateway.getProxyManager().connectToProxyServer(Gateway.getProperties().getProperty("ItemServer.name"), Gateway.getProperties().getInt("ItemServer.Proxy.port"));
}