From 587366cfbf99482112d7d3b4934bcca31b97332e Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Wed, 27 Jun 2007 13:09:01 +0000
Subject: [PATCH] fix for issue #1809 (Avoid operands wherever possible)

---
 opendj-sdk/opends/src/server/org/opends/server/messages/AdminMessages.java                                       |   44 +++++++-
 opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/client/cli/DsframeworkTestCase.java |   35 +++---
 opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServerGroup.java                   |  179 ++++++++++++++++++++++++++---------
 opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java                                          |   35 +++---
 4 files changed, 200 insertions(+), 93 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServerGroup.java b/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServerGroup.java
index 8882e4d..31fc32f 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServerGroup.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliServerGroup.java
@@ -154,12 +154,17 @@
   /**
    * The 'create-group' subcommand.
    */
-  public SubCommand createGoupSubCmd;
+  public SubCommand createGroupSubCmd;
 
   /**
    * The 'description' argument of the 'create-group' subcommand.
    */
-  private StringArgument createGoupDescriptionArg;
+  private StringArgument createGroupDescriptionArg;
+
+  /**
+   * The 'group-name' argument of the 'create-group' subcommand.
+   */
+  private StringArgument createGroupGroupNameArg;
 
   /**
    * The 'modify-group' subcommand.
@@ -177,11 +182,21 @@
   private StringArgument modifyGroupGroupIdArg;
 
   /**
+   * The 'group-name' argument of the 'modify-group' subcommand.
+   */
+  private StringArgument modifyGroupGroupNameArg;
+
+  /**
    * The 'delete-group' subcommand.
    */
   private SubCommand deleteGroupSubCmd;
 
   /**
+   * The 'group-name' argument of the 'delete-group' subcommand.
+   */
+  private StringArgument deleteGroupGroupNameArg;
+
+  /**
    * The 'list-group' subcommand.
    */
   private SubCommand listGroupSubCmd;
@@ -192,9 +207,14 @@
   private SubCommand addToGroupSubCmd;
 
   /**
+   * The 'group-name' argument of the 'add-to-group' subcommand.
+   */
+  private StringArgument addToGroupGroupNameArg;
+
+  /**
    * The 'member-id' argument of the 'add-to-group' subcommand.
    */
-  private StringArgument addToGoupMemberIdArg;
+  private StringArgument addToGoupMemberNameArg;
 
   /**
    * The 'remove-from-group' subcommand.
@@ -202,9 +222,14 @@
   private SubCommand removeFromGroupSubCmd;
 
   /**
+   * The 'group-name' argument of the 'remove-from-group' subcommand.
+   */
+  private StringArgument removeFromGroupGroupNameArg;
+
+  /**
    * The 'member-id' argument of the 'remove-from-group' subcommand.
    */
-  private StringArgument removeFromGoupMemberIdArg;
+  private StringArgument removeFromGoupMemberNameArg;
 
   /**
    * The 'list-members' subcommand.
@@ -212,11 +237,22 @@
   private SubCommand listMembersSubCmd;
 
   /**
+   * The 'group-name' argument of the 'list-members' subcommand.
+   */
+  private StringArgument listMembersGroupNameArg;
+
+  /**
    * The 'mlist-membership' subcommand.
    */
   private SubCommand listMembershipSubCmd;
 
   /**
+   * The 'meber-name' argument of the 'list-membership' subcommand.
+   */
+  private StringArgument listMembershipMemberNameArg;
+
+
+  /**
    * Association between ADSContext enum and display field.
    */
   private HashMap<ServerGroupProperty, String> attributeDisplayName;
@@ -240,75 +276,122 @@
     this.verboseArg = verboseArg ;
 
     // Create-group subcommand
-    createGoupSubCmd = new SubCommand(argParser, SubCommandNameEnum.CREATE_GROUP
-        .toString(), true, 1, 1, OPERAND_GROUPID,
+    createGroupSubCmd = new SubCommand(argParser,
+        SubCommandNameEnum.CREATE_GROUP.toString(),
         MSGID_ADMIN_SUBCMD_CREATE_GROUP_DESCRIPTION);
-    createGoupDescriptionArg = new StringArgument("description",
+
+    createGroupDescriptionArg = new StringArgument("description",
         OPTION_SHORT_DESCRIPTION, OPTION_LONG_DESCRIPTION, false, false,
         true, OPTION_VALUE_DESCRIPTION, "", null,
         MSGID_ADMIN_ARG_DESCRIPTION_DESCRIPTION);
-    createGoupSubCmd.addArgument(createGoupDescriptionArg);
+    createGroupSubCmd.addArgument(createGroupDescriptionArg);
+
+    createGroupGroupNameArg = new StringArgument("groupName",
+        OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true,
+        OPTION_VALUE_GROUPNAME,
+        MSGID_ADMIN_ARG_CREATE_GROUP_GROUPNAME_DESCRIPTION);
+    createGroupSubCmd.addArgument(createGroupGroupNameArg);
 
     // modify-group
     modifyGroupSubCmd = new SubCommand(argParser,
-        SubCommandNameEnum.MODIFY_GROUP.toString(), true, 1, 1,
-        OPERAND_GROUPID, MSGID_ADMIN_SUBCMD_MODIFY_GROUP_DESCRIPTION);
+        SubCommandNameEnum.MODIFY_GROUP.toString(),
+        MSGID_ADMIN_SUBCMD_MODIFY_GROUP_DESCRIPTION);
+
     modifyGroupDescriptionArg = new StringArgument("new-description",
         OPTION_SHORT_DESCRIPTION, OPTION_LONG_DESCRIPTION, false, false,
         true, OPTION_VALUE_DESCRIPTION, "", null,
         MSGID_ADMIN_ARG_NEW_DESCRIPTION_DESCRIPTION);
     modifyGroupSubCmd.addArgument(modifyGroupDescriptionArg);
-    modifyGroupGroupIdArg = new StringArgument("new-groupID",
-        OPTION_SHORT_GROUPID, OPTION_LONG_GROUPID, false, false, true,
-        OPTION_VALUE_GROUPID, "", null,
-        MSGID_ADMIN_ARG_NEW_GROUPID_DESCRIPTION);
+
+    modifyGroupGroupIdArg = new StringArgument("new-groupName",
+        OPTION_SHORT_NEWGROUPNAME, OPTION_LONG_NEWGROUPNAME, false, false, true,
+        OPTION_VALUE_GROUPNAME, "", null,
+        MSGID_ADMIN_ARG_NEW_GROUPNAME_DESCRIPTION);
     modifyGroupSubCmd.addArgument(modifyGroupGroupIdArg);
 
+    modifyGroupGroupNameArg = new StringArgument("groupName",
+        OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true,
+        OPTION_VALUE_GROUPNAME,
+        MSGID_ADMIN_ARG_GROUPNAME_DESCRIPTION);
+    modifyGroupSubCmd.addArgument(modifyGroupGroupNameArg);
+
     // delete-group
     deleteGroupSubCmd = new SubCommand(argParser,SubCommandNameEnum.DELETE_GROUP
-        .toString(), true, 1, 1, OPERAND_GROUPID,
-        MSGID_ADMIN_SUBCMD_DELETE_GROUP_DESCRIPTION);
+        .toString(), MSGID_ADMIN_SUBCMD_DELETE_GROUP_DESCRIPTION);
+
+    deleteGroupGroupNameArg = new StringArgument("groupName",
+        OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true,
+        OPTION_VALUE_GROUPNAME,
+        MSGID_ADMIN_ARG_GROUPNAME_DESCRIPTION);
+    deleteGroupSubCmd.addArgument(deleteGroupGroupNameArg);
 
     // list-groups
     listGroupSubCmd = new SubCommand(argParser, "list-groups",
         MSGID_ADMIN_SUBCMD_LIST_GROUPS_DESCRIPTION);
 
     // add-to-group
-    addToGroupSubCmd = new SubCommand(argParser, SubCommandNameEnum.ADD_TO_GROUP
-        .toString(), true, 1, 1, OPERAND_GROUPID,
+    addToGroupSubCmd = new SubCommand(argParser,
+        SubCommandNameEnum.ADD_TO_GROUP.toString(),
         MSGID_ADMIN_SUBCMD_ADD_TO_GROUP_DESCRIPTION);
-    addToGoupMemberIdArg = new StringArgument("memberID", OPTION_SHORT_MEMBERID,
-        OPTION_LONG_MEMBERID, false, false, true, OPTION_VALUE_MEMBERID, "",
-        null, MSGID_ADMIN_ARG_ADD_MEMBERID_DESCRIPTION);
-    addToGroupSubCmd.addArgument(addToGoupMemberIdArg);
+
+    addToGoupMemberNameArg = new StringArgument("memberName",
+        OPTION_SHORT_MEMBERNAME, OPTION_LONG_MEMBERNAME, true, true,
+        OPTION_VALUE_MEMBERNAME,
+        MSGID_ADMIN_ARG_ADD_MEMBERNAME_DESCRIPTION);
+    addToGroupSubCmd.addArgument(addToGoupMemberNameArg);
+
+    addToGroupGroupNameArg = new StringArgument("groupName",
+        OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true,
+        OPTION_VALUE_GROUPNAME,
+        MSGID_ADMIN_ARG_GROUPNAME_DESCRIPTION);
+    addToGroupSubCmd.addArgument(addToGroupGroupNameArg);
 
     // remove-from-group
     removeFromGroupSubCmd = new SubCommand(argParser,
-        SubCommandNameEnum.REMOVE_FROM_GROUP.toString(), true, 1, 1,
-        OPERAND_GROUPID, MSGID_ADMIN_SUBCMD_REMOVE_FROM_GROUP_DESCRIPTION);
-    removeFromGoupMemberIdArg = new StringArgument("memberID",
-        OPTION_SHORT_MEMBERID, OPTION_LONG_MEMBERID, false, false, true,
-        OPTION_VALUE_MEMBERID, "", null,
-        MSGID_ADMIN_ARG_REMOVE_MEMBERID_DESCRIPTION);
-    removeFromGroupSubCmd.addArgument(removeFromGoupMemberIdArg);
+        SubCommandNameEnum.REMOVE_FROM_GROUP.toString(),
+        MSGID_ADMIN_SUBCMD_REMOVE_FROM_GROUP_DESCRIPTION);
+
+    removeFromGoupMemberNameArg = new StringArgument("memberName",
+        OPTION_SHORT_MEMBERNAME, OPTION_LONG_MEMBERNAME, true, true,
+        OPTION_VALUE_MEMBERNAME,
+        MSGID_ADMIN_ARG_REMOVE_MEMBERNAME_DESCRIPTION);
+    removeFromGroupSubCmd.addArgument(removeFromGoupMemberNameArg);
+
+    removeFromGroupGroupNameArg = new StringArgument("groupName",
+        OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true,
+        OPTION_VALUE_GROUPNAME,
+        MSGID_ADMIN_ARG_GROUPNAME_DESCRIPTION);
+    removeFromGroupSubCmd.addArgument(removeFromGroupGroupNameArg);
+
 
     // list-members
     listMembersSubCmd = new SubCommand(argParser,SubCommandNameEnum.LIST_MEMBERS
-        .toString(), true, 1, 1, OPERAND_GROUPID,
-        MSGID_ADMIN_SUBCMD_LIST_MEMBERS_DESCRIPTION);
+        .toString(), MSGID_ADMIN_SUBCMD_LIST_MEMBERS_DESCRIPTION);
+
+    listMembersGroupNameArg = new StringArgument("groupName",
+        OPTION_SHORT_GROUPNAME, OPTION_LONG_GROUPNAME, true, true,
+        OPTION_VALUE_GROUPNAME,
+        MSGID_ADMIN_ARG_GROUPNAME_DESCRIPTION);
+    listMembersSubCmd.addArgument(listMembersGroupNameArg);
 
     // list-membership
     listMembershipSubCmd = new SubCommand(argParser,
-        SubCommandNameEnum.LIST_MEMBERSHIP.toString(), true, 1, 1,
-        OPERAND_MEMBERID, MSGID_ADMIN_SUBCMD_LIST_MEMBERSHIP_DESCRIPTION);
+        SubCommandNameEnum.LIST_MEMBERSHIP.toString(),
+        MSGID_ADMIN_SUBCMD_LIST_MEMBERSHIP_DESCRIPTION);
+
+    listMembershipMemberNameArg = new StringArgument("memberName",
+        OPTION_SHORT_MEMBERNAME, OPTION_LONG_MEMBERNAME, true, true,
+        OPTION_VALUE_MEMBERNAME,
+        MSGID_ADMIN_ARG_MEMBERNAME_DESCRIPTION);
+    listMembershipSubCmd.addArgument(listMembershipMemberNameArg);
 
     // Create association between ADSContext enum and display field
     attributeDisplayName = new HashMap<ServerGroupProperty, String>();
-    attributeDisplayName.put(ServerGroupProperty.UID, OPTION_LONG_GROUPID);
+    attributeDisplayName.put(ServerGroupProperty.UID, OPTION_LONG_GROUPNAME);
     attributeDisplayName.put(ServerGroupProperty.DESCRIPTION,
         OPTION_LONG_DESCRIPTION);
     attributeDisplayName.put(ServerGroupProperty.MEMBERS,
-        OPTION_LONG_MEMBERID);
+        OPTION_LONG_MEMBERNAME);
   }
 
   /**
@@ -330,20 +413,20 @@
     // -----------------------
     // create-group subcommand
     // -----------------------
-    if (subCmd.getName().equals(createGoupSubCmd.getName()))
+    if (subCmd.getName().equals(createGroupSubCmd.getName()))
     {
-      String groupId = subCmd.getTrailingArguments().get(0);
+      String groupId = createGroupGroupNameArg.getValue();
       HashMap<ServerGroupProperty, Object> serverGroupProperties =
         new HashMap<ServerGroupProperty, Object>();
 
-      // get the GROUP_ID
+      // get the GROUP_NAME
       serverGroupProperties.put(ServerGroupProperty.UID, groupId);
 
       // get the Description
-      if (createGoupDescriptionArg.isPresent())
+      if (createGroupDescriptionArg.isPresent())
       {
         serverGroupProperties.put(ServerGroupProperty.DESCRIPTION,
-            createGoupDescriptionArg.getValue());
+            createGroupDescriptionArg.getValue());
       }
 
       // Create the group
@@ -355,7 +438,7 @@
     // -----------------------
     else if (subCmd.getName().equals(deleteGroupSubCmd.getName()))
     {
-      String groupId = subCmd.getTrailingArguments().get(0);
+      String groupId = deleteGroupGroupNameArg.getValue();
       HashMap<ServerGroupProperty, Object> serverGroupProperties =
         new HashMap<ServerGroupProperty, Object>();
 
@@ -481,7 +564,7 @@
     // -----------------------
     else if (subCmd.getName().equals(modifyGroupSubCmd.getName()))
     {
-      String groupId = subCmd.getTrailingArguments().get(0);
+      String groupId = modifyGroupGroupNameArg.getValue();
       HashMap<ServerGroupProperty, Object> serverGroupProperties =
         new HashMap<ServerGroupProperty, Object>();
       HashSet<ServerGroupProperty> serverGroupPropertiesToRemove =
@@ -546,7 +629,7 @@
     // -----------------------
     else if (subCmd.getName().equals(addToGroupSubCmd.getName()))
     {
-      String groupId = subCmd.getTrailingArguments().get(0);
+      String groupId = addToGroupGroupNameArg.getValue();
       HashMap<ServerGroupProperty, Object> serverGroupProperties =
         new HashMap<ServerGroupProperty, Object>();
 
@@ -557,7 +640,7 @@
         memberList = new HashSet<String>();
       }
       String newMember = "cn="
-          + Rdn.escapeValue(addToGoupMemberIdArg.getValue());
+          + Rdn.escapeValue(addToGoupMemberNameArg.getValue());
       if (memberList.contains(newMember))
       {
         return ReturnCode.ALREADY_REGISTERED;
@@ -575,7 +658,7 @@
     // -----------------------
     else if (subCmd.getName().equals(removeFromGroupSubCmd.getName()))
     {
-      String groupId = subCmd.getTrailingArguments().get(0);
+      String groupId = removeFromGroupGroupNameArg.getValue();
       HashMap<ServerGroupProperty, Object> serverGroupProperties =
         new HashMap<ServerGroupProperty, Object>();
 
@@ -586,7 +669,7 @@
         return ReturnCode.NOT_YET_REGISTERED;
       }
       String memberToRemove = "cn="
-          + Rdn.escapeValue(removeFromGoupMemberIdArg.getValue());
+          + Rdn.escapeValue(removeFromGoupMemberNameArg.getValue());
       if (!memberList.contains(memberToRemove))
       {
         return ReturnCode.NOT_YET_REGISTERED;
@@ -605,7 +688,7 @@
     // -----------------------
     else if (subCmd.getName().equals(listMembersSubCmd.getName()))
     {
-      String groupId = subCmd.getTrailingArguments().get(0);
+      String groupId = listMembersGroupNameArg.getValue();
 
       // get the current member list
       Set<String> memberList = adsContext.getServerGroupMemberList(groupId);
@@ -637,7 +720,7 @@
 
       Set<Map<ServerGroupProperty, Object>> result = adsContext
           .readServerGroupRegistry();
-      String MemberId = subCmd.getTrailingArguments().get(0);
+      String MemberId = listMembershipMemberNameArg.getValue();
 
       StringBuffer buffer = new StringBuffer();
       for (Map<ServerGroupProperty, Object> groupProps : result)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/messages/AdminMessages.java b/opendj-sdk/opends/src/server/org/opends/server/messages/AdminMessages.java
index 0e01e35..9097322 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/messages/AdminMessages.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/messages/AdminMessages.java
@@ -241,7 +241,7 @@
    * The message ID for the message that will be used as the description of the
    * new "groupid" argument.  This does not take any arguments.
    */
-  public static final int MSGID_ADMIN_ARG_NEW_GROUPID_DESCRIPTION =
+  public static final int MSGID_ADMIN_ARG_NEW_GROUPNAME_DESCRIPTION =
     CATEGORY_MASK_ADMIN | SEVERITY_MASK_INFORMATIONAL | 23;
 
   /**
@@ -272,7 +272,7 @@
    * The message ID for the message that will be used as the description of the
    * added "member-id" argument.  This does not take any arguments.
    */
-  public static final int MSGID_ADMIN_ARG_ADD_MEMBERID_DESCRIPTION =
+  public static final int MSGID_ADMIN_ARG_ADD_MEMBERNAME_DESCRIPTION =
     CATEGORY_MASK_ADMIN | SEVERITY_MASK_INFORMATIONAL | 27;
 
   /**
@@ -287,7 +287,7 @@
    * The message ID for the message that will be used as the description of the
    * removed "member-id" argument.  This does not take any arguments.
    */
-  public static final int MSGID_ADMIN_ARG_REMOVE_MEMBERID_DESCRIPTION =
+  public static final int MSGID_ADMIN_ARG_REMOVE_MEMBERNAME_DESCRIPTION =
     CATEGORY_MASK_ADMIN | SEVERITY_MASK_INFORMATIONAL | 29;
 
   /**
@@ -454,8 +454,27 @@
   public static final int MSGID_ADMIN_NO_MESSAGE =
     CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 52;
 
+  /**
+   * The message ID for the message that will be used as the
+   * description of the "groupName" argument of the create-group
+   * subcommand. This does take one argument.
+   */
+  public static final int MSGID_ADMIN_ARG_CREATE_GROUP_GROUPNAME_DESCRIPTION =
+    CATEGORY_MASK_ADMIN | SEVERITY_MASK_INFORMATIONAL | 53;
 
+  /**
+   * The message ID for the message that will be used as the description of the
+   * "groupName" argument.  This does take one argument.
+   */
+  public static final int MSGID_ADMIN_ARG_GROUPNAME_DESCRIPTION =
+    CATEGORY_MASK_ADMIN | SEVERITY_MASK_INFORMATIONAL | 54;
 
+  /**
+   * The message ID for the message that will be used as the description of the
+   * "memberName" argument.  This does take one argument.
+   */
+  public static final int MSGID_ADMIN_ARG_MEMBERNAME_DESCRIPTION =
+    CATEGORY_MASK_ADMIN | SEVERITY_MASK_INFORMATIONAL | 55;
   // Prevent instantiation.
   private AdminMessages() {
     // Do nothing.
@@ -559,7 +578,7 @@
         "Modify a group's properties");
     registerMessage(MSGID_ADMIN_ARG_NEW_DESCRIPTION_DESCRIPTION,
         "If specified, the new description");
-    registerMessage(MSGID_ADMIN_ARG_NEW_GROUPID_DESCRIPTION,
+    registerMessage(MSGID_ADMIN_ARG_NEW_GROUPNAME_DESCRIPTION,
         "If specified, the new group's identifier");
     registerMessage(MSGID_ADMIN_SUBCMD_DELETE_GROUP_DESCRIPTION,
         "Delete an existing group of servers" );
@@ -567,12 +586,12 @@
         "List groups that have been defined" );
     registerMessage(MSGID_ADMIN_SUBCMD_ADD_TO_GROUP_DESCRIPTION,
         "Add a member to a group" );
-    registerMessage(MSGID_ADMIN_ARG_ADD_MEMBERID_DESCRIPTION,
-        "The member to add" );
+    registerMessage(MSGID_ADMIN_ARG_ADD_MEMBERNAME_DESCRIPTION,
+        "The member to add. This is a required argument" );
     registerMessage(MSGID_ADMIN_SUBCMD_REMOVE_FROM_GROUP_DESCRIPTION,
         "Remove a member from a group" );
-    registerMessage(MSGID_ADMIN_ARG_REMOVE_MEMBERID_DESCRIPTION,
-        "The member to remove" );
+    registerMessage(MSGID_ADMIN_ARG_REMOVE_MEMBERNAME_DESCRIPTION,
+        "The member to remove. This is a required argument" );
     registerMessage(MSGID_ADMIN_SUBCMD_LIST_MEMBERS_DESCRIPTION,
         "List members of the specified group" );
     registerMessage(MSGID_ADMIN_SUBCMD_LIST_MEMBERSHIP_DESCRIPTION,
@@ -603,7 +622,7 @@
     registerMessage(MSGID_ADMIN_MISSING_PORT,
         "The port is missing");
     registerMessage(MSGID_ADMIN_NOVALID_PORT,
-        "The port is not vaklid");
+        "The port is not valid");
     registerMessage(MSGID_ADMIN_MISSING_NAME,
         "The name is missing");
     registerMessage(MSGID_ADMIN_MISSING_ADMIN_UID,
@@ -620,5 +639,12 @@
        "The operation has been successfully completed, "+
        "but no action was required");
     registerMessage(MSGID_ADMIN_NO_MESSAGE,"");
+    registerMessage(MSGID_ADMIN_ARG_CREATE_GROUP_GROUPNAME_DESCRIPTION,
+       "The new group's identifier. This is a required argument");
+    registerMessage(MSGID_ADMIN_ARG_GROUPNAME_DESCRIPTION,
+       "The group's identifier. This is a required argument");
+    registerMessage(MSGID_ADMIN_ARG_MEMBERNAME_DESCRIPTION,
+    "The member's identifier. This is a required argument");
+
   }
 }
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java b/opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java
index a9a3583..23d1c60 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java
@@ -526,50 +526,49 @@
   public static final String OPTION_VALUE_DESCRIPTION = "{description}";
 
   /**
-   * The value for the short option groupid attributes.
+   * The value for the short option groupName attributes.
    */
-  public static final char OPTION_SHORT_GROUPID = 'g';
+  public static final char OPTION_SHORT_GROUPNAME = 'g';
 
   /**
-   * The value for the long option groupid
+   * The value for the long option groupName
    * attribute.
    */
-  public static final String OPTION_LONG_GROUPID= "groupId";
+  public static final String OPTION_LONG_GROUPNAME= "groupName";
 
   /**
-   * The placeholder value of groupid that will be
+   * The placeholder value of groupName that will be
    * displayed in usage information.
    */
-  public static final String OPTION_VALUE_GROUPID = "{group-id}";
+  public static final String OPTION_VALUE_GROUPNAME = "{group-name}";
 
   /**
-   * The value for the short option member-id attributes.
+   * The value for the short option newGroupName attribute.
    */
-  public static final char OPTION_SHORT_MEMBERID = 'm';
+  public static final char OPTION_SHORT_NEWGROUPNAME = 'n';
 
   /**
-   * The value for the long member-id version
+   * The value for the long option groupName
    * attribute.
    */
-  public static final String OPTION_LONG_MEMBERID= "memberId";
+  public static final String OPTION_LONG_NEWGROUPNAME= "newGroupName";
 
   /**
-   * The placeholder value of member-id that will be
-   * displayed in usage information.
+   * The value for the short option member-name attributes.
    */
-  public static final String OPTION_VALUE_MEMBERID = "{member-id}";
+  public static final char OPTION_SHORT_MEMBERNAME = 'm';
 
   /**
-   * The placeholder value of group_id that will be
-   * displayed in usage information.
+   * The value for the long member-name version
+   * attribute.
    */
-  public static final String OPERAND_GROUPID = "GROUP_ID";
+  public static final String OPTION_LONG_MEMBERNAME= "memberName";
 
   /**
-   * The placeholder value of member_id that will be
+   * The placeholder value of member-name that will be
    * displayed in usage information.
    */
-  public static final String OPERAND_MEMBERID = "MEMBER_ID";
+  public static final String OPTION_VALUE_MEMBERNAME = "{member-name}";
 
   /**
    * The placeholder value of backend name that will be
diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/client/cli/DsserviceTestCase.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/client/cli/DsframeworkTestCase.java
similarity index 94%
rename from opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/client/cli/DsserviceTestCase.java
rename to opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/client/cli/DsframeworkTestCase.java
index a5e0fe4..7c289b3 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/client/cli/DsserviceTestCase.java
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/client/cli/DsframeworkTestCase.java
@@ -47,7 +47,7 @@
 /**
  * A set of test cases for the dsservice tool.
  */
-public class DsserviceTestCase
+public class DsframeworkTestCase
 {
   // The path to a file containing an invalid bind password.
   private String invalidPasswordFile;
@@ -68,7 +68,6 @@
          throws Exception
   {
     TestCaseUtils.startServer();
-    
 
     File pwFile = File.createTempFile("valid-bind-password-", ".txt");
     pwFile.deleteOnExit();
@@ -83,7 +82,7 @@
     fileWriter.write("wrongPassword" + System.getProperty("line.separator"));
     fileWriter.close();
     invalidPasswordFile = pwFile.getAbsolutePath();
-    
+
     String[] args =
     {
       "create-ads",
@@ -92,12 +91,12 @@
       "admin"
     };
 
-    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out, System.err),
-        ReturnCode.SUCCESSFUL.getReturnCode());
+    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out,
+        System.err), ReturnCode.SUCCESSFUL.getReturnCode());
   }
 
   /**
-   * Ensures ADS is removed
+   * Ensures ADS is removed.
    * @throws  Exception  If an unexpected problem occurs.
    */
   @AfterClass()
@@ -112,8 +111,8 @@
       "admin"
     };
 
-    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out, System.err),
-        ReturnCode.SUCCESSFUL.getReturnCode());
+    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out,
+        System.err), ReturnCode.SUCCESSFUL.getReturnCode());
   }
 
   /**
@@ -130,10 +129,10 @@
       "-w", "password"
     };
 
-    assertFalse(DsFrameworkCliMain.mainCLI(args, false, null, null) 
+    assertFalse(DsFrameworkCliMain.mainCLI(args, false, null, null)
         == ReturnCode.SUCCESSFUL.getReturnCode());
   }
-  
+
   /**
    * Tests list-groups with a nonexistent bind DN.
    */
@@ -190,10 +189,10 @@
       "-j", validPasswordFile,
     };
 
-    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out, System.err),
-        ReturnCode.SUCCESSFUL.getReturnCode());
+    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out,
+        System.err), ReturnCode.SUCCESSFUL.getReturnCode());
   }
-  
+
   /**
    * Tests list-groups with an invalid password read from a file.
    *
@@ -230,8 +229,8 @@
       "-X"
     };
 
-    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out, System.err),
-        ReturnCode.SUCCESSFUL.getReturnCode());
+    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out,
+        System.err), ReturnCode.SUCCESSFUL.getReturnCode());
   }
 
 
@@ -254,8 +253,8 @@
       "-P", trustStorePath
     };
 
-    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out, System.err),
-        ReturnCode.SUCCESSFUL.getReturnCode());
+    assertEquals(DsFrameworkCliMain.mainCLI(args, false, System.out,
+        System.err), ReturnCode.SUCCESSFUL.getReturnCode());
   }
 
 
@@ -302,7 +301,7 @@
     assertEquals(DsFrameworkCliMain.mainCLI(args, false, null, System.err),
         ReturnCode.SUCCESSFUL.getReturnCode());
   }
-  
+
   /**
    * Tests the dsservice with the "--help" option.
    */

--
Gitblit v1.10.0