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.

Author:
Apache Directory Project

Field Summary
protected  javax.naming.directory.DirContext ctx
          a handle on the top initial context: get new context from this
protected  java.util.List 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(javax.naming.directory.DirContext ctx, java.io.File ldif, java.util.List filters)
           
LdifFileLoader(javax.naming.directory.DirContext ctx, java.io.File ldif, java.util.List filters, java.lang.ClassLoader loader)
           
LdifFileLoader(javax.naming.directory.DirContext ctx, java.lang.String ldif)
          Creates the LDIF file loader command.
 
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

ctx

protected javax.naming.directory.DirContext ctx
a handle on the top initial context: get new context from this


ldif

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


filters

protected final java.util.List 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(javax.naming.directory.DirContext ctx,
                      java.lang.String ldif)
Creates the LDIF file loader command.

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

LdifFileLoader

public LdifFileLoader(javax.naming.directory.DirContext ctx,
                      java.io.File ldif,
                      java.util.List filters)

LdifFileLoader

public LdifFileLoader(javax.naming.directory.DirContext ctx,
                      java.io.File ldif,
                      java.util.List filters,
                      java.lang.ClassLoader loader)
Method Detail

execute

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



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