mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
19.09.2008 13a63611d24de8c5727e62a215b26354c1a22278
opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java
@@ -203,6 +203,10 @@
    // Get the naming argument values.
    List<String> names = getNamingArgValues(app, namingArgs);
    // Reset the command builder
    getCommandBuilder().clearArguments();
    setCommandBuilderUseful(false);
    // Delete the child managed object.
    ManagementContext context = factory.getManagementContext(app);
    MenuResult<ManagedObject<?>> result;
@@ -276,6 +280,7 @@
        }
        if (confirmDeletion(app)) {
          setCommandBuilderUseful(true);
          parent.removeChild(irelation, childName);
        } else {
          return MenuResult.cancel();
@@ -285,6 +290,8 @@
          (OptionalRelationDefinition<?, ?>) relation;
        if (confirmDeletion(app)) {
          setCommandBuilderUseful(true);
          parent.removeChild(orelation);
        } else {
          return MenuResult.cancel();
@@ -336,6 +343,15 @@
      throw new ClientException(LDAPResultCode.CLIENT_SIDE_SERVER_DOWN, msg);
    }
    // Add the naming arguments if they were provided.
    for (StringArgument arg : namingArgs)
    {
      if (arg.isPresent())
      {
        getCommandBuilder().addArgument(arg);
      }
    }
    // Output success message.
    Message msg = INFO_DSCFG_CONFIRM_DELETE_SUCCESS.get(ufn);
    app.printVerboseMessage(msg);