org.ldaptive.cli
Class AddOperationCli

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

public class AddOperationCli
extends AbstractCli

Command line interface for AddOperation.

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
AddOperationCli()
           
 
Method Summary
protected  int add(ConnectionFactory cf, 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  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

AddOperationCli

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

add

protected int add(ConnectionFactory cf,
                  String file)
           throws Exception
Executes the ldap add operation.

Parameters:
cf - connection factory
file - to read ldif from
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.