org.opends.server.admin.client.cli
Class DsFrameworkCliParser
java.lang.Object
org.opends.server.util.args.ArgumentParser
org.opends.server.util.args.SubCommandArgumentParser
org.opends.server.admin.client.cli.SecureConnectionCliParser
org.opends.server.admin.client.cli.DsFrameworkCliParser
public class DsFrameworkCliParser
- extends SecureConnectionCliParser
This class will parse CLI arguments for the dsframework command lines.
Constructor Summary |
DsFrameworkCliParser(java.lang.String mainClassName,
Message toolDescription,
boolean longArgumentsCaseSensitive)
Creates a new instance of this subcommand argument parser with no
arguments. |
Method Summary |
javax.naming.ldap.InitialLdapContext |
getContext(java.io.OutputStream out,
java.io.OutputStream err)
Get the InitialLdapContext that has to be used for the ADS. |
void |
initializeParser(java.io.OutputStream outStream)
Initialize the parser with the Global options and subcommands. |
DsFrameworkCliReturnCode |
performSubCommand(java.io.OutputStream outStream,
java.io.OutputStream errStream)
Handle the subcommand. |
Methods inherited from class org.opends.server.admin.client.cli.SecureConnectionCliParser |
createGlobalArguments, getAdministratorUID, getBindDN, getBindPassword, getBindPassword, getBindPassword, getBindPassword, getHostName, getKeyManager, getPort, getTrustManager, initializeGlobalArguments, initializeGlobalArguments, isVerbose, useSSL, useStartTLS, validateGlobalOptions, validateGlobalOptions |
Methods inherited from class org.opends.server.util.args.SubCommandArgumentParser |
addGlobalArgument, addGlobalArgument, getGlobalArgument, getGlobalArgumentForLongID, getGlobalArgumentForShortID, getGlobalArgumentList, getGlobalArgumentsByLongID, getGlobalArgumentsByShortID, getHelpUsageReference, getMainClassName, getRawArguments, getSubCommand, getSubCommand, getSubCommands, getSubCommandUsage, getToolDescription, getTrailingArguments, getUsage, getUsage, hasGlobalArgument, hasGlobalArgumentWithLongID, hasGlobalArgumentWithShortID, hasSubCommand, isUsageArgumentPresent, isVersionArgumentPresent, longArgumentsCaseSensitive, parseArguments, parseArguments, parseArguments, removeGlobalArgument, setUsageArgument, setUsageGroupArgument, usageOrVersionDisplayed |
Methods inherited from class org.opends.server.util.args.ArgumentParser |
addArgument, addArgument, addDefaultArgument, addGeneralArgument, addInputOutputArgument, addLdapConnectionArgument, allowsTrailingArguments, checkExternalProperties, getArgument, getArgumentForLongID, getArgumentForShortID, getArgumentList, getArgumentsByLongID, getArgumentsByShortID, getMaxTrailingArguments, getMinTrailingArguments, getStandardGroup, getUsage, getUsageMessage, printUsageGroupHeaders, setDefaultArgumentGroupDescription, setFilePropertiesArgument, setGeneralArgumentGroupDescription, setInputOutputArgumentGroupDescription, setLdapArgumentGroupDescription, setNoPropertiesFileArgument, setUsageArgument |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cliGroup
public java.util.HashSet<DsFrameworkCliSubCommandGroup> cliGroup
- The different CLI group.
DsFrameworkCliParser
public DsFrameworkCliParser(java.lang.String mainClassName,
Message toolDescription,
boolean longArgumentsCaseSensitive)
- Creates a new instance of this subcommand argument parser with no
arguments.
- Parameters:
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.
initializeParser
public void initializeParser(java.io.OutputStream outStream)
throws ArgumentException
- Initialize the parser with the Global options and subcommands.
- Parameters:
outStream
- The output stream to use for standard output, or null
if standard output is not needed.
- Throws:
ArgumentException
- If there is a problem with any of the parameters used
to create this argument.
performSubCommand
public DsFrameworkCliReturnCode performSubCommand(java.io.OutputStream outStream,
java.io.OutputStream errStream)
throws ADSContextException,
ArgumentException
- Handle the subcommand.
- Parameters:
outStream
- The output stream to use for standard output.errStream
- The output stream to use for standard error.
- Returns:
- the return code
- Throws:
ADSContextException
- If there is a problem with when trying to perform the
operation.
ArgumentException
- If there is a problem with any of the parameters used
to execute this subcommand.
getContext
public javax.naming.ldap.InitialLdapContext getContext(java.io.OutputStream out,
java.io.OutputStream err)
- Get the InitialLdapContext that has to be used for the ADS.
- Parameters:
out
- The output stream to use for standard output.err
- The output stream to use for standard error.
- Returns:
- The InitialLdapContext that has to be used for the ADS.