From f73b655466092169abac34833fb628fce1fcdebe Mon Sep 17 00:00:00 2001
From: jcduff <jcduff@localhost>
Date: Thu, 23 Oct 2008 14:04:24 +0000
Subject: [PATCH] The commit will bring the following features :     - An updated version of the underlying database. BDB JE 3.3 is now used.     - Attribute API refactoring providing a better abstraction and offering improved performances.     - A new GUI called the Control-Panel to replace the Status-Panel: the specifications for this       GUI are available on OpenDS Wiki and contains a link to a mockup.        See <https://www.opends.org/wiki/page/ControlPanelUISpecification>.     - Some changes in the replication protocol to implement "Assured Replication Mode". The        specifications are on OpenDS Wiki at <https://www.opends.org/wiki/page/AssuredMode> and section 7       described some of the replication changes required to support this. Assured Replication is not finished,       but the main replication protocol changes to support it are done. As explained by Gilles on an email on       the Dev mailing list (http://markmail.org/message/46rgo3meq3vriy4a), with these changes the newer versions       of OpenDS may not be able to replicate with OpenDS 1.0 instances.     - Support for Service Tags on the platforms where the functionality is available and enabled. Specifications       are published at <https://www.opends.org/wiki/page/OpenDSServiceTagEnabled>. For more information on       Service Tags see <http://wikis.sun.com/display/ServiceTag/Sun+Service+Tag+FAQ>.     - The Admin Connector service. In order to provide agentry of the OpenDS server at any time, a new service       has been added, dedicated to the administration, configuration and monitoring of the server.       An overview of the Admin Connector service and it's use is available on the       OpenDS wiki <https://www.opends.org/wiki/page/ManagingAdministrationTrafficToTheServer>     - Updates to the various command line tools to support the Admin Connector service.     - Some internal re-architecting of the server to put the foundation of future developments such as virtual       directory services. The new NetworkGroups and WorkFlow internal services which have been specified in       <https://www.opends.org/wiki/page/BasicOperationRoutingThroughNetworkGroup> are now implemented.     - Many bug fixes...

---
 opends/src/server/org/opends/server/tools/ConfigureDS.java |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/ConfigureDS.java b/opends/src/server/org/opends/server/tools/ConfigureDS.java
index a63ed1b..a69a218 100644
--- a/opends/src/server/org/opends/server/tools/ConfigureDS.java
+++ b/opends/src/server/org/opends/server/tools/ConfigureDS.java
@@ -119,6 +119,11 @@
   private static final String DN_LDAP_CONNECTION_HANDLER =
        "cn=LDAP Connection Handler," + DN_CONNHANDLER_BASE;
 
+  /**
+   * The DN of the configuration entry defining the Administration connector.
+   */
+  private static final String DN_ADMIN_CONNECTOR =
+       "cn=Administration Connector," + DN_CONFIG_ROOT;
 
   /**
    * The DN of the configuration entry defining the LDAPS connection handler.
@@ -179,6 +184,7 @@
     BooleanArgument   enableStartTLS;
     FileBasedArgument rootPasswordFile;
     IntegerArgument   ldapPort;
+    IntegerArgument   adminConnectorPort;
     IntegerArgument   ldapsPort;
     IntegerArgument   jmxPort;
     StringArgument    baseDNString;
@@ -221,6 +227,14 @@
                                      INFO_CONFIGDS_DESCRIPTION_LDAP_PORT.get());
       argParser.addArgument(ldapPort);
 
+      adminConnectorPort = new IntegerArgument(
+          "adminConnectorPort".toLowerCase(), null,
+          "adminConnectorPort", false, false,
+          true, INFO_PORT_PLACEHOLDER.get(), 4444,
+          "adminConnectorPort", true, 1, true, 65535,
+          INFO_INSTALLDS_DESCRIPTION_ADMINCONNECTORPORT.get());
+      argParser.addArgument(adminConnectorPort);
+
       ldapsPort = new IntegerArgument("ldapsPort", 'P', "ldapsPort", false,
           false, true, INFO_LDAPPORT_PLACEHOLDER.get(), 636, null, true, 1,
           true, 65535,
@@ -373,6 +387,21 @@
       {
         ports.add(ldapPort.getIntValue());
       }
+      if (adminConnectorPort.isPresent())
+      {
+        if (ports.contains(adminConnectorPort.getIntValue()))
+        {
+          Message message = ERR_CONFIGDS_PORT_ALREADY_SPECIFIED.get(
+                  String.valueOf(adminConnectorPort.getIntValue()));
+          System.err.println(wrapText(message, MAX_LINE_WIDTH));
+          System.err.println(argParser.getUsage());
+          return 1;
+        }
+        else
+        {
+          ports.add(adminConnectorPort.getIntValue());
+        }
+      }
       if (ldapsPort.isPresent())
       {
         if (ports.contains(ldapsPort.getIntValue()))
@@ -753,6 +782,34 @@
         }
       }
 
+      // If an Admin Connector port was specified, then update the config
+      // accordingly.
+      if (adminConnectorPort.isPresent())
+      {
+        try
+        {
+          DN adminConnectorDN = DN.decode(DN_ADMIN_CONNECTOR);
+          ConfigEntry configEntry =
+               configHandler.getConfigEntry(adminConnectorDN);
+
+
+          IntegerConfigAttribute portAttr =
+               new IntegerConfigAttribute(ATTR_LISTEN_PORT,
+                       INFO_LDAP_CONNHANDLER_DESCRIPTION_LISTEN_PORT.get(),
+                                          true, false, true, true, 1, true,
+                                          65535,
+                                          adminConnectorPort.getIntValue());
+          configEntry.putConfigAttribute(portAttr);
+        }
+        catch (Exception e)
+        {
+          Message message = ERR_CONFIGDS_CANNOT_UPDATE_ADMIN_CONNECTOR_PORT.get(
+                  String.valueOf(e));
+          System.err.println(wrapText(message, MAX_LINE_WIDTH));
+          return 1;
+        }
+      }
+
 //    If an LDAPS port was specified, then update the config accordingly.
       if (ldapsPort.isPresent())
       {

--
Gitblit v1.10.0