From 8e5d28aec9368c29acec858e9d748ed2ed5eb397 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Tue, 9 Sep 2014 12:14:01 +0200 Subject: Support move to using UUIDs and ItemPaths as Item identifiers instead of ints. --- src/main/java/com/c2kernel/gui/MenuBuilder.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/c2kernel/gui/MenuBuilder.java') diff --git a/src/main/java/com/c2kernel/gui/MenuBuilder.java b/src/main/java/com/c2kernel/gui/MenuBuilder.java index eba592f..ec01b4d 100644 --- a/src/main/java/com/c2kernel/gui/MenuBuilder.java +++ b/src/main/java/com/c2kernel/gui/MenuBuilder.java @@ -27,6 +27,7 @@ import javax.swing.text.html.HTMLEditorKit; import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.lookup.DomainPath; +import com.c2kernel.lookup.ItemPath; import com.c2kernel.lookup.Path; import com.c2kernel.persistency.ClusterStorage; import com.c2kernel.process.Gateway; @@ -100,9 +101,9 @@ public class MenuBuilder extends JMenuBar implements ActionListener, ItemListene while(servers.hasNext()) { Path thisServerPath = (Path)servers.next(); try { - int syskey = thisServerPath.getSysKey(); - String serverName = ((Property)Gateway.getStorage().get(syskey, ClusterStorage.PROPERTY+"/Name", null)).getValue(); - String portStr = ((Property)Gateway.getStorage().get(syskey, ClusterStorage.PROPERTY+"/ConsolePort", null)).getValue(); + ItemPath serverItemPath = thisServerPath.getItemPath(); + String serverName = ((Property)Gateway.getStorage().get(serverItemPath, ClusterStorage.PROPERTY+"/Name", null)).getValue(); + String portStr = ((Property)Gateway.getStorage().get(serverItemPath, ClusterStorage.PROPERTY+"/ConsolePort", null)).getValue(); addMenuItem(serverName+":"+portStr, "console", null, 0); } catch (Exception ex) { Logger.error("Exception retrieving proxy server connection data for "+thisServerPath); -- cgit v1.2.3