Class UpgradeCli

java.lang.Object
com.forgerock.opendj.cli.Tool
com.forgerock.opendj.cli.InteractiveTool
org.opends.server.tools.upgrade.UpgradeCli
All Implemented Interfaces:
Closeable, AutoCloseable, CallbackHandler

public final class UpgradeCli extends com.forgerock.opendj.cli.InteractiveTool 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.Tool

    com.forgerock.opendj.cli.Tool.Style
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The value for the long option force upgrade.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(Callback[] callbacks)
     
    boolean
    Indicates whether the user has requested quiet output.
    boolean
    Indicates whether the user has requested verbose output.
    static void
    main(String[] args)
    Provides the command-line arguments to the main tool for processing.
    static com.forgerock.opendj.cli.ReturnCode
    main(String[] args, PrintStream outStream, PrintStream errStream)
    Provides the command-line arguments to the main tool for processing and returns the exit code as an integer.
    com.forgerock.opendj.cli.ReturnCode
    run(String... args)
    Run this Tool tool with the provided arguments.

    Methods inherited from class com.forgerock.opendj.cli.InteractiveTool

    getErrStream, isFullyInteractive

    Methods inherited from class com.forgerock.opendj.cli.Tool

    askPort, close, confirmAction, enableConsoleLoggingIfVerbose, errPrintln, errPrintln, errPrintln, errPrintlnSurroundedByBlankLines, errPrintVerboseMessage, flush, flushLogStream, getErrorStream, getInputStream, getOutputStream, isScriptFriendly, logVerboseMessage, mayPrompt, parseArguments, pressReturnToContinue, print, println, println, println, printlnNoWrap, printlnSurroundedByBlankLines, printNoWrap, readInput, readInput, readInputAllowEmpty, readLineOfInput, readPassword, readValidatedInput, readValidatedInputOrThrow, report

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • OPTION_LONG_FORCE_UPGRADE

      public static final String OPTION_LONG_FORCE_UPGRADE
      The value for the long option force upgrade.
      See Also:
  • Method Details

    • main

      public static void main(String[] args)
      Provides the command-line arguments to the main tool for processing.
      Parameters:
      args - The set of command-line arguments provided to this program.
    • main

      public static com.forgerock.opendj.cli.ReturnCode main(String[] args, PrintStream outStream, PrintStream errStream)
      Provides the command-line arguments to the main tool for processing and returns the exit code as an integer.
      Parameters:
      args - The set of command-line arguments provided to this program.
      outStream - The print stream for standard output.
      errStream - The print stream for standard error.
      Returns:
      code returned by the upgrade tool. 0 to indicate that the program completed successfully, or non-zero to indicate that an error occurred.
    • isQuiet

      public boolean isQuiet()
      Description copied from class: com.forgerock.opendj.cli.Tool
      Indicates whether the user has requested quiet output. The default implementation returns false.
      Overrides:
      isQuiet in class com.forgerock.opendj.cli.Tool
      Returns:
      true if the user has requested quiet output.
    • isVerbose

      public boolean isVerbose()
      Description copied from class: com.forgerock.opendj.cli.Tool
      Indicates whether the user has requested verbose output. The default implementation returns false.
      Overrides:
      isVerbose in class com.forgerock.opendj.cli.Tool
      Returns:
      true if the user has requested verbose output.
    • run

      public com.forgerock.opendj.cli.ReturnCode run(String... args) throws com.forgerock.opendj.cli.ClientException
      Description copied from class: com.forgerock.opendj.cli.Tool
      Run this Tool tool with the provided arguments. Output and errors will be written on the provided streams.

      This method can be used to run the tool programmatically.

      Overrides:
      run in class com.forgerock.opendj.cli.Tool
      Parameters:
      args - Arguments set to pass to the tool.
      Returns:
      0 if all processing completed successfully, or non-zero if an error occurred.
      Throws:
      com.forgerock.opendj.cli.ClientException - If an error occurs while running the tool.
    • handle

      public void handle(Callback[] callbacks) throws UnsupportedCallbackException
      Specified by:
      handle in interface CallbackHandler
      Throws:
      UnsupportedCallbackException