summaryrefslogtreecommitdiff
path: root/java/src/IceGrid/TreeNode/ServiceInstance.java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2005-08-02 20:51:54 +0000
committerBernard Normier <bernard@zeroc.com>2005-08-02 20:51:54 +0000
commita2282c6f2cd77126cadd614d9259e60456d2e358 (patch)
tree47f39027f224a19f143b0381b7254792d017d803 /java/src/IceGrid/TreeNode/ServiceInstance.java
parentMore java metadata (diff)
downloadice-a2282c6f2cd77126cadd614d9259e60456d2e358.tar.bz2
ice-a2282c6f2cd77126cadd614d9259e60456d2e358.tar.xz
ice-a2282c6f2cd77126cadd614d9259e60456d2e358.zip
More fixes
Diffstat (limited to 'java/src/IceGrid/TreeNode/ServiceInstance.java')
-rwxr-xr-xjava/src/IceGrid/TreeNode/ServiceInstance.java102
1 files changed, 0 insertions, 102 deletions
diff --git a/java/src/IceGrid/TreeNode/ServiceInstance.java b/java/src/IceGrid/TreeNode/ServiceInstance.java
deleted file mode 100755
index 06723f18d39..00000000000
--- a/java/src/IceGrid/TreeNode/ServiceInstance.java
+++ /dev/null
@@ -1,102 +0,0 @@
-// **********************************************************************
-//
-// 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.Model;
-import IceGrid.ServiceDescriptor;
-import IceGrid.ServiceInstanceDescriptor;
-import IceGrid.TemplateDescriptor;
-
-
-class ServiceInstance extends Parent
-{
- ServiceInstance(String id,
- String displayString,
- ServiceInstanceDescriptor descriptor,
- ServiceDescriptor serviceDescriptor,
- boolean editable, // False when the enclosing server instance
- // is a template-instance
- java.util.Map serverParameters, // When the enclosing server instance
- // is a template instance,
- // this server's parameters (substituted);
- // null otherwise
- java.util.Map myParameters, // When this is a template instance within
- // a server instance, descriptor.parameterValues
- // substituted using parameters + variables
- java.util.Map nodeVariables,
- java.util.Map appVariables,
- Model model,
- Node node)
- {
- super(id, model);
- _displayString = displayString;
- _descriptor = descriptor;
- _editable = editable;
-
- if(serviceDescriptor != null)
- {
- boolean childrenEditable = _editable && (descriptor.template.length() == 0);
-
- //
- // For the children, the proper parameters can be used as variables.
- // Note that the fields of the service-instance itself should be
- // substituted with parameters (if any) + variables.
- //
- java.util.Map[] variables = null;
- if(node != null)
- {
- variables = new java.util.Map[3];
- if(myParameters != null)
- {
- variables[0] = myParameters;
- assert(descriptor.template.length() > 0);
- }
- else
- {
- variables[0] = serverParameters;
- assert(descriptor.template.length() == 0);
- }
- variables[1] = nodeVariables;
- variables[2] = appVariables;
- }
-
- _adapters = new Adapters(serviceDescriptor.adapters,
- childrenEditable,
- variables, _model);
- addChild(_adapters);
-
- _dbEnvs = new DbEnvs(serviceDescriptor.dbEnvs, childrenEditable,
- variables, _model);
- addChild(_dbEnvs);
- }
- }
-
- void unregisterAdapters()
- {
- _adapters.unregisterAll();
- }
-
- public String toString()
- {
- if(_displayString != null)
- {
- return _displayString;
- }
- else
- {
- return _id;
- }
- }
-
- private ServiceInstanceDescriptor _descriptor;
- private String _displayString;
- private boolean _editable;
- private Adapters _adapters;
- private DbEnvs _dbEnvs;
-}