public class StoreUtils extends Object
Constructor and Description |
---|
StoreUtils() |
Modifier and Type | Method and Description |
---|---|
org.apache.directory.shared.ldap.entry.Entry |
getAttributes(Store<Object,Long> store,
Long id)
This is primarily a convenience method used to extract all the attributes
associated with an entry.
|
static void |
injectEntryInStore(Store<org.apache.directory.shared.ldap.entry.ServerEntry,Long> store,
org.apache.directory.shared.ldap.entry.ServerEntry entry)
adds a given ServerEntry to the store after injecting entryCSN and entryUUID operational
attributes
|
static void |
loadExampleData(Store<org.apache.directory.shared.ldap.entry.ServerEntry,Long> store,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
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
|
public static void loadExampleData(Store<org.apache.directory.shared.ldap.entry.ServerEntry,Long> store, org.apache.directory.shared.ldap.schema.SchemaManager schemaManager) throws Exception
store
- the store object to be initializedregistries
- oid registriesException
- on access exceptionspublic org.apache.directory.shared.ldap.entry.Entry getAttributes(Store<Object,Long> store, Long id) throws Exception
store
- the store to get the attributes fromid
- the id of the entry to get index information forException
- if there are failures accessing the underlying storepublic static void injectEntryInStore(Store<org.apache.directory.shared.ldap.entry.ServerEntry,Long> store, org.apache.directory.shared.ldap.entry.ServerEntry entry) throws Exception
store
- the storedn
- the normalized DNentry
- the server entryException
- in case of any problems in adding the entry to the storeCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.