Package org.opends.server.tools.upgrade
Class UpgradeCli
- java.lang.Object
-
- com.forgerock.opendj.cli.ConsoleApplication
-
- org.opends.server.tools.upgrade.UpgradeCli
-
- All Implemented Interfaces:
CallbackHandler
public final class UpgradeCli extends ConsoleApplication implements CallbackHandler
This class provides the CLI used for upgrading the OpenDJ product.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.forgerock.opendj.cli.ConsoleApplication
ConsoleApplication.Style
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(Callback[] callbacks)booleanisAdvancedMode()Indicates whether the user has requested advanced mode.booleanisInteractive()Indicates whether the user has requested interactive behavior.booleanisMenuDrivenMode()Indicates whether this console application is running in its menu-driven mode.booleanisQuiet()Indicates whether the user has requested quiet output.booleanisScriptFriendly()Indicates whether the user has requested script-friendly output.booleanisVerbose()Indicates whether the user has requested verbose output.static voidmain(String[] args)Provides the command-line arguments to the main application for processing.static intmain(String[] args, boolean initializeServer, OutputStream outStream, OutputStream errStream)Provides the command-line arguments to the main application for processing and returns the exit code as an integer.-
Methods inherited from class com.forgerock.opendj.cli.ConsoleApplication
askConfirmation, askPort, confirmAction, errPrint, errPrintln, errPrintln, errPrintln, errPrintVerboseMessage, getErrorStream, getErrStream, getInputStream, getOutputStream, pressReturnToContinue, print, println, println, println, println, printlnNoWrap, printProgressBar, printVerboseMessage, readInput, readInput, readLineOfInput, readPassword, readPassword, readPort, readValidatedInput, readValidatedInput
-
-
-
-
Method Detail
-
main
public static void main(String[] args)
Provides the command-line arguments to the main application for processing.- Parameters:
args- The set of command-line arguments provided to this program.
-
main
public static int main(String[] args, boolean initializeServer, OutputStream outStream, OutputStream errStream)
Provides the command-line arguments to the main application for processing and returns the exit code as an integer.- Parameters:
args- The set of command-line arguments provided to this program.initializeServer- Indicates whether to perform basic initialization (which should not be done if the tool is running in the same JVM as the server).outStream- The output stream for standard output.errStream- The output stream for standard error.- Returns:
- Zero to indicate that the program completed successfully, or non-zero to indicate that an error occurred.
-
isAdvancedMode
public boolean isAdvancedMode()
Indicates whether the user has requested advanced mode.- Overrides:
isAdvancedModein classConsoleApplication- Returns:
- Returns
trueif the user has requested advanced mode.
-
isInteractive
public boolean isInteractive()
Indicates whether the user has requested interactive behavior. The default implementation returnstrue.- Overrides:
isInteractivein classConsoleApplication- Returns:
trueif the user has requested interactive behavior.
-
isMenuDrivenMode
public boolean isMenuDrivenMode()
Indicates whether this console application is running in its menu-driven mode. This can be used to dictate whether output should go to the error stream or not. In addition, it may also dictate whether sub-menus should display a cancel option as well as a quit option.- Overrides:
isMenuDrivenModein classConsoleApplication- Returns:
- Returns
trueif this console application is running in its menu-driven mode.
-
isQuiet
public boolean isQuiet()
Indicates whether the user has requested quiet output. The default implementation returnsfalse.- Overrides:
isQuietin classConsoleApplication- Returns:
trueif the user has requested quiet output.
-
isScriptFriendly
public boolean isScriptFriendly()
Indicates whether the user has requested script-friendly output. The default implementation returnsfalse.- Overrides:
isScriptFriendlyin classConsoleApplication- Returns:
trueif the user has requested script-friendly output.
-
isVerbose
public boolean isVerbose()
Indicates whether the user has requested verbose output. The default implementation returnsfalse.- Overrides:
isVerbosein classConsoleApplication- Returns:
trueif the user has requested verbose output.
-
handle
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
- Specified by:
handlein interfaceCallbackHandler- Throws:
IOExceptionUnsupportedCallbackException
-
-