org.apache.directory.server.xdbm.tools
Class StoreUtils

java.lang.Object
  extended by org.apache.directory.server.xdbm.tools.StoreUtils

public class StoreUtils
extends java.lang.Object

A utility class for loading example LDIF data.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
StoreUtils()
           
 
Method Summary
 org.apache.directory.shared.ldap.entry.Entry getAttributes(Store store, java.lang.Long id)
          This is primarily a convenience method used to extract all the attributes associated with an entry.
static void loadExampleData(Store<ServerEntry> store, Registries registries)
          Initializes and loads a store with the example data shown in Structure and Organization TODO might want to make this load an LDIF instead in the future TODO correct size of spaces in user provided DN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreUtils

public StoreUtils()
Method Detail

loadExampleData

public static void loadExampleData(Store<ServerEntry> store,
                                   Registries registries)
                            throws java.lang.Exception
Initializes and loads a store with the example data shown in Structure and Organization TODO might want to make this load an LDIF instead in the future TODO correct size of spaces in user provided DN

Parameters:
store - the store object to be initialized
registries - oid registries
Throws:
java.lang.Exception - on access exceptions

getAttributes

public org.apache.directory.shared.ldap.entry.Entry getAttributes(Store store,
                                                                  java.lang.Long id)
                                                           throws java.lang.Exception
This is primarily a convenience method used to extract all the attributes associated with an entry.

Parameters:
store - the store to get the attributes from
id - the id of the entry to get index information for
Returns:
the index names and values as an Attributes object
Throws:
java.lang.Exception - if there are failures accessing the underlying store


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