org.apache.ldap.clients
Class BindOpts

java.lang.Object
  extended by org.apache.ldap.clients.Opts
      extended by org.apache.ldap.clients.BindOpts
Direct Known Subclasses:
AddOpts, DelOpts, ModifyOpts, SearchOpts

public class BindOpts
extends Opts


Field Summary
protected  java.lang.String bindDn
          DN used to bind to the server
static java.lang.String DEFAULT_HOST
          The default host to use if it is not specified on command lin
static java.lang.String DEFAULT_MAX_ENTRIES
          The default Max Entries is set to 1000 entries.
static java.lang.String DEFAULT_MAX_TIME
          The default Max Time is set to 1000 seconds.
static java.lang.String DEFAULT_PORT
          The default port to use if none are specified on command line
protected  java.lang.String host
          LDAP server host name or IP
protected  boolean isDryRun
          Toggle switch: false will not send request to the server, true is the "normal" operating mode
protected  boolean isVerbose
          Verbose mode, default is off
protected  boolean isVersion3
          Is the LDIF format version 3 compliant
(package private)  Options options
          The options used to Bind
protected  java.lang.String password
          Password of the DN entry used to bind to the server
protected  int port
          The port used to connect to the LDAP server
 
Fields inherited from class org.apache.ldap.clients.Opts
BASEDN_OPT, baseDnOption, BINDDN_OPT, bindDnOption, FILE_OPT, fileOption, HOST_OPT, hostOption, MAX_ENTRIES_OPT, MAX_TIME_OPT, maxEntriesOption, maxTimeOption, NOTHING_OPT, nothingOption, PASSWORD_OPT, passwordOption, PORT_OPT, portOption, PROTOCOL_OPT, protocolOption, QUIET_OPT, quietOption, SCOPE_OPT, scopeOption, TYPES_OPT, typesOption, VERBOSE_OPT, verboseOption
 
Constructor Summary
BindOpts()
           
 
Method Summary
 java.lang.String getBindDn()
          DN used to bind to the server
 java.lang.String getHost()
          Get the hostname if of the LDAP server
 Options getOptions()
          Options used by the LdapBind client
 java.lang.String getPassword()
          Password of the DN entry used to bind to the server
 int getPort()
          Port used to connect to the LDAP server
 boolean isDryRun()
          Determine if this is a dry run, no message sent to the server
 boolean isVerbose()
          Determine if verbose has been turned on
 boolean isVersion3()
          Determine if the LDIF format version 3 compliant
 void process(java.lang.String[] argv)
          Process the command line arguments and load the options
 void setBindDn(java.lang.String bindDn)
          Set the DN of the user to bind to server with
 void setHost(java.lang.String host)
          Set the hostname of the LDAP Server
 void setIsDryRun(boolean isDryRun)
          Set the value of the dry run mode
 void setIsVerbose(boolean isVerbose)
          Set verbose mode
 void setIsVersion3(boolean isVersion3)
          Set value of version3 compatibility
 void setPassword(java.lang.String password)
          Password for the DN entry being used to bind
 void setPort(int port)
          Set the port number to connect to server with
 
Methods inherited from class org.apache.ldap.clients.Opts
getParser, isProcessed, setProcessed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

Options options
The options used to Bind


DEFAULT_PORT

public static final java.lang.String DEFAULT_PORT
The default port to use if none are specified on command line

See Also:
Constant Field Values

DEFAULT_HOST

public static final java.lang.String DEFAULT_HOST
The default host to use if it is not specified on command lin

See Also:
Constant Field Values

DEFAULT_MAX_ENTRIES

public static final java.lang.String DEFAULT_MAX_ENTRIES
The default Max Entries is set to 1000 entries. It's a better solution than defaulting to 0, which means no limit...

See Also:
Constant Field Values

DEFAULT_MAX_TIME

public static final java.lang.String DEFAULT_MAX_TIME
The default Max Time is set to 1000 seconds. It's a better solution than defaulting to 0, which means no limit...

See Also:
Constant Field Values

port

protected int port
The port used to connect to the LDAP server


isDryRun

protected boolean isDryRun
Toggle switch: false will not send request to the server, true is the "normal" operating mode


isVerbose

protected boolean isVerbose
Verbose mode, default is off


isVersion3

protected boolean isVersion3
Is the LDIF format version 3 compliant


host

protected java.lang.String host
LDAP server host name or IP


bindDn

protected java.lang.String bindDn
DN used to bind to the server


password

protected java.lang.String password
Password of the DN entry used to bind to the server

Constructor Detail

BindOpts

public BindOpts()
Method Detail

setHost

public void setHost(java.lang.String host)
Set the hostname of the LDAP Server

Parameters:
host - Hostname of the LDAP Server

setPort

public void setPort(int port)
Set the port number to connect to server with

Parameters:
port - Port number to use to connect to the server

setBindDn

public void setBindDn(java.lang.String bindDn)
Set the DN of the user to bind to server with

Parameters:
bindDn - DN of the user to bind to server with

setPassword

public void setPassword(java.lang.String password)
Password for the DN entry being used to bind

Parameters:
password - Password for the DN entry being used to bind

setIsVersion3

public void setIsVersion3(boolean isVersion3)
Set value of version3 compatibility

Parameters:
isVersion3 - True if LDIF is version3

setIsVerbose

public void setIsVerbose(boolean isVerbose)
Set verbose mode

Parameters:
isVerbose - True if verbose mode is turned on

setIsDryRun

public void setIsDryRun(boolean isDryRun)
Set the value of the dry run mode

Parameters:
isDryRun - True if the dry run mode is turned on

getHost

public java.lang.String getHost()
Get the hostname if of the LDAP server

Returns:
hostname of the LDAP server

getPort

public int getPort()
Port used to connect to the LDAP server

Returns:
Port used to connect to the LDAP server

getBindDn

public java.lang.String getBindDn()
DN used to bind to the server

Returns:
DN used to bind to the server

getPassword

public java.lang.String getPassword()
Password of the DN entry used to bind to the server

Returns:
Password of the DN entry used to bind to the server

isVersion3

public boolean isVersion3()
Determine if the LDIF format version 3 compliant

Returns:
True if the LDIF format version 3 compliant

isVerbose

public boolean isVerbose()
Determine if verbose has been turned on

Returns:
True if verbose has been turned on

isDryRun

public boolean isDryRun()
Determine if this is a dry run, no message sent to the server

Returns:
True if this is a dry run

getOptions

public Options getOptions()
Options used by the LdapBind client

Returns:
An collection of available options for this client

process

public void process(java.lang.String[] argv)
             throws ParseException
Process the command line arguments and load the options

Specified by:
process in class Opts
Parameters:
argv - The command line string
Throws:
ParseException - if any of the command line option is incorrect