Package org.opends.guitools.uninstaller
Class UninstallerArgumentParser
- java.lang.Object
-
- com.forgerock.opendj.cli.ArgumentParser
-
- com.forgerock.opendj.cli.SubCommandArgumentParser
-
- org.opends.server.admin.client.cli.SecureConnectionCliParser
-
- org.opends.guitools.uninstaller.UninstallerArgumentParser
-
- All Implemented Interfaces:
ToolRefDocContainer
public class UninstallerArgumentParser extends SecureConnectionCliParser
Class used to parse and populate the arguments of the Uninstaller.
-
-
Field Summary
-
Fields inherited from class org.opends.server.admin.client.cli.SecureConnectionCliParser
noPropertiesFileArg, propertiesFileArg, secureArgsList, verboseArg
-
Fields inherited from class com.forgerock.opendj.cli.ArgumentParser
argumentGroups, DEFAULT_OPENDJ_CONFIG_DIR, DEFAULT_OPENDJ_PROPERTIES_FILE_EXTENSION, DEFAULT_OPENDJ_PROPERTIES_FILE_NAME, ioArgGroup, PROPERTY_SCRIPT_NAME, PROPERTY_SCRIPT_NAME_LEGACY
-
-
Constructor Summary
Constructors Constructor Description UninstallerArgumentParser(String mainClassName, org.forgerock.i18n.LocalizableMessage toolDescription, boolean longArgumentsCaseSensitive)Creates a new instance of this argument parser with no arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDefaultAdministratorUID()Returns the default Administrator UID value.StringgetDefaultReferencedHostName()Returns the default value for the Host name to update remote references as provided in the command-line.StringgetReferencedHostName()Returns the Host name to update remote references as provided in the command-line.voidinitializeGlobalArguments(OutputStream outStream)Initialize Global option.booleanisCli()Returns whether the command was launched in CLI mode or not.booleanisForceOnError()Tells whether the user specified to force on non critical error in the non interactive mode.booleanisInteractive()Tells whether the user specified to have an interactive uninstall or not.booleanisQuiet()Tells whether the user specified to have a quiet uninstall or not.booleanisVerbose()Tells whether the user specified to have a verbose uninstall or not.booleanremoveAll()Tells whether the user specified to remove all files.booleanremoveBackupFiles()Tells whether the user specified to remove backup files.booleanremoveConfigurationFiles()Tells whether the user specified to remove configuration files.booleanremoveDatabases()Tells whether the user specified to remove database files.booleanremoveLDIFFiles()Tells whether the user specified to remove LDIF files.booleanremoveLogFiles()Tells whether the user specified to remove log files.booleanremoveServerLibraries()Tells whether the user specified to remove library files.intvalidateGlobalOptions(org.forgerock.i18n.LocalizableMessageBuilder buf)Indication if provided global options are validate.-
Methods inherited from class org.opends.server.admin.client.cli.SecureConnectionCliParser
createGlobalArguments, getAdministratorUID, getBindDN, getBindPassword, getConnectTimeout, getHostName, getPort, getTrustManager, initializeGlobalArguments, initializeGlobalArguments, validateGlobalOptions
-
Methods inherited from class com.forgerock.opendj.cli.SubCommandArgumentParser
addGlobalArgument, addGlobalArgument, addLdapConnectionArgument, getGlobalArgumentForLongID, getGlobalArgumentForShortID, getSubCommand, getSubCommand, getSubCommandUsage, getUsage, hasGlobalArgument, hasSubCommand, parseArguments, replaceArgument, setUsageArgument, setUsageGroupArgument, setUsageHandler
-
Methods inherited from class com.forgerock.opendj.cli.ArgumentParser
addArgument, addArgument, addDefaultArgument, displayMessageAndUsageReference, getArgumentForLongID, getArgumentList, getBindPassword, getDocSubcommandsDescriptionSupplement, getDocToolDescriptionSupplement, getHelpUsageReference, getOptionsRefSect1, getShortToolDescription, getTrailingArguments, isUsageArgumentPresent, isVersionArgumentPresent, parseArguments, parseArguments, setDocSubcommandsDescriptionSupplement, setDocToolDescriptionSupplement, setFilePropertiesArgument, setNoPropertiesFileArgument, setShortToolDescription, setUsageArgument, setUsageOrVersionDisplayed, setVersionHandler, usageOrVersionDisplayed
-
-
-
-
Constructor Detail
-
UninstallerArgumentParser
public UninstallerArgumentParser(String mainClassName, org.forgerock.i18n.LocalizableMessage toolDescription, boolean longArgumentsCaseSensitive)
Creates a new instance of this argument parser with no arguments.- Parameters:
mainClassName- The fully-qualified name of the Java class that should be invoked to launch the program with which this argument parser is associated.toolDescription- A human-readable description for the tool, which will be included when displaying usage information.longArgumentsCaseSensitive- Indicates whether subcommand and long argument names should be treated in a case-sensitive manner.
-
-
Method Detail
-
initializeGlobalArguments
public void initializeGlobalArguments(OutputStream outStream) throws ArgumentException
Initialize Global option.- Parameters:
outStream- The output stream used for the usage.- Throws:
ArgumentException- If there is a problem with any of the parameters used to create this argument.
-
isInteractive
public boolean isInteractive()
Tells whether the user specified to have an interactive uninstall or not. This method must be called after calling parseArguments.- Returns:
trueif the user specified to have an interactive uninstall andfalseotherwise.
-
isForceOnError
public boolean isForceOnError()
Tells whether the user specified to force on non critical error in the non interactive mode.- Returns:
trueif the user specified to force the uninstall in non critical error andfalseotherwise.
-
isQuiet
public boolean isQuiet()
Tells whether the user specified to have a quiet uninstall or not. This method must be called after calling parseArguments.- Returns:
trueif the user specified to have a quiet uninstall andfalseotherwise.
-
isVerbose
public boolean isVerbose()
Tells whether the user specified to have a verbose uninstall or not. This method must be called after calling parseArguments.- Overrides:
isVerbosein classSecureConnectionCliParser- Returns:
trueif the user specified to have a verbose uninstall andfalseotherwise.
-
removeAll
public boolean removeAll()
Tells whether the user specified to remove all files. This method must be called after calling parseArguments.- Returns:
trueif the user specified to remove all files andfalseotherwise.
-
removeServerLibraries
public boolean removeServerLibraries()
Tells whether the user specified to remove library files. This method must be called after calling parseArguments.- Returns:
trueif the user specified to remove library files andfalseotherwise.
-
removeDatabases
public boolean removeDatabases()
Tells whether the user specified to remove database files. This method must be called after calling parseArguments.- Returns:
trueif the user specified to remove database files andfalseotherwise.
-
removeConfigurationFiles
public boolean removeConfigurationFiles()
Tells whether the user specified to remove configuration files. This method must be called after calling parseArguments.- Returns:
trueif the user specified to remove configuration files andfalseotherwise.
-
removeBackupFiles
public boolean removeBackupFiles()
Tells whether the user specified to remove backup files. This method must be called after calling parseArguments.- Returns:
trueif the user specified to remove backup files andfalseotherwise.
-
removeLDIFFiles
public boolean removeLDIFFiles()
Tells whether the user specified to remove LDIF files. This method must be called after calling parseArguments.- Returns:
trueif the user specified to remove LDIF files andfalseotherwise.
-
removeLogFiles
public boolean removeLogFiles()
Tells whether the user specified to remove log files. This method must be called after calling parseArguments.- Returns:
trueif the user specified to remove log files andfalseotherwise.
-
getDefaultAdministratorUID
public String getDefaultAdministratorUID()
Returns the default Administrator UID value.- Returns:
- the default Administrator UID value.
-
getReferencedHostName
public String getReferencedHostName()
Returns the Host name to update remote references as provided in the command-line.- Returns:
- the Host name to update remote references as provided in the command-line.
-
getDefaultReferencedHostName
public String getDefaultReferencedHostName()
Returns the default value for the Host name to update remote references as provided in the command-line.- Returns:
- the default value for the Host name to update remote references as provided in the command-line.
-
validateGlobalOptions
public int validateGlobalOptions(org.forgerock.i18n.LocalizableMessageBuilder buf)
Indication if provided global options are validate.- Overrides:
validateGlobalOptionsin classSecureConnectionCliParser- Parameters:
buf- the LocalizableMessageBuilder to write the error messages.- Returns:
- return code.
-
isCli
public boolean isCli()
Returns whether the command was launched in CLI mode or not.- Returns:
trueif the command was launched to use CLI mode andfalseotherwise.
-
-