public final class SecureConnectionCliArgs extends Object
Constructor and Description |
---|
SecureConnectionCliArgs(boolean alwaysSSL)
Creates a new instance of secure arguments.
|
Modifier and Type | Method and Description |
---|---|
boolean |
alwaysSSL()
Indicate if the SSL mode is always used.
|
boolean |
argumentsPresent()
Indicates whether any of the arguments are present.
|
Set<com.forgerock.opendj.cli.Argument> |
createGlobalArguments()
Initialize Global option.
|
void |
createVisibleAdminUidArgument(LocalizableMessage description)
Replace the admin UID argument by a non hidden one.
|
String |
getAdministratorUID()
Get the admin UID which has to be used for the command.
|
int |
getAdminPortFromConfig()
Returns the admin port from the configuration.
|
com.forgerock.opendj.cli.StringArgument |
getAdminUidArg()
Return the 'adminUID' global argument.
|
String |
getBindDN()
Get the bindDN which has to be used for the command.
|
com.forgerock.opendj.cli.StringArgument |
getBindDnArg()
Return the 'bindDN' global argument.
|
com.forgerock.opendj.cli.StringArgument |
getBindPasswordArg()
Return the 'bindPassword' global argument.
|
com.forgerock.opendj.cli.FileBasedArgument |
getBindPasswordFileArg()
Return the 'bindPasswordFile' global argument.
|
com.forgerock.opendj.cli.StringArgument |
getCertNicknameArg()
Return the 'certNicknameArg' global argument.
|
com.forgerock.opendj.cli.IntegerArgument |
getConnectTimeoutArg()
Return the 'connectTimeout' argument.
|
String |
getDefaultHostName()
Returns the current hostname.
|
String |
getHostName()
Get the host name which has to be used for the command.
|
com.forgerock.opendj.cli.StringArgument |
getHostNameArg()
Return the 'hostName' global argument.
|
com.forgerock.opendj.cli.StringArgument |
getKeyStorePasswordArg()
Return the 'keyStorePassword' global argument.
|
com.forgerock.opendj.cli.FileBasedArgument |
getKeyStorePasswordFileArg()
Return the 'keyStorePasswordFile' global argument.
|
com.forgerock.opendj.cli.StringArgument |
getKeyStorePathArg()
Return the 'keyStore' global argument.
|
String |
getPort()
Get the port which has to be used for the command.
|
com.forgerock.opendj.cli.IntegerArgument |
getPortArg()
Return the 'port' global argument.
|
int |
getPortFromConfig()
Returns the port to be used according to the configuration and the
arguments provided by the user.
|
com.forgerock.opendj.cli.StringArgument |
getSaslOptionArg()
Return the 'saslOption' argument.
|
com.forgerock.opendj.cli.BooleanArgument |
getTrustAllArg()
Return the 'trustAllArg' global argument.
|
ApplicationTrustManager |
getTrustManager()
Handle TrustStore.
|
String |
getTruststoreFileFromConfig()
Returns the absolute path of the trust store file that appears on the
config.
|
com.forgerock.opendj.cli.StringArgument |
getTrustStorePasswordArg()
Return the 'trustStorePassword' global argument.
|
com.forgerock.opendj.cli.FileBasedArgument |
getTrustStorePasswordFileArg()
Return the 'trustStorePasswordFile' global argument.
|
com.forgerock.opendj.cli.StringArgument |
getTrustStorePathArg()
Return the 'trustStore' global argument.
|
com.forgerock.opendj.cli.BooleanArgument |
getUseSSLArg()
Return the 'useSSLArg' global argument.
|
com.forgerock.opendj.cli.BooleanArgument |
getUseStartTLSArg()
Return the 'useStartTLSArg' global argument.
|
void |
initArgumentsWithConfiguration(com.forgerock.opendj.cli.ArgumentParser parser)
Updates the default values of the port and the trust store with what is
read in the configuration.
|
void |
setBindDnArgDescription(LocalizableMessage description)
Set the bind DN argument with the provided description.
|
void |
setBindPasswordArgument(com.forgerock.opendj.cli.StringArgument bindPasswordArg)
Set the bind password argument.
|
void |
setBindPasswordFileArgument(com.forgerock.opendj.cli.FileBasedArgument bindPasswordFileArg)
Set the bind password file argument.
|
public SecureConnectionCliArgs(boolean alwaysSSL)
alwaysSSL
- If true, always use the SSL connection type. In this case, the
arguments useSSL and startTLS are not present.public boolean argumentsPresent()
public String getAdministratorUID()
public String getBindDN()
public Set<com.forgerock.opendj.cli.Argument> createGlobalArguments() throws com.forgerock.opendj.cli.ArgumentException
com.forgerock.opendj.cli.ArgumentException
- If there is a problem with any of the parameters used to create
this argument.public String getHostName()
public String getDefaultHostName()
public String getPort()
public boolean alwaysSSL()
public ApplicationTrustManager getTrustManager()
public String getTruststoreFileFromConfig() throws ConfigException
null
if the trust store is not defined or it does
not exist.ConfigException
- if there is an error reading the configuration.public int getAdminPortFromConfig() throws ConfigException
ConfigException
- if an error occurs reading the configuration.public int getPortFromConfig()
public void initArgumentsWithConfiguration(com.forgerock.opendj.cli.ArgumentParser parser)
parser
- The argument parser where the secure connection arguments were added.public void createVisibleAdminUidArgument(LocalizableMessage description)
description
- The localized description for the non hidden admin UID argument.public com.forgerock.opendj.cli.StringArgument getKeyStorePathArg()
public com.forgerock.opendj.cli.StringArgument getHostNameArg()
public com.forgerock.opendj.cli.IntegerArgument getPortArg()
public com.forgerock.opendj.cli.StringArgument getBindDnArg()
public com.forgerock.opendj.cli.StringArgument getAdminUidArg()
public com.forgerock.opendj.cli.FileBasedArgument getBindPasswordFileArg()
public com.forgerock.opendj.cli.StringArgument getBindPasswordArg()
public com.forgerock.opendj.cli.BooleanArgument getTrustAllArg()
public com.forgerock.opendj.cli.StringArgument getTrustStorePathArg()
public com.forgerock.opendj.cli.StringArgument getTrustStorePasswordArg()
public com.forgerock.opendj.cli.FileBasedArgument getTrustStorePasswordFileArg()
public com.forgerock.opendj.cli.StringArgument getKeyStorePasswordArg()
public com.forgerock.opendj.cli.FileBasedArgument getKeyStorePasswordFileArg()
public com.forgerock.opendj.cli.StringArgument getCertNicknameArg()
public com.forgerock.opendj.cli.BooleanArgument getUseSSLArg()
public com.forgerock.opendj.cli.BooleanArgument getUseStartTLSArg()
public com.forgerock.opendj.cli.StringArgument getSaslOptionArg()
public com.forgerock.opendj.cli.IntegerArgument getConnectTimeoutArg()
public void setBindDnArgDescription(LocalizableMessage description)
Argument
instance replacing the current one.description
- The localized description which will be used in help messages.public void setBindPasswordArgument(com.forgerock.opendj.cli.StringArgument bindPasswordArg)
bindPasswordArg
- The argument which will replace the current one.public void setBindPasswordFileArgument(com.forgerock.opendj.cli.FileBasedArgument bindPasswordFileArg)
bindPasswordFileArg
- The argument which will replace the current one.Copyright 2010-2017 ForgeRock AS.