org.apache.directory.server.protocol.shared.store
Class LdifFileLoader

java.lang.Object
  extended by org.apache.directory.server.protocol.shared.store.LdifFileLoader

public class LdifFileLoader
extends java.lang.Object

Support for commands to load an LDIF file into a DirContext.

Version:
$Rev: 927404 $, $Date: 2010-03-25 14:55:18 +0100 (Thu, 25 Mar 2010) $
Author:
Apache Directory Project

Field Summary
protected  CoreSession coreSession
          a handle on the top core session
protected  java.util.List<LdifLoadFilter> filters
          the filters to use while loading entries into the server
protected  java.io.File ldif
          the LDIF file or directory containing LDIFs to load
protected  java.lang.ClassLoader loader
          the class loader to use if we cannot file the file as a path
 
Constructor Summary
LdifFileLoader(CoreSession coreSession, java.io.File ldif, java.util.List<? extends LdifLoadFilter> filters)
          Creates a new instance of LdifFileLoader.
LdifFileLoader(CoreSession coreSession, java.io.File ldif, java.util.List<? extends LdifLoadFilter> filters, java.lang.ClassLoader loader)
          Creates a new instance of LdifFileLoader.
LdifFileLoader(CoreSession coreSession, java.lang.String ldif)
          Creates a new instance of LdifFileLoader.
 
Method Summary
 int execute()
          Opens the LDIF file and loads the entries into the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coreSession

protected CoreSession coreSession
a handle on the top core session


ldif

protected java.io.File ldif
the LDIF file or directory containing LDIFs to load


filters

protected final java.util.List<LdifLoadFilter> filters
the filters to use while loading entries into the server


loader

protected final java.lang.ClassLoader loader
the class loader to use if we cannot file the file as a path

Constructor Detail

LdifFileLoader

public LdifFileLoader(CoreSession coreSession,
                      java.lang.String ldif)
Creates a new instance of LdifFileLoader.

Parameters:
ctx - the context to load the entries into.
ldif - the file of LDIF entries to load.

LdifFileLoader

public LdifFileLoader(CoreSession coreSession,
                      java.io.File ldif,
                      java.util.List<? extends LdifLoadFilter> filters)
Creates a new instance of LdifFileLoader.

Parameters:
ctx -
ldif -
filters -

LdifFileLoader

public LdifFileLoader(CoreSession coreSession,
                      java.io.File ldif,
                      java.util.List<? extends LdifLoadFilter> filters,
                      java.lang.ClassLoader loader)
Creates a new instance of LdifFileLoader.

Parameters:
ctx -
ldif -
filters -
loader -
Method Detail

execute

public int execute()
Opens the LDIF file and loads the entries into the context.

Returns:
The count of entries created.


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.