org.dsmltools
Class DSMLLDAPWriter

java.lang.Object
  extended by org.dsmltools.DSMLLDAPConnection
      extended by 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
(package private)  java.lang.String NAMESPACEURI
          Value of the DSML namespace
 
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 proceed(org.w3c.dom.Document xiDoc)
           
 void setCareful(boolean xiCareful)
          This method sets the Careful flag.
 void setNamespace(java.lang.String xiNamespace)
          This method sets the Namespace.
 void setUpdate(boolean xiUpdate)
          This method sets the Update 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
 

Field Detail

NAMESPACEURI

java.lang.String NAMESPACEURI
Value of the DSML namespace

Constructor Detail

DSMLLDAPWriter

public DSMLLDAPWriter()
Method Detail

proceed

public void proceed(org.w3c.dom.Document xiDoc)
             throws java.lang.Exception
Throws:
java.lang.Exception

add

public void add(org.w3c.dom.Document xiDoc)
         throws java.lang.Exception
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
Throws:
java.lang.Exception

delete

public void delete(org.w3c.dom.Document xiDoc)
            throws java.lang.Exception
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
Throws:
java.lang.Exception

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

setUpdate

public void setUpdate(boolean xiUpdate)
This method sets the Update flag. (For the meanings see above.)

Parameters:
xiUpdate - The value to set the update flag to

setNamespace

public void setNamespace(java.lang.String xiNamespace)
This method sets the Namespace.

Parameters:
xiNamespace - The value to set the namespace to