org.opends.server.tools
Class InstallDS

java.lang.Object
  extended by org.opends.server.util.cli.ConsoleApplication
      extended by org.opends.server.tools.InstallDS

public class InstallDS
extends ConsoleApplication

This class provides a very simple mechanism for installing the OpenDS Directory Service. It performs the following tasks:


Field Summary
static java.lang.String LOG_FILE_PREFIX
          Prefix for log files.
static java.lang.String LOG_FILE_SUFFIX
          Suffix for log files.
 
Fields inherited from class org.opends.server.util.cli.ConsoleApplication
CONFIRMATION_MAX_TRIES
 
Constructor Summary
InstallDS(java.io.PrintStream out, java.io.PrintStream err, java.io.InputStream in)
          Constructor for the InstallDS object.
 
Method Summary
 int execute(java.lang.String[] args, boolean initializeServer)
          Parses the provided command-line arguments and uses that information to run the setup CLI.
 boolean isAdvancedMode()
          Indicates whether or not the user has requested advanced mode.
 boolean isInteractive()
          Indicates whether or not the user has requested interactive behavior.
 boolean isMenuDrivenMode()
          Indicates whether or not this console application is running in its menu-driven mode.
 boolean isQuiet()
          Indicates whether or not the user has requested quiet output.
 boolean isScriptFriendly()
          Indicates whether or not the user has requested script-friendly output.
 boolean isVerbose()
          Indicates whether or not the user has requested verbose output.
static void main(java.lang.String[] args)
          The main method for the InstallDS CLI tool.
static int mainCLI(java.lang.String[] args)
          Parses the provided command-line arguments and uses that information to run the setup tool.
static int mainCLI(java.lang.String[] args, boolean initializeServer, java.io.OutputStream outStream, java.io.OutputStream errStream, java.io.InputStream inStream)
          Parses the provided command-line arguments and uses that information to run the setup tool.
 
Methods inherited from class org.opends.server.util.cli.ConsoleApplication
askConfirmation, confirmAction, createAdministrativeContext, createInitialLdapContextInteracting, getErrorStream, getInputStream, getOutputStream, pressReturnToContinue, print, println, println, println, printlnProgress, printProgress, printVerboseMessage, readInput, readInput, readLineOfInput, readPassword, readPassword, readPort, readValidatedInput, readValidatedInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_FILE_PREFIX

public static final java.lang.String LOG_FILE_PREFIX
Prefix for log files.

See Also:
Constant Field Values

LOG_FILE_SUFFIX

public static final java.lang.String LOG_FILE_SUFFIX
Suffix for log files.

See Also:
Constant Field Values
Constructor Detail

InstallDS

public InstallDS(java.io.PrintStream out,
                 java.io.PrintStream err,
                 java.io.InputStream in)
Constructor for the InstallDS object.

Parameters:
out - the print stream to use for standard output.
err - the print stream to use for standard error.
in - the input stream to use for standard input.
Method Detail

main

public static void main(java.lang.String[] args)
The main method for the InstallDS CLI tool.

Parameters:
args - the command-line arguments provided to this program.

mainCLI

public static int mainCLI(java.lang.String[] args)
Parses the provided command-line arguments and uses that information to run the setup tool.

Parameters:
args - the command-line arguments provided to this program.
Returns:
The error code.

mainCLI

public static int mainCLI(java.lang.String[] args,
                          boolean initializeServer,
                          java.io.OutputStream outStream,
                          java.io.OutputStream errStream,
                          java.io.InputStream inStream)
Parses the provided command-line arguments and uses that information to run the setup tool.

Parameters:
args - The command-line arguments provided to this program.
initializeServer - Indicates whether to initialize the server.
outStream - The output stream to use for standard output, or null if standard output is not needed.
errStream - The output stream to use for standard error, or null if standard error is not needed.
inStream - The input stream to use for standard input.
Returns:
The error code.

execute

public int execute(java.lang.String[] args,
                   boolean initializeServer)
Parses the provided command-line arguments and uses that information to run the setup CLI.

Parameters:
args - the command-line arguments provided to this program.
initializeServer - Indicates whether to initialize the server.
Returns:
the return code (SUCCESSFUL, USER_DATA_ERROR or BUG).

isQuiet

public boolean isQuiet()
Indicates whether or not the user has requested quiet output.

Specified by:
isQuiet in class ConsoleApplication
Returns:
Returns true if the user has requested quiet output.

isInteractive

public boolean isInteractive()
Indicates whether or not the user has requested interactive behavior.

Specified by:
isInteractive in class ConsoleApplication
Returns:
Returns true if the user has requested interactive behavior.

isMenuDrivenMode

public boolean isMenuDrivenMode()
Indicates whether or not 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 or not sub-menus should display a cancel option as well as a quit option.

Specified by:
isMenuDrivenMode in class ConsoleApplication
Returns:
Returns true if this console application is running in its menu-driven mode.

isScriptFriendly

public boolean isScriptFriendly()
Indicates whether or not the user has requested script-friendly output.

Specified by:
isScriptFriendly in class ConsoleApplication
Returns:
Returns true if the user has requested script-friendly output.

isAdvancedMode

public boolean isAdvancedMode()
Indicates whether or not the user has requested advanced mode.

Specified by:
isAdvancedMode in class ConsoleApplication
Returns:
Returns true if the user has requested advanced mode.

isVerbose

public boolean isVerbose()
Indicates whether or not the user has requested verbose output.

Specified by:
isVerbose in class ConsoleApplication
Returns:
Returns true if the user has requested verbose output.