Class DsConfig
java.lang.Object
com.forgerock.opendj.cli.Tool
com.forgerock.opendj.cli.InteractiveTool
org.forgerock.opendj.config.dsconfig.DsConfig
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class DsConfig
extends com.forgerock.opendj.cli.InteractiveTool
This class provides a command-line tool which enables administrators to configure the Directory Server.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.forgerock.opendj.cli.Tool
com.forgerock.opendj.cli.Tool.Style
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
dsConfigEmbeddedOffline
(com.forgerock.opendj.cli.ArgumentsBuilder args, PrintStream outStream, PrintStream errStream) This method is used for running the dsconfig tool programmatically against an offline server.boolean
isQuiet()
Indicates whether the user has requested quiet output.boolean
Indicates whether the user has requested script-friendly output.boolean
Indicates whether the user has requested verbose output.static void
Provides the command-line arguments to the main tool for processing.static com.forgerock.opendj.cli.ReturnCode
main
(String[] args, InputStream inStream, PrintStream outStream, PrintStream errStream) Provides the command-line arguments to the main tool for processing and returns the exit code as an integer.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
Parses the provided command-line arguments and makes the appropriate changes to the Directory Server configuration.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, logVerboseMessage, mayPrompt, parseArguments, pressReturnToContinue, print, println, println, println, printlnNoWrap, printlnSurroundedByBlankLines, printNoWrap, readInput, readInput, readInputAllowEmpty, readLineOfInput, readPassword, readValidatedInput, readValidatedInputOrThrow, report
-
Method Details
-
main
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 output stream for standard output.errStream
- The output stream for standard error.- Returns:
- Zero to indicate that the program completed successfully, or non-zero to indicate that an error occurred.
-
main
public static com.forgerock.opendj.cli.ReturnCode main(String[] args, InputStream inStream, 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.inStream
- The input stream for standard input.outStream
- The output stream for standard output.errStream
- The output stream for standard error.- Returns:
- Zero to indicate that the program completed successfully, or non-zero to indicate that an error occurred.
-
dsConfigEmbeddedOffline
public static void dsConfigEmbeddedOffline(com.forgerock.opendj.cli.ArgumentsBuilder args, PrintStream outStream, PrintStream errStream) throws com.forgerock.opendj.cli.ClientException This method is used for running the dsconfig tool programmatically against an offline server.The --offline and --noPropertyFile arguments are automatically added to the tool arguments.
No modification will be performed to the running JVM JDK logging configuration.- Parameters:
args
- The set of command-line arguments provided to this programoutStream
- The output stream for standard outputerrStream
- The output stream for standard error- Throws:
com.forgerock.opendj.cli.ClientException
- If an error occurs during the tool execution or if the tool has returned a errorReturnCode
-
isQuiet
public boolean isQuiet()Description copied from class:com.forgerock.opendj.cli.Tool
Indicates whether the user has requested quiet output. The default implementation returnsfalse
.- Overrides:
isQuiet
in classcom.forgerock.opendj.cli.Tool
- Returns:
true
if the user has requested quiet output.
-
isScriptFriendly
public boolean isScriptFriendly()Description copied from class:com.forgerock.opendj.cli.Tool
Indicates whether the user has requested script-friendly output. The default implementation returnsfalse
.- Overrides:
isScriptFriendly
in classcom.forgerock.opendj.cli.Tool
- Returns:
true
if the user has requested script-friendly 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 returnsfalse
.- Overrides:
isVerbose
in classcom.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 Parses the provided command-line arguments and makes the appropriate changes to the Directory Server configuration.- Overrides:
run
in classcom.forgerock.opendj.cli.Tool
- Parameters:
args
- The command-line arguments provided to this program.- Returns:
- The exit code from the configuration processing. A nonzero value indicates that there was some kind of problem during the configuration processing.
- Throws:
com.forgerock.opendj.cli.ClientException
- If an error occurs during the tool execution
-