public class AddOperationCli extends AbstractCli
AddOperation.| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
COMMAND_NAME
name of operation provided by this class.
|
private static java.lang.String |
OPT_FILE
option for LDIF file.
|
OPT_HELP, OPT_PROVIDER_PROPERTIES, options, outputDsmlv1| Constructor and Description |
|---|
AddOperationCli() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
add(ConnectionFactory cf,
java.lang.String file)
Executes the ldap add operation.
|
protected int |
dispatch(org.apache.commons.cli.CommandLine line)
Dispatch command line data to the active that can perform the operation requested on the command line.
|
protected java.lang.String |
getCommandName()
Returns the name of the command for which this class provides a CLI interface.
|
protected void |
initOptions()
Initialize CLI options.
|
static void |
main(java.lang.String[] args)
CLI entry point method.
|
getArgDesc, getPropertiesFromOptions, initConnectionFactory, performAction, printExamples, printHelpprivate static final java.lang.String OPT_FILE
private static final java.lang.String COMMAND_NAME
public static void main(java.lang.String[] args)
args - command line arguments.protected void initOptions()
AbstractCliinitOptions in class AbstractCliprotected int dispatch(org.apache.commons.cli.CommandLine line)
throws java.lang.Exception
AbstractClidispatch in class AbstractCliline - parsed command line argumentsjava.lang.Exception - on errors thrown by actionprotected int add(ConnectionFactory cf, java.lang.String file) throws java.lang.Exception
cf - connection factoryfile - to read ldif fromjava.lang.Exception - on any LDAP search errorprotected java.lang.String getCommandName()
AbstractCligetCommandName in class AbstractCli