org.dsmltools
Class DSMLLDAPWriter

java.lang.Object
  |
  +--org.dsmltools.DSMLLDAPConnection
        |
        +--org.dsmltools.DSMLLDAPWriter

public final class DSMLLDAPWriter
extends DSMLLDAPConnection

This class implements functionality to modify an LDAP directory based on the contents of a DSML document.


Field Summary
 
Fields inherited from class org.dsmltools.DSMLLDAPConnection
m_conn
 
Constructor Summary
DSMLLDAPWriter()
           
 
Method Summary
 void add(org.w3c.dom.Document xiDoc)
          This method adds the entries in a Document to the directory.
 void delete(org.w3c.dom.Document xiDoc)
          This method removes the entries in the Document from the directory.
 void setCareful(boolean xiCareful)
          This method sets the Careful flag.
 
Methods inherited from class org.dsmltools.DSMLLDAPConnection
connect, disconnect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSMLLDAPWriter

public DSMLLDAPWriter()
Method Detail

add

public void add(org.w3c.dom.Document xiDoc)
This method adds the entries in a Document to the directory.

If the careful flag is set, we do not overwrite entries which are already present in the directory (matching by DN.) If it is not set, we overwrite entries present in the directory totally.

Parameters:
xiDoc - Document containing entries to add

delete

public void delete(org.w3c.dom.Document xiDoc)
This method removes the entries in the Document from the directory. For delete, we ignore the schema attached to the document.

If the careful flag is not set, the deletion is done by matching DNs only. If the careful flag is set, the entries are compared, and only deleted if a perfect match is found. This second method takes significantly longer.

Parameters:
xiDoc - Document containing DSML data to be removed

setCareful

public void setCareful(boolean xiCareful)
This method sets the Careful flag. This flag has different meanings depending on whether we are adding or deleting (see above.)

Parameters:
xiCareful - The value to set the careful flag to