org.apache.ldap.clients
Class LdapModify

java.lang.Object
  extended by org.apache.ldap.clients.LdapBind
      extended by org.apache.ldap.clients.LdapModify

public class LdapModify
extends LdapBind

Ldap Modify Client


Constructor Summary
LdapModify(java.lang.String[] args)
          Create the client instance and loads the options from the command line arguments
 
Method Summary
 java.io.InputStream getStream()
          Get the inputStream to read the LDIF entries from.
static void main(java.lang.String[] args)
          The main method of the Modify client.
 void modify(java.lang.StringBuffer a_buf, int id)
          Prepare the LDIF entry and send it to the encoder, then wait for a reponse from the LDAP server on the results of the operation.
 void parseInput(java.io.InputStream a_stream)
          Parse the input from the InputStream.
 
Methods inherited from class org.apache.ldap.clients.LdapBind
bind, connect, disconnect, enableLogging, getDecoder, getEncoder, getIn, getLog, getModule, getOpts, getOut, getSocket, setDecoder, setEncoder, setIn, setLog, setModule, setOpts, setOut, setSocket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapModify

public LdapModify(java.lang.String[] args)
Create the client instance and loads the options from the command line arguments

Parameters:
args - Command line arguments
Method Detail

getStream

public java.io.InputStream getStream()
Get the inputStream to read the LDIF entries from. This will either be a file or STDIN based in the command line arguments

Returns:
returns The inputStream to read LDIF entries from

parseInput

public void parseInput(java.io.InputStream a_stream)
Parse the input from the InputStream. For each LDIF entry found pass it to the modify method for processing. This will only segragate different entries, it won't breakdown the individual entries. There is a separate LDIF parsing class for that.

Parameters:
a_stream - The input stream to read the LDIF entries from

modify

public void modify(java.lang.StringBuffer a_buf,
                   int id)
Prepare the LDIF entry and send it to the encoder, then wait for a reponse from the LDAP server on the results of the operation.

Parameters:
a_buf - The string buffer that contain the LDIF entry
id - the message id for the session

main

public static void main(java.lang.String[] args)
The main method of the Modify client.

Parameters:
a_args - Command line arguments