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

matthew_swift
12.24.2007 d0cdd38e12da2794edc888686757fcb180d2f6be
Improve the usability of dsconfig when the server rejects a change. Previously dsconfig would just bomb out. With this change dsconfig will either give the user the opportunity to re-edit and fix any mis-configured properties of the component (for create-xxx and set-xxx-prop interactive modes), or drop them back to the component menu (for delete-xxx interactive mode).

dsconfig will still bomb out when it encounters a communication or security related problem.
5 files modified
241 ■■■■■ changed files
opends/src/messages/messages/dsconfig.properties 13 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java 85 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/DSConfig.java 19 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java 74 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java 50 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/dsconfig.properties
@@ -406,12 +406,13 @@
INFO_DSCFG_PROMPT_SECURITY_KEYSTORE_PATH_1381=Keystore path:
INFO_DSCFG_PROMPT_SECURITY_KEYSTORE_PASSWORD_1382=Password for keystore '%s':
INFO_DSCFG_PROMPT_SECURITY_CERTIFICATE_NAME_1383=Certificate nickname:
SEVERE_ERR_DSCFG_ERROR_CREATE_ORE_SINGLE_1384=The %s could not be created because of the following reason: %s
SEVERE_ERR_DSCFG_ERROR_CREATE_ORE_PLURAL_1385=The %s could not be created because of the following reasons: %s
SEVERE_ERR_DSCFG_ERROR_DELETE_ORE_SINGLE_1386=The %s could not be deleted because of the following reason: %s
SEVERE_ERR_DSCFG_ERROR_DELETE_ORE_PLURAL_1387=The %s could not be deleted because of the following reasons: %s
SEVERE_ERR_DSCFG_ERROR_MODIFY_ORE_SINGLE_1388=The %s could not be modified because of the following reason: %s
SEVERE_ERR_DSCFG_ERROR_MODIFY_ORE_PLURAL_1389=The %s could not be modified because of the following reasons: %s
SEVERE_ERR_DSCFG_ERROR_CREATE_ORE_SINGLE_1384=The %s could not be created because of the following reason:
SEVERE_ERR_DSCFG_ERROR_CREATE_ORE_PLURAL_1385=The %s could not be created because of the following reasons:
SEVERE_ERR_DSCFG_ERROR_DELETE_ORE_SINGLE_1386=The %s could not be deleted because of the following reason:
SEVERE_ERR_DSCFG_ERROR_DELETE_ORE_PLURAL_1387=The %s could not be deleted because of the following reasons:
SEVERE_ERR_DSCFG_ERROR_MODIFY_ORE_SINGLE_1388=The %s could not be modified because of the following reason:
SEVERE_ERR_DSCFG_ERROR_MODIFY_ORE_PLURAL_1389=The %s could not be modified because of the following reasons:
INFO_DSCFG_PROMPT_SECURITY_LDAP_1390=LDAP
INFO_DSCFG_PROMPT_SECURITY_PROTOCOL_DEFAULT_CHOICE_1391=%d
SEVERE_ERR_DSCFG_PROMPT_SECURITY_INVALID_FILE_PATH_1392=The provided path is not valid
INFO_DSCFG_PROMPT_EDIT_AGAIN_1393=Would you like to edit the properties of the %s again in order to resolve this problem?
opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
@@ -551,6 +551,7 @@
      throw ArgumentExceptionFactory.unknownSubType(relation, typeName,
          typeUsage);
    }
    Message ufn = d.getUserFriendlyName();
    // Get the naming argument values.
    List<String> names = getNamingArgValues(app, namingArgs);
@@ -566,34 +567,33 @@
    try {
      result = getManagedObject(app, context, path, names);
    } catch (AuthorizationException e) {
      Message msg = ERR_DSCFG_ERROR_CREATE_AUTHZ.get(d.getUserFriendlyName());
      Message msg = ERR_DSCFG_ERROR_CREATE_AUTHZ.get(ufn);
      throw new ClientException(LDAPResultCode.INSUFFICIENT_ACCESS_RIGHTS, msg);
    } catch (DefinitionDecodingException e) {
      Message ufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_DDE.get(ufn, ufn, ufn);
      Message pufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_DDE.get(pufn, pufn, pufn);
      throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
    } catch (ManagedObjectDecodingException e) {
      Message ufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_MODE.get(ufn);
      Message pufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_MODE.get(pufn);
      throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg, e);
    } catch (CommunicationException e) {
      Message msg = ERR_DSCFG_ERROR_CREATE_CE.get(d.getUserFriendlyName(), e
      Message msg = ERR_DSCFG_ERROR_CREATE_CE.get(ufn, e
          .getMessage());
      throw new ClientException(LDAPResultCode.CLIENT_SIDE_SERVER_DOWN, msg);
    } catch (ConcurrentModificationException e) {
      Message msg = ERR_DSCFG_ERROR_CREATE_CME.get(d.getUserFriendlyName());
      Message msg = ERR_DSCFG_ERROR_CREATE_CME.get(ufn);
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
    } catch (ManagedObjectNotFoundException e) {
      Message ufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_MONFE.get(ufn);
      Message pufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_MONFE.get(pufn);
      throw new ClientException(LDAPResultCode.NO_SUCH_OBJECT, msg);
    }
    if (result.isQuit()) {
      if (!app.isMenuDrivenMode()) {
        // User chose to cancel creation.
        Message msg = INFO_DSCFG_CONFIRM_CREATE_FAIL.get(d
            .getUserFriendlyName());
        Message msg = INFO_DSCFG_CONFIRM_CREATE_FAIL.get(ufn);
        app.printVerboseMessage(msg);
      }
      return MenuResult.quit();
@@ -603,7 +603,6 @@
    }
    ManagedObject<?> parent = result.getValue();
    try {
      ManagedObject<? extends C> child;
      List<DefaultBehaviorException> exceptions =
        new LinkedList<DefaultBehaviorException>();
@@ -643,6 +642,7 @@
        setProperty(child, provider, pd);
      }
    while (true) {
      // Interactively set properties if applicable.
      if (app.isInteractive()) {
        SortedSet<PropertyDefinition<?>> properties =
@@ -664,8 +664,7 @@
        MenuResult<Void> result2 = editor.edit(child, properties, true);
        if (result2.isQuit()) {
          if (!app.isMenuDrivenMode()) {
            Message msg = INFO_DSCFG_CONFIRM_CREATE_FAIL.get(d
                .getUserFriendlyName());
            Message msg = INFO_DSCFG_CONFIRM_CREATE_FAIL.get(ufn);
            app.printVerboseMessage(msg);
          }
          return MenuResult.quit();
@@ -674,42 +673,64 @@
        }
      }
      // Add the managed object.
      try {
        // Create the managed object.
      child.commit();
      // Output success message.
      Message msg = INFO_DSCFG_CONFIRM_CREATE_SUCCESS.get(d
          .getUserFriendlyName());
        Message msg = INFO_DSCFG_CONFIRM_CREATE_SUCCESS.get(ufn);
      app.printVerboseMessage(msg);
        return MenuResult.success(0);
    } catch (MissingMandatoryPropertiesException e) {
      throw ArgumentExceptionFactory.adaptMissingMandatoryPropertiesException(
          e, d);
    } catch (AuthorizationException e) {
      Message msg = ERR_DSCFG_ERROR_CREATE_AUTHZ.get(d.getUserFriendlyName());
      throw new ClientException(LDAPResultCode.INSUFFICIENT_ACCESS_RIGHTS, msg);
        Message msg = ERR_DSCFG_ERROR_CREATE_AUTHZ.get(ufn);
        throw new ClientException(LDAPResultCode.INSUFFICIENT_ACCESS_RIGHTS,
            msg);
    } catch (ManagedObjectAlreadyExistsException e) {
      Message msg = ERR_DSCFG_ERROR_CREATE_MOAEE.get(d.getUserFriendlyName());
        Message msg = ERR_DSCFG_ERROR_CREATE_MOAEE.get(ufn);
      throw new ClientException(LDAPResultCode.ENTRY_ALREADY_EXISTS, msg);
    } catch (ConcurrentModificationException e) {
      Message msg = ERR_DSCFG_ERROR_CREATE_CME.get(d.getUserFriendlyName());
        Message msg = ERR_DSCFG_ERROR_CREATE_CME.get(ufn);
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
    } catch (OperationRejectedException e) {
      Message msg;
      if (e.getMessages().size() == 1) {
        msg = ERR_DSCFG_ERROR_CREATE_ORE_SINGLE.get(d.getUserFriendlyName(), e
            .getMessagesAsSingleMessage());
          msg = ERR_DSCFG_ERROR_CREATE_ORE_SINGLE.get(ufn);
      } else {
        msg = ERR_DSCFG_ERROR_CREATE_ORE_PLURAL.get(d.getUserFriendlyName(), e
            .getMessagesAsSingleMessage());
      }
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
    } catch (CommunicationException e) {
      Message msg = ERR_DSCFG_ERROR_CREATE_CE.get(d.getUserFriendlyName(), e
          .getMessage());
      throw new ClientException(LDAPResultCode.CLIENT_SIDE_SERVER_DOWN, msg);
          msg = ERR_DSCFG_ERROR_CREATE_ORE_PLURAL.get(ufn);
    }
    return MenuResult.success(0);
        if (app.isInteractive()) {
          // If interactive, give the user the chance to fix the problems.
          app.println();
          app.println(msg);
          app.println();
          TableBuilder builder = new TableBuilder();
          for (Message reason : e.getMessages()) {
            builder.startRow();
            builder.appendCell("*");
            builder.appendCell(reason);
          }
          TextTablePrinter printer = new TextTablePrinter(app.getErrorStream());
          printer.setDisplayHeadings(false);
          printer.setColumnWidth(1, 0);
          printer.setIndentWidth(4);
          builder.print(printer);
          app.println();
          if (!app.confirmAction(INFO_DSCFG_PROMPT_EDIT_AGAIN.get(ufn), true)) {
            return MenuResult.cancel();
          }
        } else {
          throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION,
              msg, e);
        }
      } catch (CommunicationException e) {
        Message msg = ERR_DSCFG_ERROR_CREATE_CE.get(ufn, e.getMessage());
        throw new ClientException(LDAPResultCode.CLIENT_SIDE_SERVER_DOWN, msg);
      }
    }
  }
opends/src/server/org/opends/server/tools/dsconfig/DSConfig.java
@@ -54,6 +54,7 @@
import org.opends.server.admin.RelationDefinition;
import org.opends.server.admin.Tag;
import org.opends.server.admin.client.ManagedObjectDecodingException;
import org.opends.server.admin.client.OperationRejectedException;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.tools.ClientException;
import org.opends.server.types.DebugLogLevel;
@@ -849,6 +850,24 @@
        TextTablePrinter printer = new TextTablePrinter(getErrorStream());
        printer.setDisplayHeadings(false);
        printer.setColumnWidth(1, 0);
        printer.setIndentWidth(4);
        builder.print(printer);
        println();
      } else if (cause instanceof OperationRejectedException) {
        OperationRejectedException ore = (OperationRejectedException) cause;
        println();
        TableBuilder builder = new TableBuilder();
        for (Message reason : ore.getMessages()) {
          builder.startRow();
          builder.appendCell("*");
          builder.appendCell(reason);
        }
        TextTablePrinter printer = new TextTablePrinter(getErrorStream());
        printer.setDisplayHeadings(false);
        printer.setColumnWidth(1, 0);
        printer.setIndentWidth(4);
        builder.print(printer);
        println();
      }
opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java
@@ -56,6 +56,8 @@
import org.opends.server.util.cli.CLIException;
import org.opends.server.util.cli.ConsoleApplication;
import org.opends.server.util.cli.MenuResult;
import org.opends.server.util.table.TableBuilder;
import org.opends.server.util.table.TextTablePrinter;
@@ -204,33 +206,31 @@
    // Delete the child managed object.
    ManagementContext context = factory.getManagementContext(app);
    MenuResult<ManagedObject<?>> result;
    Message ufn = relation.getUserFriendlyName();
    try {
      result = getManagedObject(app, context, path, names);
    } catch (AuthorizationException e) {
      Message msg = ERR_DSCFG_ERROR_DELETE_AUTHZ.get(relation
          .getUserFriendlyName());
      Message msg = ERR_DSCFG_ERROR_DELETE_AUTHZ.get(ufn);
      throw new ClientException(LDAPResultCode.INSUFFICIENT_ACCESS_RIGHTS, msg);
    } catch (DefinitionDecodingException e) {
      Message ufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_DDE.get(ufn, ufn, ufn);
      Message pufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_DDE.get(pufn, pufn, pufn);
      throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
    } catch (ManagedObjectDecodingException e) {
      Message ufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_MODE.get(ufn);
      Message pufn = path.getManagedObjectDefinition().getUserFriendlyName();
      Message msg = ERR_DSCFG_ERROR_GET_PARENT_MODE.get(pufn);
      throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg, e);
    } catch (CommunicationException e) {
      Message msg = ERR_DSCFG_ERROR_DELETE_CE.get(relation
          .getUserFriendlyName(), e.getMessage());
      Message msg = ERR_DSCFG_ERROR_DELETE_CE.get(ufn, e.getMessage());
      throw new ClientException(LDAPResultCode.CLIENT_SIDE_SERVER_DOWN, msg);
    } catch (ConcurrentModificationException e) {
      Message msg = ERR_DSCFG_ERROR_DELETE_CME.get(relation
          .getUserFriendlyName());
      Message msg = ERR_DSCFG_ERROR_DELETE_CME.get(ufn);
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
    } catch (ManagedObjectNotFoundException e) {
      // Ignore the error if the deletion is being forced.
      if (!forceArgument.isPresent()) {
        Message ufn = path.getManagedObjectDefinition().getUserFriendlyName();
        Message msg = ERR_DSCFG_ERROR_GET_PARENT_MONFE.get(ufn);
        Message pufn = path.getManagedObjectDefinition().getUserFriendlyName();
        Message msg = ERR_DSCFG_ERROR_GET_PARENT_MONFE.get(pufn);
        throw new ClientException(LDAPResultCode.NO_SUCH_OBJECT, msg);
      } else {
        return MenuResult.success(0);
@@ -240,8 +240,7 @@
    if (result.isQuit()) {
      if (!app.isMenuDrivenMode()) {
        // User chose to cancel deletion.
        Message msg = INFO_DSCFG_CONFIRM_DELETE_FAIL.get(relation
            .getUserFriendlyName());
        Message msg = INFO_DSCFG_CONFIRM_DELETE_FAIL.get(ufn);
        app.printVerboseMessage(msg);
      }
      return MenuResult.quit();
@@ -264,8 +263,7 @@
          if (sresult.isQuit()) {
            if (!app.isMenuDrivenMode()) {
              // User chose to cancel deletion.
              Message msg = INFO_DSCFG_CONFIRM_DELETE_FAIL.get(relation
                  .getUserFriendlyName());
              Message msg = INFO_DSCFG_CONFIRM_DELETE_FAIL.get(ufn);
              app.printVerboseMessage(msg);
            }
            return MenuResult.quit();
@@ -293,39 +291,53 @@
        }
      }
    } catch (AuthorizationException e) {
      Message msg = ERR_DSCFG_ERROR_DELETE_AUTHZ.get(relation
          .getUserFriendlyName());
      Message msg = ERR_DSCFG_ERROR_DELETE_AUTHZ.get(ufn);
      throw new ClientException(LDAPResultCode.INSUFFICIENT_ACCESS_RIGHTS, msg);
    } catch (OperationRejectedException e) {
      Message msg;
      if (e.getMessages().size() == 1) {
        msg = ERR_DSCFG_ERROR_DELETE_ORE_SINGLE.get(relation
            .getUserFriendlyName(), e.getMessagesAsSingleMessage());
        msg = ERR_DSCFG_ERROR_DELETE_ORE_SINGLE.get(ufn);
      } else {
        msg = ERR_DSCFG_ERROR_DELETE_ORE_PLURAL.get(relation
            .getUserFriendlyName(), e.getMessagesAsSingleMessage());
        msg = ERR_DSCFG_ERROR_DELETE_ORE_PLURAL.get(ufn);
      }
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
      if (app.isInteractive()) {
        // If interactive, let the user go back to the main menu.
        app.println();
        app.println(msg);
        app.println();
        TableBuilder builder = new TableBuilder();
        for (Message reason : e.getMessages()) {
          builder.startRow();
          builder.appendCell("*");
          builder.appendCell(reason);
        }
        TextTablePrinter printer = new TextTablePrinter(app.getErrorStream());
        printer.setDisplayHeadings(false);
        printer.setColumnWidth(1, 0);
        printer.setIndentWidth(4);
        builder.print(printer);
        return MenuResult.cancel();
      } else {
        throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION,
            msg, e);
      }
    } catch (ManagedObjectNotFoundException e) {
      // Ignore the error if the deletion is being forced.
      if (!forceArgument.isPresent()) {
        Message msg = ERR_DSCFG_ERROR_DELETE_MONFE.get(relation
            .getUserFriendlyName());
        Message msg = ERR_DSCFG_ERROR_DELETE_MONFE.get(ufn);
        throw new ClientException(LDAPResultCode.NO_SUCH_OBJECT, msg);
      }
    } catch (ConcurrentModificationException e) {
      Message msg = ERR_DSCFG_ERROR_DELETE_CME.get(relation
          .getUserFriendlyName());
      Message msg = ERR_DSCFG_ERROR_DELETE_CME.get(ufn);
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
    } catch (CommunicationException e) {
      Message msg = ERR_DSCFG_ERROR_DELETE_CE.get(relation
          .getUserFriendlyName(), e.getMessage());
      Message msg = ERR_DSCFG_ERROR_DELETE_CE.get(ufn, e.getMessage());
      throw new ClientException(LDAPResultCode.CLIENT_SIDE_SERVER_DOWN, msg);
    }
    // Output success message.
    Message msg = INFO_DSCFG_CONFIRM_DELETE_SUCCESS.get(relation
        .getUserFriendlyName());
    Message msg = INFO_DSCFG_CONFIRM_DELETE_SUCCESS.get(ufn);
    app.printVerboseMessage(msg);
    return MenuResult.success(0);
opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
@@ -69,6 +69,8 @@
import org.opends.server.util.cli.CLIException;
import org.opends.server.util.cli.ConsoleApplication;
import org.opends.server.util.cli.MenuResult;
import org.opends.server.util.table.TableBuilder;
import org.opends.server.util.table.TextTablePrinter;
@@ -498,7 +500,7 @@
      }
    }
    // Commit the changes.
    // Apply the command line changes.
    for (PropertyDefinition<?> pd : changes.keySet()) {
      try {
        child.setPropertyValues(pd, changes.get(pd));
@@ -507,6 +509,7 @@
      }
    }
    while (true) {
    // Interactively set properties if applicable.
    if (app.isInteractive()) {
      SortedSet<PropertyDefinition<?>> properties =
@@ -539,30 +542,56 @@
    }
    try {
        // Commit the changes.
      child.commit();
      // Output success message.
      Message msg = INFO_DSCFG_CONFIRM_MODIFY_SUCCESS.get(ufn);
      app.printVerboseMessage(msg);
        return MenuResult.success(0);
    } catch (MissingMandatoryPropertiesException e) {
      throw ArgumentExceptionFactory.adaptMissingMandatoryPropertiesException(
          e, d);
        throw ArgumentExceptionFactory
            .adaptMissingMandatoryPropertiesException(e, d);
    } catch (AuthorizationException e) {
      Message msg = ERR_DSCFG_ERROR_MODIFY_AUTHZ.get(ufn);
      throw new ClientException(LDAPResultCode.INSUFFICIENT_ACCESS_RIGHTS, msg);
        throw new ClientException(LDAPResultCode.INSUFFICIENT_ACCESS_RIGHTS,
            msg);
    } catch (ConcurrentModificationException e) {
      Message msg = ERR_DSCFG_ERROR_MODIFY_CME.get(ufn);
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
    } catch (OperationRejectedException e) {
      Message msg;
      if (e.getMessages().size() == 1) {
        msg = ERR_DSCFG_ERROR_MODIFY_ORE_SINGLE.get(ufn, e
            .getMessagesAsSingleMessage());
          msg = ERR_DSCFG_ERROR_MODIFY_ORE_SINGLE.get(ufn);
      } else {
        msg = ERR_DSCFG_ERROR_MODIFY_ORE_PLURAL.get(ufn, e
            .getMessagesAsSingleMessage());
          msg = ERR_DSCFG_ERROR_MODIFY_ORE_PLURAL.get(ufn);
      }
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
        if (app.isInteractive()) {
          // If interactive, give the user the chance to fix the problems.
          app.println();
          app.println(msg);
          app.println();
          TableBuilder builder = new TableBuilder();
          for (Message reason : e.getMessages()) {
            builder.startRow();
            builder.appendCell("*");
            builder.appendCell(reason);
          }
          TextTablePrinter printer = new TextTablePrinter(app.getErrorStream());
          printer.setDisplayHeadings(false);
          printer.setColumnWidth(1, 0);
          printer.setIndentWidth(4);
          builder.print(printer);
          app.println();
          if (!app.confirmAction(INFO_DSCFG_PROMPT_EDIT_AGAIN.get(ufn), true)) {
            return MenuResult.cancel();
          }
        } else {
          throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION,
              msg, e);
        }
    } catch (CommunicationException e) {
      Message msg = ERR_DSCFG_ERROR_MODIFY_CE.get(ufn, e.getMessage());
      throw new ClientException(LDAPResultCode.OPERATIONS_ERROR, msg);
@@ -570,8 +599,7 @@
      // Should never happen.
      throw new IllegalStateException(e);
    }
    return MenuResult.success(0);
    }
  }