Package com.ibm.di.parser
Class LDIFParser
- java.lang.Object
-
- com.ibm.di.parser.ParserImpl
-
- com.ibm.di.parser.LDIFParser
-
- All Implemented Interfaces:
ParserInterface
,VersionInfoInterface
public class LDIFParser extends ParserImpl
The LDIF Parser reads and writes LDIF style data. The LDIF Parser is usually to do file exchange with an LDAP directory.
-
-
Field Summary
-
Fields inherited from class com.ibm.di.parser.ParserImpl
_debug, myConfiguration
-
-
Constructor Summary
Constructors Constructor Description LDIFParser()
Creates LDIF Parser.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getVersion()
Version information.void
initParser()
This function is called after the connector has initialized the parser with input/output streams.boolean
isDeltaSupported()
Returns true if this connector is able to perform delta updatesstatic void
main(java.lang.String[] argv)
Provided to test/debug function usage: passed argument of classpath to LDIF file will dump entries.Entry
readEntry()
Reads LDIF files into entries.void
writeEntry(Entry entry)
Writes entry in LDIF format to the current output writer.-
Methods inherited from class com.ibm.di.parser.ParserImpl
closeParser, debug, debugMode, flush, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, logmsg, querySchema, registerScriptBeans, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser
-
-
-
-
Method Detail
-
initParser
public void initParser()
This function is called after the connector has initialized the parser with input/output streams.- Specified by:
initParser
in interfaceParserInterface
- Overrides:
initParser
in classParserImpl
-
readEntry
public Entry readEntry() throws java.io.IOException
Reads LDIF files into entries. This method parses LDIF attributes to entry attributes and maps "dn" key to internal name specified by theldifDNAttributeName
parameter. This is the main entry point for reading entries.- Returns:
- entry
- Throws:
java.io.IOException
- If an I/O error occurs
-
writeEntry
public void writeEntry(Entry entry) throws java.io.IOException
Writes entry in LDIF format to the current output writer. Depending on whetherldifVersion
parameter is checked the ldif version number is also written .- Parameters:
entry
- the entry to be written.- Throws:
java.io.IOException
- If an I/O error occurs
-
getVersion
public java.lang.String getVersion()
Version information.- Returns:
- version information
-
main
public static void main(java.lang.String[] argv)
Provided to test/debug function usage: passed argument of classpath to LDIF file will dump entries.- Parameters:
argv
- String array
-
isDeltaSupported
public boolean isDeltaSupported()
Returns true if this connector is able to perform delta updates- Specified by:
isDeltaSupported
in interfaceParserInterface
- Overrides:
isDeltaSupported
in classParserImpl
- Returns:
false
-
-