org.apache.ldap.clients
Class Opts

java.lang.Object
  extended by org.apache.ldap.clients.Opts
Direct Known Subclasses:
BindOpts

public abstract class Opts
extends java.lang.Object

Command line option bean


Field Summary
protected static java.lang.String BASEDN_OPT
          Base DN command line option
protected static Option baseDnOption
           
protected static java.lang.String BINDDN_OPT
          Bind DN command line option
protected static Option bindDnOption
           
protected static java.lang.String FILE_OPT
          File input command line option
protected static Option fileOption
           
protected static java.lang.String HOST_OPT
          Host name option
protected static Option hostOption
           
protected static java.lang.String MAX_ENTRIES_OPT
          Maximum number of entries returned to the client
protected static java.lang.String MAX_TIME_OPT
          The maximum number of seconds to wait for a response from the server
protected static Option maxEntriesOption
           
protected static Option maxTimeOption
           
protected static java.lang.String NOTHING_OPT
          Dry run command line option
protected static Option nothingOption
           
protected static java.lang.String PASSWORD_OPT
          Bind DN Password command line option
protected static Option passwordOption
           
protected static java.lang.String PORT_OPT
          port number command line option
protected static Option portOption
           
protected static java.lang.String PROTOCOL_OPT
          Protocol version command line option
protected static Option protocolOption
           
protected static java.lang.String QUIET_OPT
          Mode will only display entry DNs, no attributes
protected static Option quietOption
           
protected static java.lang.String SCOPE_OPT
          Search Scope: base - only the base DN one - only the current subtree level sub - the entire tree
protected static Option scopeOption
           
protected static java.lang.String TYPES_OPT
          This mode will only display attribute name, no values
protected static Option typesOption
           
protected static java.lang.String VERBOSE_OPT
          Verbose mode command line option
protected static Option verboseOption
           
 
Constructor Summary
Opts()
           
 
Method Summary
protected  CommandLine getParser(java.lang.String[] argv, Options options)
          Matches the command line string into the options of the command line parser
 boolean isProcessed()
          Determine if the command line has been processed
abstract  void process(java.lang.String[] argv)
          Abstract of the command line parsing process method
 void setProcessed()
          Sets the processed flag to true
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOST_OPT

protected static final java.lang.String HOST_OPT
Host name option

See Also:
Constant Field Values

hostOption

protected static final Option hostOption

PORT_OPT

protected static final java.lang.String PORT_OPT
port number command line option

See Also:
Constant Field Values

portOption

protected static final Option portOption

BINDDN_OPT

protected static final java.lang.String BINDDN_OPT
Bind DN command line option

See Also:
Constant Field Values

bindDnOption

protected static final Option bindDnOption

NOTHING_OPT

protected static final java.lang.String NOTHING_OPT
Dry run command line option

See Also:
Constant Field Values

nothingOption

protected static final Option nothingOption

PROTOCOL_OPT

protected static final java.lang.String PROTOCOL_OPT
Protocol version command line option

See Also:
Constant Field Values

protocolOption

protected static final Option protocolOption

PASSWORD_OPT

protected static final java.lang.String PASSWORD_OPT
Bind DN Password command line option

See Also:
Constant Field Values

passwordOption

protected static final Option passwordOption

VERBOSE_OPT

protected static final java.lang.String VERBOSE_OPT
Verbose mode command line option

See Also:
Constant Field Values

verboseOption

protected static final Option verboseOption

FILE_OPT

protected static final java.lang.String FILE_OPT
File input command line option

See Also:
Constant Field Values

fileOption

protected static final Option fileOption

BASEDN_OPT

protected static final java.lang.String BASEDN_OPT
Base DN command line option

See Also:
Constant Field Values

baseDnOption

protected static final Option baseDnOption

SCOPE_OPT

protected static final java.lang.String SCOPE_OPT
Search Scope: base - only the base DN one - only the current subtree level sub - the entire tree

See Also:
Constant Field Values

scopeOption

protected static final Option scopeOption

QUIET_OPT

protected static final java.lang.String QUIET_OPT
Mode will only display entry DNs, no attributes

See Also:
Constant Field Values

quietOption

protected static final Option quietOption

TYPES_OPT

protected static final java.lang.String TYPES_OPT
This mode will only display attribute name, no values

See Also:
Constant Field Values

typesOption

protected static final Option typesOption

MAX_ENTRIES_OPT

protected static final java.lang.String MAX_ENTRIES_OPT
Maximum number of entries returned to the client

See Also:
Constant Field Values

maxEntriesOption

protected static final Option maxEntriesOption

MAX_TIME_OPT

protected static final java.lang.String MAX_TIME_OPT
The maximum number of seconds to wait for a response from the server

See Also:
Constant Field Values

maxTimeOption

protected static final Option maxTimeOption
Constructor Detail

Opts

public Opts()
Method Detail

getParser

protected CommandLine getParser(java.lang.String[] argv,
                                Options options)
                         throws ParseException
Matches the command line string into the options of the command line parser

Parameters:
argv - The actual command line string
Returns:
The parser object
Throws:
ParseException - if any of the command line option is incorrect

isProcessed

public boolean isProcessed()
Determine if the command line has been processed

Returns:
True if the command line arguments have been processed

setProcessed

public void setProcessed()
Sets the processed flag to true


process

public abstract void process(java.lang.String[] argv)
                      throws ParseException
Abstract of the command line parsing process method

Parameters:
argv - Command line arguments
Throws:
ParseException