copy from opends/src/server/org/opends/server/tools/dsconfig/HelpCallback.java
copy to opends/src/server/org/opends/server/util/cli/MenuCallback.java
| File was copied from opends/src/server/org/opends/server/tools/dsconfig/HelpCallback.java |
| | |
| | | * |
| | | * Portions Copyright 2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools.dsconfig; |
| | | package org.opends.server.util.cli; |
| | | |
| | | |
| | | |
| | | /** |
| | | * An interface for displaying help interactively. |
| | | * A menu call-back which should be associated with each menu option. |
| | | * When an option is selected the call-back is invoked. |
| | | * |
| | | * @param <T> |
| | | * The type of success result value(s) returned by the |
| | | * call-back. Use <code>Void</code> if the call-backs do |
| | | * not return any values. |
| | | */ |
| | | interface HelpCallback { |
| | | public interface MenuCallback<T> { |
| | | |
| | | /** |
| | | * Displays help to the provided application console. |
| | | * Invoke the menu call-back. |
| | | * |
| | | * @param app |
| | | * The console application. |
| | | * The application console. |
| | | * @return Returns the result of invoking the menu call-back. |
| | | * @throws CLIException |
| | | * If the menu call-back fails for some reason. |
| | | */ |
| | | void display(ConsoleApplication app); |
| | | MenuResult<T> invoke(ConsoleApplication app) throws CLIException; |
| | | } |