Package org.opends.guitools.uninstaller
Class UninstallCliHelper
- java.lang.Object
-
- com.forgerock.opendj.cli.ConsoleApplication
-
- org.opends.guitools.uninstaller.UninstallCliHelper
-
public class UninstallCliHelper extends ConsoleApplication
The class used to provide some CLI interface in the uninstall. This class basically is in charge of parsing the data provided by the user in the command line and displaying messages asking the user for information. Once the user has provided all the required information it calls Uninstaller and launches it.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.forgerock.opendj.cli.ConsoleApplication
ConsoleApplication.Style
-
-
Constructor Summary
Constructors Constructor Description UninstallCliHelper()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UninstallUserDatacreateUserData(UninstallerArgumentParser args)Creates a UserData based in the arguments provided.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.-
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
-
createUserData
public UninstallUserData createUserData(UninstallerArgumentParser args) throws UserDataException, ClientException
Creates a UserData based in the arguments provided. It asks user for additional information if what is provided in the arguments is not enough.- Parameters:
args- the ArgumentParser with the allowed arguments of the command line. The code assumes that the arguments have already been parsed.- Returns:
- the UserData object with what the user wants to uninstall and null if the user cancels the uninstallation.
- Throws:
UserDataException- if there is an error with the data in the arguments.ClientException- If there is an error processing data in non-interactive mode and an error must be thrown (not in force on error mode).
-
isAdvancedMode
public boolean isAdvancedMode()
Description copied from class:ConsoleApplicationIndicates whether the user has requested advanced mode.- Overrides:
isAdvancedModein classConsoleApplication- Returns:
- Returns
trueif the user has requested advanced mode.
-
isInteractive
public boolean isInteractive()
Description copied from class:ConsoleApplicationIndicates 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()
Description copied from class:ConsoleApplicationIndicates 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()
Description copied from class:ConsoleApplicationIndicates 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()
Description copied from class:ConsoleApplicationIndicates 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()
Description copied from class:ConsoleApplicationIndicates whether the user has requested verbose output. The default implementation returnsfalse.- Overrides:
isVerbosein classConsoleApplication- Returns:
trueif the user has requested verbose output.
-
-