org.opends.server.tools
Class ExportLDIF

java.lang.Object
  extended by org.opends.server.tools.tasks.TaskTool
      extended by org.opends.server.tools.ExportLDIF
All Implemented Interfaces:
TaskScheduleInformation

public class ExportLDIF
extends TaskTool

This program provides a utility that may be used to export the contents of a Directory Server backend to an LDIF file. Depending on the arguments given, this program will either perform the export directly as a process that runs separate from Directory Server; or by scheduling a task to perform the action within the Directory Server via the tasks interface.


Field Summary
 
Fields inherited from class org.opends.server.tools.tasks.TaskTool
NOW
 
Constructor Summary
ExportLDIF()
           
 
Method Summary
 void addTaskAttributes(java.util.List<RawAttribute> attributes)
          Adds utility specific attributes to attributes for population of the entry that is added to the task backend.
 java.lang.Class getTaskClass()
          Gets the Class that implements the utility to execute.
 java.lang.String getTaskObjectclass()
          Gets the objectclass used to represent scheduled instances of this utility in the task backend.
static void main(java.lang.String[] args)
          The main method for ExportLDIF tool.
static int mainExportLDIF(java.lang.String[] args)
          Processes the command-line arguments and invokes the export process.
static int mainExportLDIF(java.lang.String[] args, boolean initializeServer, java.io.OutputStream outStream, java.io.OutputStream errStream)
          Processes the command-line arguments and invokes the export process.
protected  int processLocal(boolean initializeServer, java.io.PrintStream out, java.io.PrintStream err)
          Called when this utility should perform its actions locally in this JVM.
 
Methods inherited from class org.opends.server.tools.tasks.TaskTool
createArgParser, getDependencyIds, getFailedDependencyAction, getNotifyUponCompletionEmailAddresses, getNotifyUponErrorEmailAddresses, getStartDateTime, process, validateTaskArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportLDIF

public ExportLDIF()
Method Detail

main

public static void main(java.lang.String[] args)
The main method for ExportLDIF tool.

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

mainExportLDIF

public static int mainExportLDIF(java.lang.String[] args)
Processes the command-line arguments and invokes the export process.

Parameters:
args - The command-line arguments provided to this program.
Returns:
The error code.

mainExportLDIF

public static int mainExportLDIF(java.lang.String[] args,
                                 boolean initializeServer,
                                 java.io.OutputStream outStream,
                                 java.io.OutputStream errStream)
Processes the command-line arguments and invokes the export process.

Parameters:
args - The command-line arguments provided to this program.
initializeServer - Indicates whether to initialize the server.
outStream - The output stream to use for standard output, or null if standard output is not needed.
errStream - The output stream to use for standard error, or null if standard error is not needed.
Returns:
The error code.

addTaskAttributes

public void addTaskAttributes(java.util.List<RawAttribute> attributes)
Adds utility specific attributes to attributes for population of the entry that is added to the task backend.

Parameters:
attributes - that will be added to the task backend

getTaskObjectclass

public java.lang.String getTaskObjectclass()
Gets the objectclass used to represent scheduled instances of this utility in the task backend.

Returns:
String representation of this utilities objectclass

getTaskClass

public java.lang.Class getTaskClass()
Gets the Class that implements the utility to execute.

Returns:
class of the tasks implementation

processLocal

protected int processLocal(boolean initializeServer,
                           java.io.PrintStream out,
                           java.io.PrintStream err)
Called when this utility should perform its actions locally in this JVM.

Specified by:
processLocal in class TaskTool
Parameters:
initializeServer - indicates whether or not to initialize the directory server in the case of a local action
out - stream to write messages; may be null
err - stream to write messages; may be null
Returns:
int indicating the result of this action