org.apache.directory.shared.ldap.ldif
Interface LdifParser

All Known Implementing Classes:
LdifParserImpl

public interface LdifParser

Parses an ldif into a multimap or an JNDI Attributes instance of attribute key/value pairs with potential more than one attribute value per attribute. This parser populates the MultiMap or Attributes instance with all attributes within the LDIF including control attributes like the 'dn' and the 'changeType'. These attributes are not usually part of the entry proper but are a cue to the processing application. These control attributes should be accessed and removed from the MultiMap or Attributes instance if need be according to the specific context in which this parser is used.

Version:
$Rev: 379008 $
Author:
Apache Directory Project

Method Summary
 void parse(javax.naming.directory.Attributes attributes, java.lang.String ldif)
          Parses an String representing an entry in LDAP Data Interchange Format (LDIF) storing its attributes in the supplied Attributes instance.
 LdifEntry parse(java.lang.String ldif)
          Parses an LDIF into a special LdifEntry structure that tracks control attributes within an LDIF.
 

Method Detail

parse

public void parse(javax.naming.directory.Attributes attributes,
                  java.lang.String ldif)
           throws javax.naming.NamingException
Parses an String representing an entry in LDAP Data Interchange Format (LDIF) storing its attributes in the supplied Attributes instance.

Parameters:
attributes - the Attributes instance to populate with LDIF attributes including the DN of the entry represented by the LDIF.
ldif - the entry in LDAP Data Interchange Format
Throws:
javax.naming.NamingException - if a naming exception results while the LDIF is being parsed

parse

public LdifEntry parse(java.lang.String ldif)
                throws javax.naming.NamingException
Parses an LDIF into a special LdifEntry structure that tracks control attributes within an LDIF.

Parameters:
ldif - the LDIF to parse
Returns:
the LdifEntry parsed
Throws:
javax.naming.NamingException - if a naming exception results while the LDIF is being parsed


Copyright © 2003-2006 . All Rights Reserved.