Package org.forgerock.opendj.setup.cli
Class SetupProfileCli
- java.lang.Object
-
- com.forgerock.opendj.cli.Tool
-
- org.forgerock.opendj.setup.cli.SetupProfileCli
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class SetupProfileCli extends com.forgerock.opendj.cli.Tool
setup-profile command line tool main class.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
Runs this tool with the provided the command-line arguments and terminates the running JVM with an int representing the code returned by the tool.static com.forgerock.opendj.cli.ReturnCode
main(String[] args, OutputStream outStream, OutputStream errStream)
Runs this tool with the provided the command-line arguments and returns an int representing the code returned by the tool.com.forgerock.opendj.cli.ReturnCode
run(String... args)
Run setup-profile tool with the provided arguments.-
Methods inherited from class com.forgerock.opendj.cli.Tool
askConfirmation, askPort, close, confirmAction, enableConsoleLoggingIfVerbose, errPrintln, errPrintln, errPrintln, errPrintlnSurroundedByBlankLines, errPrintVerboseMessage, flush, flushLogStream, getErrorStream, getErrStream, getInputStream, getOutputStream, isFullyInteractive, isQuiet, isScriptFriendly, isVerbose, logVerboseMessage, mayPrompt, parseArguments, pressReturnToContinue, print, println, println, println, printlnNoWrap, printlnSurroundedByBlankLines, printNoWrap, readInput, readInput, readInputAllowEmpty, readLineOfInput, readPassword, readPassword, readValidatedInput, readValidatedInputOrThrow, report
-
-
-
-
Method Detail
-
main
public static void main(String[] args)
Runs this tool with the provided the command-line arguments and terminates the running JVM with an int representing the code returned by the tool.This method is only meant to be called by scripts.
- Parameters:
args
- The set of command-line arguments provided to this program.
-
main
public static com.forgerock.opendj.cli.ReturnCode main(String[] args, OutputStream outStream, OutputStream errStream)
Runs this tool with the provided the command-line arguments and returns an int representing the code returned by the tool.This method is meant to be called when this tool should be executed programmatically.
- 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:
- The
code returned
by the tool (zero indicates successful execution, non-zero indicates error status).
-
run
public com.forgerock.opendj.cli.ReturnCode run(String... args) throws com.forgerock.opendj.cli.ClientException
Run setup-profile tool with the provided arguments.Note: Exception handling is not fully delegated to
Utils.runTool(Tool, String...)
since has this tool sharescode
with thesetup tool
, it has to duplicate part of its exception handling behavior as well so that error codes and messages are consistent between both tools.- Overrides:
run
in classcom.forgerock.opendj.cli.Tool
- Parameters:
args
- Arguments set to pass to the tool.- Returns:
- The tool
ReturnCode
. - Throws:
com.forgerock.opendj.cli.ClientException
- If an error occurs while running the tool.
-
-