public class LdapCli extends AbstractCli
| Modifier and Type | Field and Description |
|---|---|
protected static String |
OPT_QUERY
Option for ldap query.
|
logger, OPT_DSMLV1, OPT_DSMLV2, OPT_HELP, OPT_TRACE, OPT_USE_PROPERTIES, options, opts, outputDsmlv1, outputDsmlv2| Constructor and Description |
|---|
LdapCli()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
dispatch(org.apache.commons.cli.CommandLine line)
Dispatch command line data to the handler that can perform the operation
requested on the command line.
|
protected String |
getCommandName()
Gets the name of the command for which this class provides a CLI interface.
|
protected LdapConfig |
initLdapConfig(org.apache.commons.cli.CommandLine line)
Initialize an LdapConfig with command line options.
|
protected void |
initOptions()
Initialize CLI options.
|
static void |
main(String[] args)
CLI entry point method.
|
protected void |
search(LdapConfig config,
String filter,
String[] attrs)
Executes the ldap search operation.
|
getArgs, initLdapProperties, initOptions, performAction, printExamples, printHelpprotected static final String OPT_QUERY
public static void main(String[] args)
args - Command line arguments.protected void initOptions()
initOptions in class AbstractCliprotected LdapConfig initLdapConfig(org.apache.commons.cli.CommandLine line) throws Exception
line - Parsed command line arguments container.LdapConfig that has been initializedException - On errors thrown by handler.protected void dispatch(org.apache.commons.cli.CommandLine line)
throws Exception
dispatch in class AbstractCliline - Parsed command line arguments container.Exception - On errors thrown by handler.protected void search(LdapConfig config, String filter, String[] attrs) throws Exception
config - Ldap configuration.filter - Ldap filter to search on.attrs - Ldap attributes to return.Exception - On errors.protected String getCommandName()
getCommandName in class AbstractCliCopyright © 2014. All rights reserved.