Class UninstallerArgumentParser

    • 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:
        true if the user specified to have an interactive uninstall and false otherwise.
      • isForceOnError

        public boolean isForceOnError()
        Tells whether the user specified to force on non critical error in the non interactive mode.
        Returns:
        true if the user specified to force the uninstall in non critical error and false otherwise.
      • 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:
        true if the user specified to have a quiet uninstall and false otherwise.
      • 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:
        isVerbose in class SecureConnectionCliParser
        Returns:
        true if the user specified to have a verbose uninstall and false otherwise.
      • removeAll

        public boolean removeAll()
        Tells whether the user specified to remove all files. This method must be called after calling parseArguments.
        Returns:
        true if the user specified to remove all files and false otherwise.
      • removeServerLibraries

        public boolean removeServerLibraries()
        Tells whether the user specified to remove library files. This method must be called after calling parseArguments.
        Returns:
        true if the user specified to remove library files and false otherwise.
      • removeDatabases

        public boolean removeDatabases()
        Tells whether the user specified to remove database files. This method must be called after calling parseArguments.
        Returns:
        true if the user specified to remove database files and false otherwise.
      • removeConfigurationFiles

        public boolean removeConfigurationFiles()
        Tells whether the user specified to remove configuration files. This method must be called after calling parseArguments.
        Returns:
        true if the user specified to remove configuration files and false otherwise.
      • removeBackupFiles

        public boolean removeBackupFiles()
        Tells whether the user specified to remove backup files. This method must be called after calling parseArguments.
        Returns:
        true if the user specified to remove backup files and false otherwise.
      • removeLDIFFiles

        public boolean removeLDIFFiles()
        Tells whether the user specified to remove LDIF files. This method must be called after calling parseArguments.
        Returns:
        true if the user specified to remove LDIF files and false otherwise.
      • removeLogFiles

        public boolean removeLogFiles()
        Tells whether the user specified to remove log files. This method must be called after calling parseArguments.
        Returns:
        true if the user specified to remove log files and false otherwise.
      • 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:
        validateGlobalOptions in class SecureConnectionCliParser
        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:
        true if the command was launched to use CLI mode and false otherwise.