org.apache.directory.server.core.partition.impl.btree.jdbm
Class JdbmStore<E>

java.lang.Object
  extended by org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore<E>
All Implemented Interfaces:
Store<E,java.lang.Long>

public class JdbmStore<E>
extends java.lang.Object
implements Store<E,java.lang.Long>


Constructor Summary
JdbmStore()
          Creates a store based on JDBM B+Trees.
 
Method Summary
 void add(org.apache.directory.shared.ldap.entry.ServerEntry entry)
          Add an entry into the store.
 void addIndex(Index<?,E,java.lang.Long> index)
          Adds a user index to the list of index for this store
 int count()
           
 void delete(java.lang.Long id)
          Delete the entry associated with a given Id
 void destroy()
          Close the partition : we have to close all the userIndices and the master table.
 Index<java.lang.String,E,java.lang.Long> getAliasIndex()
          
 int getCacheSize()
           
 int getChildCount(java.lang.Long id)
           
 java.lang.Long getDefaultId()
          Gets the default ID.
 Index<java.lang.String,E,java.lang.Long> getEntryCsnIndex()
          
 java.lang.String getEntryDn(java.lang.Long id)
           
 java.lang.Long getEntryId(java.lang.String dn)
           
 java.lang.String getEntryUpdn(java.lang.Long id)
           
 java.lang.String getEntryUpdn(java.lang.String dn)
           
 Index<java.lang.String,E,java.lang.Long> getEntryUuidIndex()
          
 Index<?,E,java.lang.Long> getIndex(java.lang.String id)
          Get the user or system index associated with the given name
 java.lang.String getName()
           
 Index<java.lang.String,E,java.lang.Long> getNdnIndex()
          
 Index<java.lang.String,E,java.lang.Long> getObjectClassIndex()
          
 Index<java.lang.Long,E,java.lang.Long> getOneAliasIndex()
          
 Index<java.lang.Long,E,java.lang.Long> getOneLevelIndex()
          
 java.lang.Long getParentId(java.lang.Long childId)
           
 java.lang.Long getParentId(java.lang.String dn)
          Gets the Long id of an entry's parent using the child entry's normalized DN.
 Index<java.lang.String,E,java.lang.Long> getPresenceIndex()
          
 java.lang.String getProperty(java.lang.String propertyName)
           
 Index<java.lang.Long,E,java.lang.Long> getSubAliasIndex()
          
 Index<java.lang.Long,E,java.lang.Long> getSubLevelIndex()
          
 org.apache.directory.shared.ldap.name.DN getSuffix()
           
 java.lang.String getSuffixDn()
           
 Index<?,E,java.lang.Long> getSystemIndex(java.lang.String id)
          Get the system index associated with the given name
 Index<java.lang.String,E,java.lang.Long> getUpdnIndex()
          
 org.apache.directory.shared.ldap.name.DN getUpSuffix()
           
 Index<?,E,java.lang.Long> getUserIndex(java.lang.String id)
          Get the user index associated with the given name
 java.util.Set<Index<?,E,java.lang.Long>> getUserIndices()
           
 java.io.File getWorkingDirectory()
           
 boolean hasIndexOn(java.lang.String id)
          Tells if an index is already present in the User's or System's index list
 boolean hasSystemIndexOn(java.lang.String id)
          Tells if an index is already present in the System's index list
 boolean hasUserIndexOn(java.lang.String id)
          Tells if an index is already present in the User's index list
 void init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
          Initialize the JDBM storage system.
 boolean isInitialized()
          Gets whether the store is initialized.
 boolean isSyncOnWrite()
           
 IndexCursor<java.lang.Long,E,java.lang.Long> list(java.lang.Long id)
          Gets an IndexEntry Cursor over the child nodes of an entry.
 org.apache.directory.shared.ldap.entry.ServerEntry lookup(java.lang.Long id)
           
 void modify(org.apache.directory.shared.ldap.name.DN dn, java.util.List<org.apache.directory.shared.ldap.entry.Modification> mods)
           
 void modify(org.apache.directory.shared.ldap.name.DN dn, org.apache.directory.shared.ldap.entry.ModificationOperation modOp, org.apache.directory.shared.ldap.entry.ServerEntry mods)
           
 void move(org.apache.directory.shared.ldap.name.DN oldChildDn, org.apache.directory.shared.ldap.name.DN newParentDn)
           
 void move(org.apache.directory.shared.ldap.name.DN oldChildDn, org.apache.directory.shared.ldap.name.DN newParentDn, org.apache.directory.shared.ldap.name.RDN newRdn, boolean deleteOldRdn)
           
 void rename(org.apache.directory.shared.ldap.name.DN dn, org.apache.directory.shared.ldap.name.RDN newRdn, boolean deleteOldRdn)
          Changes the relative distinguished name of an entry specified by a distinguished name with the optional removal of the old RDN attribute value from the entry.
 void setAliasIndex(Index<java.lang.String,E,java.lang.Long> index)
          Set the Alias index
 void setCacheSize(int cacheSize)
          Sets the cache size for this store
 void setEntryCsnIndex(Index<java.lang.String,E,java.lang.Long> index)
          Set the EntryCSN index
 void setEntryUuidIndex(Index<java.lang.String,E,java.lang.Long> index)
          Set the EntryUUID index
 void setName(java.lang.String name)
          Sets the store's name
 void setNdnIndex(Index<java.lang.String,E,java.lang.Long> index)
          Set the NDN index
 void setObjectClassIndex(Index<java.lang.String,E,java.lang.Long> index)
          Set the ObjectClass index
 void setOneAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
          Set the OneAlias index
 void setOneLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
          Set the OneLevel index
 void setPresenceIndex(Index<java.lang.String,E,java.lang.Long> index)
          Set the Presence index
 void setProperty(java.lang.String propertyName, java.lang.String propertyValue)
           
 void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
           
 void setSubAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
          Set the SubAlias index
 void setSubLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
          Set the SubLevel index
 void setSuffixDn(java.lang.String suffixDn)
           
 void setSyncOnWrite(boolean isSyncOnWrite)
          Sets the flag telling the server to flush on disk when some modification has been done.
 void setUpdnIndex(Index<java.lang.String,E,java.lang.Long> index)
          Set the UpDn index
 void setUserIndices(java.util.Set<Index<?,E,java.lang.Long>> userIndices)
          Stores the list of user index
 void setWorkingDirectory(java.io.File workingDirectory)
          Sets the working directory for the store
 void sync()
          This method is called when the synch thread is waking up, to write the modified data.
 java.util.Iterator<java.lang.String> systemIndices()
          An iterator build on top of the System's index
 java.util.Iterator<java.lang.String> userIndices()
          An iterator build on top of the User's index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbmStore

public JdbmStore()
Creates a store based on JDBM B+Trees.

Method Detail

setWorkingDirectory

public void setWorkingDirectory(java.io.File workingDirectory)
Description copied from interface: Store
Sets the working directory for the store

Specified by:
setWorkingDirectory in interface Store<E,java.lang.Long>

getWorkingDirectory

public java.io.File getWorkingDirectory()
Specified by:
getWorkingDirectory in interface Store<E,java.lang.Long>
Returns:
The current working directory for the store

setSuffixDn

public void setSuffixDn(java.lang.String suffixDn)
Specified by:
setSuffixDn in interface Store<E,java.lang.Long>

getSuffixDn

public java.lang.String getSuffixDn()
Specified by:
getSuffixDn in interface Store<E,java.lang.Long>

setSyncOnWrite

public void setSyncOnWrite(boolean isSyncOnWrite)
Description copied from interface: Store
Sets the flag telling the server to flush on disk when some modification has been done.

Specified by:
setSyncOnWrite in interface Store<E,java.lang.Long>
Parameters:
isSyncOnWrite - A boolean set to true if we have to flush on disk when a modification occurs

isSyncOnWrite

public boolean isSyncOnWrite()
Specified by:
isSyncOnWrite in interface Store<E,java.lang.Long>
Returns:
true if we write to disk for every modification

setCacheSize

public void setCacheSize(int cacheSize)
Description copied from interface: Store
Sets the cache size for this store

Specified by:
setCacheSize in interface Store<E,java.lang.Long>
Parameters:
cacheSize - The cache size

getCacheSize

public int getCacheSize()
Specified by:
getCacheSize in interface Store<E,java.lang.Long>
Returns:
The cache size

setName

public void setName(java.lang.String name)
Description copied from interface: Store
Sets the store's name

Specified by:
setName in interface Store<E,java.lang.Long>
Parameters:
name - The store's name

getName

public java.lang.String getName()
Specified by:
getName in interface Store<E,java.lang.Long>
Returns:
The store's name

getDefaultId

public java.lang.Long getDefaultId()
Description copied from interface: Store
Gets the default ID.

Specified by:
getDefaultId in interface Store<E,java.lang.Long>
Returns:
the default ID.

init

public void init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
          throws java.lang.Exception
Initialize the JDBM storage system.

Specified by:
init in interface Store<E,java.lang.Long>
Parameters:
schemaManager - the schema manager
Throws:
java.lang.Exception - on failure to lookup elements in schemaManager or create database files

destroy

public void destroy()
             throws java.lang.Exception
Close the partition : we have to close all the userIndices and the master table.

Specified by:
destroy in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception - lazily thrown on any closer failures to avoid leaving open files

isInitialized

public boolean isInitialized()
Gets whether the store is initialized.

Specified by:
isInitialized in interface Store<E,java.lang.Long>
Returns:
true if the partition store is initialized

sync

public void sync()
          throws java.lang.Exception
This method is called when the synch thread is waking up, to write the modified data.

Specified by:
sync in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception - on failures to sync database files to disk

setUserIndices

public void setUserIndices(java.util.Set<Index<?,E,java.lang.Long>> userIndices)
Description copied from interface: Store
Stores the list of user index

Specified by:
setUserIndices in interface Store<E,java.lang.Long>
Parameters:
userIndices - The list of user index

getUserIndices

public java.util.Set<Index<?,E,java.lang.Long>> getUserIndices()
Specified by:
getUserIndices in interface Store<E,java.lang.Long>
Returns:
The list of user index

addIndex

public void addIndex(Index<?,E,java.lang.Long> index)
              throws java.lang.Exception
Description copied from interface: Store
Adds a user index to the list of index for this store

Specified by:
addIndex in interface Store<E,java.lang.Long>
Parameters:
index - The index to add
Throws:
java.lang.Exception - If the addition failed

getPresenceIndex

public Index<java.lang.String,E,java.lang.Long> getPresenceIndex()

Specified by:
getPresenceIndex in interface Store<E,java.lang.Long>
Returns:
The Presence system index

setPresenceIndex

public void setPresenceIndex(Index<java.lang.String,E,java.lang.Long> index)
                      throws java.lang.Exception
Set the Presence index

Specified by:
setPresenceIndex in interface Store<E,java.lang.Long>
Parameters:
index - The Presence index
Throws:
java.lang.Exception - If the addition failed

getOneLevelIndex

public Index<java.lang.Long,E,java.lang.Long> getOneLevelIndex()

Specified by:
getOneLevelIndex in interface Store<E,java.lang.Long>
Returns:
The OneLevel system index

setOneLevelIndex

public void setOneLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
                      throws java.lang.Exception
Set the OneLevel index

Specified by:
setOneLevelIndex in interface Store<E,java.lang.Long>
Parameters:
index - The OneLevel index
Throws:
java.lang.Exception - If the addition failed

getAliasIndex

public Index<java.lang.String,E,java.lang.Long> getAliasIndex()

Specified by:
getAliasIndex in interface Store<E,java.lang.Long>
Returns:
The Alias system index

setAliasIndex

public void setAliasIndex(Index<java.lang.String,E,java.lang.Long> index)
                   throws org.apache.directory.shared.ldap.exception.LdapException
Set the Alias index

Specified by:
setAliasIndex in interface Store<E,java.lang.Long>
Parameters:
index - The Alias index
Throws:
org.apache.directory.shared.ldap.exception.LdapException

getOneAliasIndex

public Index<java.lang.Long,E,java.lang.Long> getOneAliasIndex()

Specified by:
getOneAliasIndex in interface Store<E,java.lang.Long>
Returns:
The OneAlias system index

setOneAliasIndex

public void setOneAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
                      throws org.apache.directory.shared.ldap.exception.LdapException
Set the OneAlias index

Specified by:
setOneAliasIndex in interface Store<E,java.lang.Long>
Parameters:
index - The OneAlias index
Throws:
org.apache.directory.shared.ldap.exception.LdapException

getSubAliasIndex

public Index<java.lang.Long,E,java.lang.Long> getSubAliasIndex()

Specified by:
getSubAliasIndex in interface Store<E,java.lang.Long>
Returns:
The SubAlias system index

setSubAliasIndex

public void setSubAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
                      throws org.apache.directory.shared.ldap.exception.LdapException
Set the SubAlias index

Specified by:
setSubAliasIndex in interface Store<E,java.lang.Long>
Parameters:
index - The SubAlias index
Throws:
org.apache.directory.shared.ldap.exception.LdapException

getUpdnIndex

public Index<java.lang.String,E,java.lang.Long> getUpdnIndex()

Specified by:
getUpdnIndex in interface Store<E,java.lang.Long>
Returns:
The UpDN system index

setUpdnIndex

public void setUpdnIndex(Index<java.lang.String,E,java.lang.Long> index)
                  throws org.apache.directory.shared.ldap.exception.LdapException
Set the UpDn index

Specified by:
setUpdnIndex in interface Store<E,java.lang.Long>
Parameters:
index - The UpDn index
Throws:
org.apache.directory.shared.ldap.exception.LdapException

getNdnIndex

public Index<java.lang.String,E,java.lang.Long> getNdnIndex()

Specified by:
getNdnIndex in interface Store<E,java.lang.Long>
Returns:
The Ndn system index

setNdnIndex

public void setNdnIndex(Index<java.lang.String,E,java.lang.Long> index)
                 throws org.apache.directory.shared.ldap.exception.LdapException
Set the NDN index

Specified by:
setNdnIndex in interface Store<E,java.lang.Long>
Parameters:
index - The NDN index
Throws:
org.apache.directory.shared.ldap.exception.LdapException

getSubLevelIndex

public Index<java.lang.Long,E,java.lang.Long> getSubLevelIndex()

Specified by:
getSubLevelIndex in interface Store<E,java.lang.Long>
Returns:
The SubLevel system index

setSubLevelIndex

public void setSubLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
                      throws org.apache.directory.shared.ldap.exception.LdapException
Set the SubLevel index

Specified by:
setSubLevelIndex in interface Store<E,java.lang.Long>
Parameters:
index - The SubLevel index
Throws:
org.apache.directory.shared.ldap.exception.LdapException

getObjectClassIndex

public Index<java.lang.String,E,java.lang.Long> getObjectClassIndex()

Specified by:
getObjectClassIndex in interface Store<E,java.lang.Long>
Returns:
The ObjectClass system index

setObjectClassIndex

public void setObjectClassIndex(Index<java.lang.String,E,java.lang.Long> index)
                         throws org.apache.directory.shared.ldap.exception.LdapException
Set the ObjectClass index

Specified by:
setObjectClassIndex in interface Store<E,java.lang.Long>
Parameters:
index - The ObjectClass index
Throws:
org.apache.directory.shared.ldap.exception.LdapException

getEntryUuidIndex

public Index<java.lang.String,E,java.lang.Long> getEntryUuidIndex()

Specified by:
getEntryUuidIndex in interface Store<E,java.lang.Long>
Returns:
The EntryUUID system index

setEntryUuidIndex

public void setEntryUuidIndex(Index<java.lang.String,E,java.lang.Long> index)
                       throws org.apache.directory.shared.ldap.exception.LdapException
Set the EntryUUID index

Specified by:
setEntryUuidIndex in interface Store<E,java.lang.Long>
Parameters:
index - The EntryUUID index
Throws:
org.apache.directory.shared.ldap.exception.LdapException

getEntryCsnIndex

public Index<java.lang.String,E,java.lang.Long> getEntryCsnIndex()

Specified by:
getEntryCsnIndex in interface Store<E,java.lang.Long>
Returns:
The EntryCSN system index

setEntryCsnIndex

public void setEntryCsnIndex(Index<java.lang.String,E,java.lang.Long> index)
                      throws org.apache.directory.shared.ldap.exception.LdapException
Set the EntryCSN index

Specified by:
setEntryCsnIndex in interface Store<E,java.lang.Long>
Parameters:
index - The EntryCSN index
Throws:
org.apache.directory.shared.ldap.exception.LdapException

userIndices

public java.util.Iterator<java.lang.String> userIndices()
Description copied from interface: Store
An iterator build on top of the User's index

Specified by:
userIndices in interface Store<E,java.lang.Long>

systemIndices

public java.util.Iterator<java.lang.String> systemIndices()
Description copied from interface: Store
An iterator build on top of the System's index

Specified by:
systemIndices in interface Store<E,java.lang.Long>

hasIndexOn

public boolean hasIndexOn(java.lang.String id)
                   throws org.apache.directory.shared.ldap.exception.LdapException
Description copied from interface: Store
Tells if an index is already present in the User's or System's index list

Specified by:
hasIndexOn in interface Store<E,java.lang.Long>
Parameters:
id - The index we are looking for
Returns:
true if the index is already present in the User's or System's index list
Throws:
org.apache.directory.shared.ldap.exception.LdapException

hasUserIndexOn

public boolean hasUserIndexOn(java.lang.String id)
                       throws org.apache.directory.shared.ldap.exception.LdapException
Description copied from interface: Store
Tells if an index is already present in the User's index list

Specified by:
hasUserIndexOn in interface Store<E,java.lang.Long>
Parameters:
id - The index we are looking for
Returns:
true if the index is already present in the User's index list
Throws:
org.apache.directory.shared.ldap.exception.LdapException

hasSystemIndexOn

public boolean hasSystemIndexOn(java.lang.String id)
                         throws org.apache.directory.shared.ldap.exception.LdapException
Description copied from interface: Store
Tells if an index is already present in the System's index list

Specified by:
hasSystemIndexOn in interface Store<E,java.lang.Long>
Parameters:
id - The index we are looking for
Returns:
true if the index is already present in the System's index list
Throws:
org.apache.directory.shared.ldap.exception.LdapException

getIndex

public Index<?,E,java.lang.Long> getIndex(java.lang.String id)
                                   throws IndexNotFoundException
Description copied from interface: Store
Get the user or system index associated with the given name

Specified by:
getIndex in interface Store<E,java.lang.Long>
Parameters:
id - The index name we are looking for
Returns:
The associated user or system index
Throws:
IndexNotFoundException - If the index does not exist

getUserIndex

public Index<?,E,java.lang.Long> getUserIndex(java.lang.String id)
                                       throws IndexNotFoundException
Description copied from interface: Store
Get the user index associated with the given name

Specified by:
getUserIndex in interface Store<E,java.lang.Long>
Parameters:
id - The index name we are looking for
Returns:
The associated user index
Throws:
IndexNotFoundException - If the index does not exist

getSystemIndex

public Index<?,E,java.lang.Long> getSystemIndex(java.lang.String id)
                                         throws IndexNotFoundException
Description copied from interface: Store
Get the system index associated with the given name

Specified by:
getSystemIndex in interface Store<E,java.lang.Long>
Parameters:
id - The index name we are looking for
Returns:
The associated system index
Throws:
IndexNotFoundException - If the index does not exist

getEntryId

public java.lang.Long getEntryId(java.lang.String dn)
                          throws java.lang.Exception
Specified by:
getEntryId in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

getEntryDn

public java.lang.String getEntryDn(java.lang.Long id)
                            throws java.lang.Exception
Specified by:
getEntryDn in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

getParentId

public java.lang.Long getParentId(java.lang.String dn)
                           throws java.lang.Exception
Gets the Long id of an entry's parent using the child entry's normalized DN. Note that the suffix entry returns 0, which does not map to any entry.

Specified by:
getParentId in interface Store<E,java.lang.Long>
Parameters:
dn - the normalized distinguished name of the child
Returns:
the id of the parent entry or zero if the suffix entry the normalized suffix DN string is used
Throws:
java.lang.Exception - on failures to access the underlying store

getParentId

public java.lang.Long getParentId(java.lang.Long childId)
                           throws java.lang.Exception
Specified by:
getParentId in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

getEntryUpdn

public java.lang.String getEntryUpdn(java.lang.Long id)
                              throws java.lang.Exception
Specified by:
getEntryUpdn in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

getEntryUpdn

public java.lang.String getEntryUpdn(java.lang.String dn)
                              throws java.lang.Exception
Specified by:
getEntryUpdn in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

count

public int count()
          throws java.lang.Exception
Specified by:
count in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

add

public void add(org.apache.directory.shared.ldap.entry.ServerEntry entry)
         throws java.lang.Exception
Add an entry into the store. TODO : We should be able to revert all the changes made to index if something went wrong. Also the index should auto-repair : if an entry does not exist in the Master table, then the index must be updated to reflect this.

Specified by:
add in interface Store<E,java.lang.Long>
Parameters:
entry - The entry to add
Throws:
java.lang.Exception - If the addition failed.

lookup

public org.apache.directory.shared.ldap.entry.ServerEntry lookup(java.lang.Long id)
                                                          throws java.lang.Exception
Specified by:
lookup in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

delete

public void delete(java.lang.Long id)
            throws java.lang.Exception
Delete the entry associated with a given Id

Specified by:
delete in interface Store<E,java.lang.Long>
Parameters:
id - The id of the entry to delete
Throws:
java.lang.Exception - If the deletion failed

list

public IndexCursor<java.lang.Long,E,java.lang.Long> list(java.lang.Long id)
                                                  throws java.lang.Exception
Gets an IndexEntry Cursor over the child nodes of an entry.

Specified by:
list in interface Store<E,java.lang.Long>
Parameters:
id - the id of the parent entry
Returns:
an IndexEntry Cursor over the child entries
Throws:
java.lang.Exception - on failures to access the underlying store

getChildCount

public int getChildCount(java.lang.Long id)
                  throws java.lang.Exception
Specified by:
getChildCount in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

getSuffix

public org.apache.directory.shared.ldap.name.DN getSuffix()
Specified by:
getSuffix in interface Store<E,java.lang.Long>

getUpSuffix

public org.apache.directory.shared.ldap.name.DN getUpSuffix()
Specified by:
getUpSuffix in interface Store<E,java.lang.Long>

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.String propertyValue)
                 throws java.lang.Exception
Specified by:
setProperty in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

getProperty

public java.lang.String getProperty(java.lang.String propertyName)
                             throws java.lang.Exception
Specified by:
getProperty in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

modify

public void modify(org.apache.directory.shared.ldap.name.DN dn,
                   org.apache.directory.shared.ldap.entry.ModificationOperation modOp,
                   org.apache.directory.shared.ldap.entry.ServerEntry mods)
            throws java.lang.Exception
Specified by:
modify in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

modify

public void modify(org.apache.directory.shared.ldap.name.DN dn,
                   java.util.List<org.apache.directory.shared.ldap.entry.Modification> mods)
            throws java.lang.Exception
Specified by:
modify in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

rename

public void rename(org.apache.directory.shared.ldap.name.DN dn,
                   org.apache.directory.shared.ldap.name.RDN newRdn,
                   boolean deleteOldRdn)
            throws java.lang.Exception
Changes the relative distinguished name of an entry specified by a distinguished name with the optional removal of the old RDN attribute value from the entry. Name changes propagate down as dn changes to the descendants of the entry where the RDN changed. An RDN change operation does not change parent child relationships. It merely propagates a name change at a point in the DIT where the RDN is changed. The change propagates down the subtree rooted at the distinguished name specified.

Specified by:
rename in interface Store<E,java.lang.Long>
Parameters:
dn - the normalized distinguished name of the entry to alter
newRdn - the new RDN to set
deleteOldRdn - whether or not to remove the old RDN attr/val
Throws:
java.lang.Exception - if there are any errors propagating the name changes

move

public void move(org.apache.directory.shared.ldap.name.DN oldChildDn,
                 org.apache.directory.shared.ldap.name.DN newParentDn,
                 org.apache.directory.shared.ldap.name.RDN newRdn,
                 boolean deleteOldRdn)
          throws java.lang.Exception
Specified by:
move in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

move

public void move(org.apache.directory.shared.ldap.name.DN oldChildDn,
                 org.apache.directory.shared.ldap.name.DN newParentDn)
          throws java.lang.Exception
Specified by:
move in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

setSchemaManager

public void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Parameters:
schemaManager - the schemaManager to set


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