org.ldaptive.cli
Class SearchOperationCli

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

public class SearchOperationCli
extends AbstractCli

Command line interface for SearchOperation.

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
SearchOperationCli()
           
 
Method Summary
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.
protected  SearchRequest initSearchRequest(org.apache.commons.cli.CommandLine line)
          Initialize a search request with command line options.
static void main(String[] args)
          CLI entry point method.
protected  int search(ConnectionFactory cf, SearchRequest request)
          Executes the ldap search operation.
 
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

SearchOperationCli

public SearchOperationCli()
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

initSearchRequest

protected SearchRequest initSearchRequest(org.apache.commons.cli.CommandLine line)
Initialize a search request with command line options.

Parameters:
line - parsed command line arguments
Returns:
search request that has been initialized

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

search

protected int search(ConnectionFactory cf,
                     SearchRequest request)
              throws Exception
Executes the ldap search operation.

Parameters:
cf - connection factory
request - search request
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-2017 Virginia Tech. All Rights Reserved.