public class InstallDS extends com.forgerock.opendj.cli.ConsoleApplication
Modifier and Type | Field and Description |
---|---|
static int |
LIMIT_KEYSTORE_PASSWORD_PROMPT
The maximum number of times that we should ask the user to provide the
password to access to a keystore.
|
static String |
LOG_FILE_SUFFIX
Suffix for log files.
|
static String |
TMP_FILE_PREFIX
Prefix for log files.
|
Constructor and Description |
---|
InstallDS(PrintStream out,
PrintStream err,
InputStream in)
Constructor for the InstallDS object.
|
Modifier and Type | Method and Description |
---|---|
static void |
checkCertificateInKeystore(SecurityOptions.CertificateType type,
String path,
String pwd,
Collection<String> certNicknames,
Collection<LocalizableMessage> errorMessages,
Collection<String> nicknameList)
Checks that the provided parameters are valid to access an existing key
store.
|
static boolean |
containsCertNicknameErrorMessage(Collection<LocalizableMessage> msgs)
Tells if any of the error messages provided corresponds to a problem with
the certificate nickname.
|
static boolean |
containsKeyStorePasswordErrorMessage(Collection<LocalizableMessage> msgs)
Tells if any of the error messages provided corresponds to a problem with
the key store password.
|
static boolean |
containsKeyStorePathErrorMessage(Collection<LocalizableMessage> msgs)
Tells if any of the error messages provided corresponds to a problem with
the key store path.
|
int |
execute(String[] args)
Parses the provided command-line arguments and uses that information to run
the setup CLI.
|
boolean |
isAdvancedMode() |
boolean |
isInteractive() |
boolean |
isMenuDrivenMode() |
boolean |
isQuiet() |
boolean |
isScriptFriendly() |
boolean |
isVerbose() |
static void |
main(String[] args)
The main method for the InstallDS CLI tool.
|
static int |
mainCLI(String[] args)
Parses the provided command-line arguments and uses that information to run
the setup tool.
|
static int |
mainCLI(String[] args,
OutputStream outStream,
OutputStream errStream,
InputStream inStream)
Parses the provided command-line arguments and uses that information to run
the setup tool.
|
askConfirmation, askPort, confirmAction, errPrint, errPrintln, errPrintln, errPrintln, errPrintVerboseMessage, getErrorStream, getErrStream, getInputStream, getOutputStream, pressReturnToContinue, print, println, println, println, println, printProgressBar, printVerboseMessage, readInput, readInput, readLineOfInput, readPassword, readPassword, readPort, readValidatedInput, readValidatedInput
public static final String TMP_FILE_PREFIX
public static final String LOG_FILE_SUFFIX
public static final int LIMIT_KEYSTORE_PASSWORD_PROMPT
public InstallDS(PrintStream out, PrintStream err, InputStream in)
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.public static void main(String[] args)
args
- the command-line arguments provided to this program.public static int mainCLI(String[] args)
args
- the command-line arguments provided to this program.public static int mainCLI(String[] args, OutputStream outStream, OutputStream errStream, InputStream inStream)
args
- The command-line arguments provided to this program.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.public int execute(String[] args)
args
- the command-line arguments provided to this program.public boolean isQuiet()
isQuiet
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isInteractive()
isInteractive
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isMenuDrivenMode()
isMenuDrivenMode
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isScriptFriendly()
isScriptFriendly
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isAdvancedMode()
isAdvancedMode
in class com.forgerock.opendj.cli.ConsoleApplication
public boolean isVerbose()
isVerbose
in class com.forgerock.opendj.cli.ConsoleApplication
public static void checkCertificateInKeystore(SecurityOptions.CertificateType type, String path, String pwd, Collection<String> certNicknames, Collection<LocalizableMessage> errorMessages, Collection<String> nicknameList)
type
- the type of key store.path
- the path of the key store.pwd
- the password (PIN) to access the key store.certNicknames
- the certificate nicknames that we are looking for (or null if we
just one to get the one that is in the key store).errorMessages
- the list that will be updated with the errors encountered.nicknameList
- the list that will be updated with the nicknames found in the key
store.public static boolean containsKeyStorePathErrorMessage(Collection<LocalizableMessage> msgs)
msgs
- the messages to analyze.true
if any of the error messages provided corresponds
to a problem with the key store path and false
otherwise.public static boolean containsKeyStorePasswordErrorMessage(Collection<LocalizableMessage> msgs)
msgs
- the messages to analyze.true
if any of the error messages provided corresponds
to a problem with the key store password and false
otherwise.public static boolean containsCertNicknameErrorMessage(Collection<LocalizableMessage> msgs)
msgs
- the messages to analyze.true
if any of the error messages provided corresponds
to a problem with the certificate nickname and false
otherwise.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.