|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.util.args.ArgumentParser
org.opends.server.util.args.SubCommandArgumentParser
org.opends.server.admin.client.cli.SecureConnectionCliParser
public abstract class SecureConnectionCliParser
This is a commodity class that can be used to check the arguments required to establish a secure connection in the command line. It can be used to generate an ApplicationTrustManager object based on the options provided by the user in the command line.
Field Summary | |
---|---|
static java.lang.String |
EOL
End Of Line. |
protected BooleanArgument |
noPropertiesFileArg
The argument which should be used to indicate that we will not look for properties file. |
protected StringArgument |
propertiesFileArg
Argument indicating a properties file argument. |
protected SecureConnectionCliArgs |
secureArgsList
The secure args list object. |
protected BooleanArgument |
showUsageArg
The showUsage' global argument. |
protected BooleanArgument |
verboseArg
The 'verbose' global argument. |
Fields inherited from class org.opends.server.util.args.ArgumentParser |
---|
argumentGroups, defaultArgGroup, generalArgGroup, ioArgGroup, ldapArgGroup |
Constructor Summary | |
---|---|
protected |
SecureConnectionCliParser(java.lang.String mainClassName,
Message toolDescription,
boolean longArgumentsCaseSensitive)
Creates a new instance of this argument parser with no arguments. |
Method Summary | |
---|---|
protected java.util.LinkedHashSet<Argument> |
createGlobalArguments(java.io.OutputStream outStream)
Initialize Global option. |
java.lang.String |
getAdministratorUID()
Returns the Administrator UID provided in the command-line. |
java.lang.String |
getBindDN()
Get the bindDN which has to be used for the command. |
java.lang.String |
getBindPassword()
Get the password which has to be used for the command without prompting the user. |
java.lang.String |
getBindPassword(StringArgument clearArg,
FileBasedArgument fileArg)
Get the password which has to be used for the command without prompting the user. |
java.lang.String |
getBindPassword(java.lang.String dn,
java.io.OutputStream out,
java.io.OutputStream err)
Get the password which has to be used for the command. |
protected java.lang.String |
getBindPassword(java.lang.String dn,
java.io.OutputStream out,
java.io.OutputStream err,
StringArgument clearArg,
FileBasedArgument fileArg)
Get the password which has to be used for the command. |
java.lang.String |
getHostName()
Get the host name which has to be used for the command. |
javax.net.ssl.KeyManager |
getKeyManager()
Handle KeyStore. |
java.lang.String |
getPort()
Get the port which has to be used for the command. |
ApplicationTrustManager |
getTrustManager()
Handle TrustStore. |
protected void |
initializeGlobalArguments(java.util.Collection<Argument> args)
Initialize the global options with the provided set of arguments. |
protected void |
initializeGlobalArguments(java.util.Collection<Argument> args,
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(MessageBuilder buf)
Indication if provided global options are validate. |
int |
validateGlobalOptions(java.io.PrintStream err)
Indication if provided global options are validate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BooleanArgument showUsageArg
protected BooleanArgument verboseArg
protected SecureConnectionCliArgs secureArgsList
protected StringArgument propertiesFileArg
protected BooleanArgument noPropertiesFileArg
public static java.lang.String EOL
Constructor Detail |
---|
protected SecureConnectionCliParser(java.lang.String mainClassName, Message 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.Method Detail |
---|
public java.lang.String getBindDN()
public java.lang.String getAdministratorUID()
protected java.lang.String getBindPassword(java.lang.String dn, java.io.OutputStream out, java.io.OutputStream err, StringArgument clearArg, 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.clearArg
- The password StringArgument argument.fileArg
- The password FileBased argument.
public java.lang.String getBindPassword(java.lang.String dn, java.io.OutputStream out, java.io.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 java.lang.String getBindPassword(StringArgument clearArg, FileBasedArgument fileArg)
clearArg
- The password StringArgument argument.fileArg
- The password FileBased argument.
public java.lang.String getBindPassword()
protected java.util.LinkedHashSet<Argument> createGlobalArguments(java.io.OutputStream outStream) throws ArgumentException
outStream
- The output stream used for the usage.
ArgumentException
- If there is a problem with any of the parameters used
to create this argument.protected void initializeGlobalArguments(java.util.Collection<Argument> args) throws ArgumentException
args
- the arguments to use to initialize the global options.
ArgumentException
- if there is a conflict with the provided
arguments.protected void initializeGlobalArguments(java.util.Collection<Argument> args, ArgumentGroup argGroup) throws ArgumentException
args
- the arguments to use to initialize the global options.argGroup
- to which args will be added
ArgumentException
- if there is a conflict with the provided
arguments.public java.lang.String getHostName()
public java.lang.String getPort()
public int validateGlobalOptions(MessageBuilder buf)
buf
- the MessageBuilder to write the error messages.
public int validateGlobalOptions(java.io.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 javax.net.ssl.KeyManager getKeyManager()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |