org.ldaptive.cli
Class CompareOperationCli

java.lang.Object
  extended by org.ldaptive.cli.AbstractCli
      extended by org.ldaptive.cli.CompareOperationCli

public class CompareOperationCli
extends AbstractCli

Command line interface for CompareOperation.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.cli.AbstractCli
OPT_HELP, OPT_PROVIDER_PROPERTIES, options, outputDsmlv1
 
Constructor Summary
CompareOperationCli()
           
 
Method Summary
protected  int compare(ConnectionFactory cf, String dn, LdapAttribute attr)
          Executes the ldap compare 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  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(String[] args)
          CLI entry point method.
 
Methods inherited from class org.ldaptive.cli.AbstractCli
getArgDesc, getPropertiesFromOptions, initConnectionFactory, performAction, printExamples, printHelp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompareOperationCli

public CompareOperationCli()
Method Detail

main

public static void main(String[] args)
CLI entry point method.

Parameters:
args - command line arguments.

initOptions

protected void initOptions()
Initialize CLI options.

Overrides:
initOptions in class AbstractCli

dispatch

protected int dispatch(org.apache.commons.cli.CommandLine line)
                throws Exception
Dispatch command line data to the active that can perform the operation requested on the command line.

Specified by:
dispatch in class AbstractCli
Parameters:
line - parsed command line arguments
Returns:
status code
Throws:
Exception - on errors thrown by action

compare

protected int compare(ConnectionFactory cf,
                      String dn,
                      LdapAttribute attr)
               throws Exception
Executes the ldap compare operation.

Parameters:
cf - connection factory
dn - to compare attribute on
attr - attribute to compare
Returns:
status code
Throws:
Exception - on any LDAP search error

getCommandName

protected String getCommandName()
Returns the name of the command for which this class provides a CLI interface.

Specified by:
getCommandName in class AbstractCli
Returns:
name of CLI command


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.