|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.ldap.AbstractCli
edu.vt.middleware.ldap.LdapCli
public class LdapCli
Command line interface for ldap operations.
| Field Summary | |
|---|---|
protected static String |
OPT_QUERY
Option for ldap query. |
| Fields inherited from class edu.vt.middleware.ldap.AbstractCli |
|---|
logger, OPT_DSMLV1, OPT_DSMLV2, OPT_HELP, OPT_TRACE, OPT_USE_PROPERTIES, options, opts, outputDsmlv1, outputDsmlv2 |
| Constructor Summary | |
|---|---|
LdapCli()
Default constructor. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class edu.vt.middleware.ldap.AbstractCli |
|---|
getArgs, initLdapProperties, initOptions, performAction, printExamples, printHelp |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String OPT_QUERY
| Constructor Detail |
|---|
public LdapCli()
| Method Detail |
|---|
public static void main(String[] args)
args - Command line arguments.protected void initOptions()
initOptions in class AbstractCli
protected LdapConfig initLdapConfig(org.apache.commons.cli.CommandLine line)
throws Exception
line - Parsed command line arguments container.
LdapConfig that has been initialized
Exception - 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 AbstractCli
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||