summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-12-20 19:18:30 +0000
committerBernard Normier <bernard@zeroc.com>2006-12-20 19:18:30 +0000
commit4ca122b8ff02bab36e073624f7c03933946484be (patch)
treedd433534031789f06c7d9685fb51d26ccb66bfdd /java
parentDon't add again IceBox adapter proeprties if they already exist. (diff)
downloadice-4ca122b8ff02bab36e073624f7c03933946484be.tar.bz2
ice-4ca122b8ff02bab36e073624f7c03933946484be.tar.xz
ice-4ca122b8ff02bab36e073624f7c03933946484be.zip
Fixed various Ice.OA issues; added iceVersion
Diffstat (limited to 'java')
-rwxr-xr-xjava/src/IceGridGUI/Application/Adapter.java21
-rwxr-xr-xjava/src/IceGridGUI/Application/AdapterEditor.java16
-rwxr-xr-xjava/src/IceGridGUI/Application/CommunicatorSubEditor.java4
-rwxr-xr-xjava/src/IceGridGUI/Application/ServerSubEditor.java14
-rwxr-xr-xjava/src/IceGridGUI/LiveDeployment/ServerEditor.java7
5 files changed, 40 insertions, 22 deletions
diff --git a/java/src/IceGridGUI/Application/Adapter.java b/java/src/IceGridGUI/Application/Adapter.java
index 340c0452e69..b2c7455f6d4 100755
--- a/java/src/IceGridGUI/Application/Adapter.java
+++ b/java/src/IceGridGUI/Application/Adapter.java
@@ -103,11 +103,10 @@ class Adapter extends TreeNode implements DescriptorHolder
return new AdapterEditor();
}
-
public void destroy()
{
- removeProperty(_id, "Endpoints");
- removeProperty(_id, "PublishedEndpoints");
+ removeProperty("Ice.OA." + _descriptor.name + ".Endpoints");
+ removeProperty("Ice.OA." + _descriptor.name + ".PublishedEndpoints");
((Communicator)_parent).getAdapters().destroyChild(this);
}
@@ -155,7 +154,9 @@ class Adapter extends TreeNode implements DescriptorHolder
{
java.util.List attributes = new java.util.LinkedList();
attributes.add(createAttribute("name", _descriptor.name));
- attributes.add(createAttribute("endpoints", getProperty("Endpoints")));
+ String oaPrefix = "Ice.OA." + _descriptor.name + ".";
+
+ attributes.add(createAttribute("endpoints", getProperty(oaPrefix + "Endpoints")));
attributes.add(createAttribute("id", _descriptor.id));
if(_descriptor.registerProcess)
{
@@ -197,26 +198,20 @@ class Adapter extends TreeNode implements DescriptorHolder
String getProperty(String property)
{
- return ((Communicator)_parent).getProperty(_descriptor.name + "." + property);
+ return ((Communicator)_parent).getProperty(property);
}
String lookupPropertyValue(String val)
{
return ((Communicator)_parent).lookupPropertyValue(val);
}
- void setProperty(String name, String property, String newValue)
- {
- ((Communicator)_parent).setProperty(name + "." + property, newValue);
- }
void setProperty(String property, String newValue)
{
((Communicator)_parent).setProperty(property, newValue);
}
- void removeProperty(String name, String property)
+ void removeProperty(String property)
{
- ((Communicator)_parent).removeProperty(name + "." + property);
+ ((Communicator)_parent).removeProperty(property);
}
-
-
String getDefaultAdapterId()
{
return getDefaultAdapterId(_id);
diff --git a/java/src/IceGridGUI/Application/AdapterEditor.java b/java/src/IceGridGUI/Application/AdapterEditor.java
index 96ed449a240..c3359bc9876 100755
--- a/java/src/IceGridGUI/Application/AdapterEditor.java
+++ b/java/src/IceGridGUI/Application/AdapterEditor.java
@@ -298,21 +298,21 @@ class AdapterEditor extends CommunicatorChildEditor
Adapter adapter = getAdapter();
if(!name.equals(_oldName))
{
- adapter.removeProperty("Ice.OA." + _oldName, "Endpoints");
- adapter.removeProperty("Ice.OA." + _oldName, "PublishedEndpoints");
+ adapter.removeProperty("Ice.OA." + _oldName + ".Endpoints");
+ adapter.removeProperty("Ice.OA." + _oldName + ".PublishedEndpoints");
_oldName = name;
}
- adapter.setProperty("Ice.OA." + name, "Endpoints", _endpoints.getText().trim());
+ adapter.setProperty("Ice.OA." + name + ".Endpoints", _endpoints.getText().trim());
Object published = _publishedEndpoints.getSelectedItem();
if(published == PUBLISH_ACTUAL)
{
- adapter.removeProperty("Ice.OA." + name, "PublishedEndpoints");
+ adapter.removeProperty("Ice.OA." + name + ".PublishedEndpoints");
}
else
{
- adapter.setProperty("Ice.OA." + name, "PublishedEndpoints",
+ adapter.setProperty("Ice.OA." + name + ".PublishedEndpoints",
published.toString().trim());
}
@@ -437,6 +437,8 @@ class AdapterEditor extends CommunicatorChildEditor
_name.setText(Utils.substitute(descriptor.name, resolver));
_name.setEditable(isEditable);
+ String oaPrefix = "Ice.OA." + descriptor.name + ".";
+
_description.setText(
Utils.substitute(descriptor.description, resolver));
_description.setEditable(isEditable);
@@ -501,14 +503,14 @@ class AdapterEditor extends CommunicatorChildEditor
}
else
{
- _endpoints.setText(Utils.substitute(adapter.getProperty("Endpoints"), resolver));
+ _endpoints.setText(Utils.substitute(adapter.getProperty(oaPrefix + "Endpoints"), resolver));
}
_endpoints.setEditable(isEditable);
_publishedEndpoints.setEnabled(true);
_publishedEndpoints.setEditable(true);
String published =
- Utils.substitute(adapter.getProperty("PublishedEndpoints"), resolver);
+ Utils.substitute(adapter.getProperty(oaPrefix + "PublishedEndpoints"), resolver);
if(published == null || published.equals(""))
{
_publishedEndpoints.setSelectedItem(PUBLISH_ACTUAL);
diff --git a/java/src/IceGridGUI/Application/CommunicatorSubEditor.java b/java/src/IceGridGUI/Application/CommunicatorSubEditor.java
index 5bb1b2cb428..83418a61a89 100755
--- a/java/src/IceGridGUI/Application/CommunicatorSubEditor.java
+++ b/java/src/IceGridGUI/Application/CommunicatorSubEditor.java
@@ -35,9 +35,9 @@ class CommunicatorSubEditor
_propertySets.getDocument().addDocumentListener(
_mainEditor.getUpdateListener());
- _properties = new PropertiesField(mainEditor);
- _description.setToolTipText("Property Set References");
+ _propertySets.setToolTipText("Property Set References");
+ _properties = new PropertiesField(mainEditor);
_logFiles = new MapField(mainEditor, "Path", "Property",
true);
_logFiles.setToolTipText("Log files used by this server or service");
diff --git a/java/src/IceGridGUI/Application/ServerSubEditor.java b/java/src/IceGridGUI/Application/ServerSubEditor.java
index 9bc31db6943..77e77df5e45 100755
--- a/java/src/IceGridGUI/Application/ServerSubEditor.java
+++ b/java/src/IceGridGUI/Application/ServerSubEditor.java
@@ -35,6 +35,11 @@ class ServerSubEditor extends CommunicatorSubEditor
_mainEditor.getUpdateListener());
_id.setToolTipText("Must be unique within this IceGrid deployment");
+ _iceVersion.getDocument().addDocumentListener(
+ _mainEditor.getUpdateListener());
+ _iceVersion.setToolTipText("<html>This server's Ice version, such as 3.0 or 3.1.1;<br>"
+ + "leave blank to use the version of the IceGrid registry.</html>");
+
_exe.getDocument().addDocumentListener(
_mainEditor.getUpdateListener());
_exe.setToolTipText("<html>Path to this server's executable, e.g.:<br>"
@@ -141,6 +146,9 @@ class ServerSubEditor extends CommunicatorSubEditor
builder.append("Server ID");
builder.append(_id, 3);
builder.nextLine();
+ builder.append("Ice Version");
+ builder.append(_iceVersion, 3);
+ builder.nextLine();
//
// Add Communicator fields
@@ -204,6 +212,7 @@ class ServerSubEditor extends CommunicatorSubEditor
{
ServerDescriptor descriptor = getServerDescriptor();
descriptor.id = _id.getText().trim();
+ descriptor.iceVersion = _iceVersion.getText().trim();
descriptor.exe = _exe.getText().trim();
descriptor.pwd = _pwd.getText().trim();
@@ -269,6 +278,10 @@ class ServerSubEditor extends CommunicatorSubEditor
}
_id.setEditable(isEditable);
+ _iceVersion.setText(
+ Utils.substitute(descriptor.iceVersion, detailResolver));
+ _iceVersion.setEditable(isEditable);
+
_exe.setText(
Utils.substitute(descriptor.exe, detailResolver));
_exe.setEditable(isEditable);
@@ -380,6 +393,7 @@ class ServerSubEditor extends CommunicatorSubEditor
static private final String DEFAULT_DISTRIB = "${application}.IcePatch2/server";
private JTextField _id = new JTextField(20);
+ private JTextField _iceVersion = new JTextField(20);
private JTextField _exe = new JTextField(20);
private JTextField _pwd = new JTextField(20);
private ListTextField _options = new ListTextField(20);
diff --git a/java/src/IceGridGUI/LiveDeployment/ServerEditor.java b/java/src/IceGridGUI/LiveDeployment/ServerEditor.java
index 2cf9b9f5729..7dd3cee2c8b 100755
--- a/java/src/IceGridGUI/LiveDeployment/ServerEditor.java
+++ b/java/src/IceGridGUI/LiveDeployment/ServerEditor.java
@@ -50,6 +50,7 @@ class ServerEditor extends CommunicatorEditor
_enabled.setEnabled(false);
_application.setEditable(false);
+ _iceVersion.setEditable(false);
_exe.setEditable(false);
_pwd.setEditable(false);
@@ -110,6 +111,7 @@ class ServerEditor extends CommunicatorEditor
final Utils.Resolver resolver = server.getResolver();
_application.setText(resolver.find("application"));
+ _iceVersion.setText(resolver.substitute(descriptor.iceVersion));
super.show(descriptor, server.getProperties(), resolver);
@@ -180,6 +182,9 @@ class ServerEditor extends CommunicatorEditor
builder.append(_application);
builder.append(_gotoApplication);
builder.nextLine();
+ builder.append("Ice Version");
+ builder.append(_iceVersion, 3);
+ builder.nextLine();
//
// Add Communicator fields
@@ -276,6 +281,8 @@ class ServerEditor extends CommunicatorEditor
private JTextField _application = new JTextField(20);
private JButton _gotoApplication;
+ private JTextField _iceVersion = new JTextField(20);
+
private JTextField _exe = new JTextField(20);
private JTextField _pwd = new JTextField(20);
private JTextField _user = new JTextField(20);