org.opends.server.tools.makeldif
Class MakeLDIF

java.lang.Object
  extended by org.opends.server.tools.makeldif.MakeLDIF
All Implemented Interfaces:
EntryWriter

public class MakeLDIF
extends java.lang.Object
implements EntryWriter

This class defines a program that can be used to generate LDIF content based on a template.


Constructor Summary
MakeLDIF()
          Creates a new instance of this utility.
 
Method Summary
 void closeEntryWriter()
          Notifies the entry writer that no more entries will be provided and that any associated cleanup may be performed.
static void main(java.lang.String[] args)
          Invokes the makeLDIFMain method with the provided set of arguments.
 int makeLDIFMain(java.lang.String[] args)
          Processes the provided set of command-line arguments and begins generating the LDIF content.
 boolean writeEntry(Entry entry)
          Writes the provided entry to the appropriate target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MakeLDIF

public MakeLDIF()
Creates a new instance of this utility. It should just be used for invoking the makeLDIFMain method.

Method Detail

main

public static void main(java.lang.String[] args)
Invokes the makeLDIFMain method with the provided set of arguments.

Parameters:
args - The command-line arguments provided for this program.

makeLDIFMain

public int makeLDIFMain(java.lang.String[] args)
Processes the provided set of command-line arguments and begins generating the LDIF content.

Parameters:
args - The command-line arguments provided for this program.
Returns:
A result code of zero if all processing completed properly, or a nonzero result if a problem occurred.

writeEntry

public boolean writeEntry(Entry entry)
                   throws java.io.IOException,
                          MakeLDIFException
Writes the provided entry to the appropriate target.

Specified by:
writeEntry in interface EntryWriter
Parameters:
entry - The entry to be written.
Returns:
true if the entry writer will accept more entries, or false if not.
Throws:
java.io.IOException - If a problem occurs while writing the entry to its intended destination.
MakeLDIFException - If some other problem occurs.

closeEntryWriter

public void closeEntryWriter()
Notifies the entry writer that no more entries will be provided and that any associated cleanup may be performed.

Specified by:
closeEntryWriter in interface EntryWriter