diff options
author | Bernard Normier <bernard@zeroc.com> | 2005-06-21 15:26:54 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2005-06-21 15:26:54 +0000 |
commit | 9a746ddb2e8daa9c64211c57825a178f8c7a3581 (patch) | |
tree | 66076e0f6b81aa381799cbe2a3b27ee883fc5dcd /java/src/IceGrid/TreeNode/Application.java | |
parent | added missing file. (diff) | |
download | ice-9a746ddb2e8daa9c64211c57825a178f8c7a3581.tar.bz2 ice-9a746ddb2e8daa9c64211c57825a178f8c7a3581.tar.xz ice-9a746ddb2e8daa9c64211c57825a178f8c7a3581.zip |
Initial commit for the IceGrid Admin GUI
Diffstat (limited to 'java/src/IceGrid/TreeNode/Application.java')
-rwxr-xr-x | java/src/IceGrid/TreeNode/Application.java | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/java/src/IceGrid/TreeNode/Application.java b/java/src/IceGrid/TreeNode/Application.java new file mode 100755 index 00000000000..84ee0c1f9f5 --- /dev/null +++ b/java/src/IceGrid/TreeNode/Application.java @@ -0,0 +1,74 @@ +// **********************************************************************
+//
+// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+package IceGrid.TreeNode;
+
+import IceGrid.ApplicationDescriptor;
+
+class Application extends Parent
+{
+ //
+ // Builds the application and all its subtrees
+ //
+ Application(ApplicationDescriptor descriptor, NodeViewRoot nodeViewRoot)
+ {
+ _nodeViewRoot = nodeViewRoot;
+ update(descriptor, false);
+ }
+
+ void update(ApplicationDescriptor newDescriptor, boolean fireEvent)
+ {
+ assert(newDescriptor != null);
+ clearChildren();
+
+ _descriptor = newDescriptor;
+
+ _serverTemplates = new ServerTemplates(_descriptor.serverTemplates, _descriptor.serviceTemplates);
+ addChild(_serverTemplates);
+ _serverTemplates.addParent(this); // no-op when this is not yet attached to its root
+ // (i.e. during construction)
+
+ _serviceTemplates = new ServiceTemplates(_descriptor.serviceTemplates);
+ addChild(_serviceTemplates);
+ _serviceTemplates.addParent(this);
+
+ _nodeVars = new NodeVars(_descriptor.nodes);
+ addChild(_nodeVars);
+ _nodeVars.addParent(this);
+
+ _serverInstances = new ServerInstances(_descriptor.servers,
+ _descriptor.serverTemplates,
+ _descriptor.serviceTemplates,
+ _nodeViewRoot);
+ addChild(_serverInstances);
+ _serverInstances.addParent(this);
+
+ if(fireEvent)
+ {
+ // fireStructureChanged(this);
+ }
+ }
+
+ public String toString()
+ {
+ return _descriptor.name;
+ }
+
+
+ private ApplicationDescriptor _descriptor;
+ private NodeViewRoot _nodeViewRoot;
+
+ //
+ // Children
+ //
+ private ServerTemplates _serverTemplates;
+ private ServiceTemplates _serviceTemplates;
+ private NodeVars _nodeVars;
+ private ServerInstances _serverInstances;
+
+}
|