public abstract class SecureConnectionCliParser extends com.forgerock.opendj.cli.SubCommandArgumentParser
Modifier and Type | Field and Description |
---|---|
protected com.forgerock.opendj.cli.BooleanArgument |
noPropertiesFileArg
The argument which should be used to indicate that we will not
look for properties file.
|
protected com.forgerock.opendj.cli.StringArgument |
propertiesFileArg
Argument indicating a properties file argument.
|
protected SecureConnectionCliArgs |
secureArgsList
The secure args list object.
|
protected com.forgerock.opendj.cli.BooleanArgument |
showUsageArg
The 'showUsage' global argument.
|
protected com.forgerock.opendj.cli.BooleanArgument |
verboseArg
The 'verbose' global argument.
|
Modifier | Constructor and Description |
---|---|
protected |
SecureConnectionCliParser(String mainClassName,
LocalizableMessage toolDescription,
boolean longArgumentsCaseSensitive)
Creates a new instance of this argument parser with no arguments.
|
Modifier and Type | Method and Description |
---|---|
protected Set<com.forgerock.opendj.cli.Argument> |
createGlobalArguments(OutputStream outStream,
boolean alwaysSSL)
Initialize Global option.
|
String |
getAdministratorUID()
Returns the Administrator UID provided in the command-line.
|
String |
getBindDN()
Get the bindDN which has to be used for the command.
|
String |
getBindPassword()
Gets the password which has to be used for the command without prompting
the user.
|
String |
getBindPassword(String dn,
OutputStream out,
OutputStream err)
Gets the password which has to be used for the command.
|
protected String |
getBindPassword(String dn,
OutputStream out,
OutputStream err,
com.forgerock.opendj.cli.StringArgument pwdArg,
com.forgerock.opendj.cli.FileBasedArgument fileArg)
Get the password which has to be used for the command.
|
int |
getConnectTimeout()
Returns the timeout to be used to connect in milliseconds.
|
String |
getHostName()
Get the host name which has to be used for the command.
|
String |
getPort()
Get the port which has to be used for the command.
|
ApplicationTrustManager |
getTrustManager()
Handle TrustStore.
|
protected void |
initializeGlobalArguments(Collection<com.forgerock.opendj.cli.Argument> args)
Initialize the global options with the provided set of arguments.
|
protected void |
initializeGlobalArguments(Collection<com.forgerock.opendj.cli.Argument> args,
com.forgerock.opendj.cli.ArgumentGroup argGroup)
Initialize the global options with the provided set of arguments.
|
boolean |
isVerbose()
Indicate if the verbose mode is required.
|
boolean |
useSSL()
Indicate if the SSL mode is required.
|
boolean |
useStartTLS()
Indicate if the startTLS mode is required.
|
int |
validateGlobalOptions(LocalizableMessageBuilder buf)
Indication if provided global options are validate.
|
int |
validateGlobalOptions(PrintStream err)
Indication if provided global options are validate.
|
addGlobalArgument, addGlobalArgument, addLdapConnectionArgument, getGlobalArgument, getGlobalArgumentForLongID, getGlobalArgumentForShortID, getGlobalArgumentList, getGlobalArgumentsByLongID, getGlobalArgumentsByShortID, getSubCommand, getSubCommand, getSubCommands, getSubCommandUsage, getUsage, hasGlobalArgument, hasGlobalArgumentWithLongID, hasGlobalArgumentWithShortID, hasSubCommand, parseArguments, removeGlobalArgument, setUsageArgument, setUsageGroupArgument, setUsageHandler
addArgument, addArgument, addDefaultArgument, displayMessageAndUsageReference, getArgumentForLongID, getArgumentList, getBindPassword, getDocSubcommandsDescriptionSupplement, getDocToolDescriptionSupplement, getHelpUsageReference, getOptionsRefSect1, getShortToolDescription, getTrailingArguments, getUsageMessage, isUsageArgumentPresent, isVersionArgumentPresent, parseArguments, parseArguments, setDocSubcommandsDescriptionSupplement, setDocToolDescriptionSupplement, setFilePropertiesArgument, setNoPropertiesFileArgument, setShortToolDescription, setUsageArgument, setUsageOrVersionDisplayed, setVersionHandler, usageOrVersionDisplayed
protected com.forgerock.opendj.cli.BooleanArgument showUsageArg
protected com.forgerock.opendj.cli.BooleanArgument verboseArg
protected SecureConnectionCliArgs secureArgsList
protected com.forgerock.opendj.cli.StringArgument propertiesFileArg
protected com.forgerock.opendj.cli.BooleanArgument noPropertiesFileArg
protected SecureConnectionCliParser(String mainClassName, LocalizableMessage toolDescription, boolean longArgumentsCaseSensitive)
mainClassName
- The fully-qualified name of the Java class that should
be invoked to launch the program with which this
argument parser is associated.toolDescription
- A human-readable description for the tool, which will be
included when displaying usage information.longArgumentsCaseSensitive
- Indicates whether subcommand and long argument names
should be treated in a case-sensitive manner.public String getBindDN()
public String getAdministratorUID()
protected String getBindPassword(String dn, OutputStream out, OutputStream err, com.forgerock.opendj.cli.StringArgument pwdArg, com.forgerock.opendj.cli.FileBasedArgument fileArg)
dn
- The user DN for which to password could be asked.out
- The input stream to used if we have to prompt to the
user.err
- The error stream to used if we have to prompt to the
user.pwdArg
- The password StringArgument argument.fileArg
- The password FileBased argument.public String getBindPassword(String dn, OutputStream out, OutputStream err)
dn
- The user DN for which to password could be asked.out
- The input stream to used if we have to prompt to the
user.err
- The error stream to used if we have to prompt to the
user.public String getBindPassword()
protected Set<com.forgerock.opendj.cli.Argument> createGlobalArguments(OutputStream outStream, boolean alwaysSSL) throws com.forgerock.opendj.cli.ArgumentException
outStream
- The output stream used for the usage.alwaysSSL
- If true, always use the SSL connection type. In this case,
the arguments useSSL and startTLS are not present.com.forgerock.opendj.cli.ArgumentException
- If there is a problem with any of the parameters used
to create this argument.protected void initializeGlobalArguments(Collection<com.forgerock.opendj.cli.Argument> args) throws com.forgerock.opendj.cli.ArgumentException
args
- the arguments to use to initialize the global options.com.forgerock.opendj.cli.ArgumentException
- if there is a conflict with the provided
arguments.protected void initializeGlobalArguments(Collection<com.forgerock.opendj.cli.Argument> args, com.forgerock.opendj.cli.ArgumentGroup argGroup) throws com.forgerock.opendj.cli.ArgumentException
args
- the arguments to use to initialize the global options.argGroup
- to which args will be addedcom.forgerock.opendj.cli.ArgumentException
- if there is a conflict with the provided
arguments.public String getHostName()
public String getPort()
public int validateGlobalOptions(LocalizableMessageBuilder buf)
buf
- the LocalizableMessageBuilder to write the error messages.public int validateGlobalOptions(PrintStream err)
err
- the stream to be used to print error message.public boolean isVerbose()
public boolean useSSL()
public boolean useStartTLS()
public ApplicationTrustManager getTrustManager()
public int getConnectTimeout() throws IllegalStateException
0
if there is no timeout.IllegalStateException
- if the method is called before
parsing the arguments.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.