org.apache.directory.server.core.partition.ldif
Class LdifStore<E>

java.lang.Object
  extended by org.apache.directory.server.core.partition.ldif.LdifStore<E>
All Implemented Interfaces:
Store<E,java.lang.Long>

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

TODO LdifStore.

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

Constructor Summary
LdifStore()
           
 
Method Summary
 void add(org.apache.directory.shared.ldap.entry.ServerEntry entry)
           
 void addIndex(Index<?,E,java.lang.Long> index)
           
 int count()
           
 void delete(java.lang.Long id)
           
 void destroy()
           
 Index<java.lang.String,E,java.lang.Long> getAliasIndex()
           
 int getCacheSize()
           
 int getChildCount(java.lang.Long id)
           
 java.lang.Long getDefaultId()
           
 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 arg0)
           
 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)
           
 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 arg0)
           
 java.lang.Long getParentId(java.lang.String 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)
           
 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)
           
 java.util.Set<Index<?,E,java.lang.Long>> getUserIndices()
           
 java.io.File getWorkingDirectory()
           
 boolean hasIndexOn(java.lang.String id)
           
 boolean hasSystemIndexOn(java.lang.String id)
           
 boolean hasUserIndexOn(java.lang.String id)
           
 void init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
           
 boolean isInitialized()
           
 boolean isSyncOnWrite()
           
 IndexCursor<java.lang.Long,E,java.lang.Long> list(java.lang.Long id)
           
 void loadConfig()
          loads the configuration into the DIT from the file system
 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)
           
 void setAliasIndex(Index<java.lang.String,E,java.lang.Long> index)
           
 void setCacheSize(int size)
           
 void setEntryCsnIndex(Index<java.lang.String,E,java.lang.Long> index)
           
 void setEntryUuidIndex(Index<java.lang.String,E,java.lang.Long> index)
           
 void setName(java.lang.String name)
           
 void setNdnIndex(Index<java.lang.String,E,java.lang.Long> index)
           
 void setObjectClassIndex(Index<java.lang.String,E,java.lang.Long> index)
           
 void setOneAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
           
 void setOneLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
           
 void setPresenceIndex(Index<java.lang.String,E,java.lang.Long> index)
           
 void setProperty(java.lang.String propertyName, java.lang.String propertyValue)
           
 void setSubAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
           
 void setSubLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
           
 void setSuffixDn(java.lang.String suffixDn)
           
 void setSyncOnWrite(boolean isSyncOnWrite)
           
 void setUpdnIndex(Index<java.lang.String,E,java.lang.Long> index)
           
 void setUserIndices(java.util.Set<Index<?,E,java.lang.Long>> userIndices)
           
 void setWorkingDirectory(java.io.File workingDirectory)
           
 void sync()
           
 java.util.Iterator<java.lang.String> systemIndices()
           
 java.util.Iterator<java.lang.String> userIndices()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdifStore

public LdifStore()
Method Detail

init

public void init(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
          throws java.lang.Exception
Specified by:
init in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

loadConfig

public void loadConfig()
                throws java.lang.Exception
loads the configuration into the DIT from the file system

Throws:
java.lang.Exception

add

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

delete

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

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy 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

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

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

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
Specified by:
rename in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

sync

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

setWorkingDirectory

public void setWorkingDirectory(java.io.File workingDirectory)
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>

setSyncOnWrite

public void setSyncOnWrite(boolean isSyncOnWrite)
Specified by:
setSyncOnWrite in interface Store<E,java.lang.Long>

isSyncOnWrite

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

addIndex

public void addIndex(Index<?,E,java.lang.Long> index)
              throws java.lang.Exception
Specified by:
addIndex 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

getAliasIndex

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

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

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

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

getEntryUpdn

public java.lang.String getEntryUpdn(java.lang.Long arg0)
                              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

getName

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

getNdnIndex

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

getOneAliasIndex

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

getOneLevelIndex

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

getParentId

public java.lang.Long getParentId(java.lang.Long arg0)
                           throws java.lang.Exception
Specified by:
getParentId 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
Specified by:
getParentId in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

getPresenceIndex

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

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

getSubAliasIndex

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

getSubLevelIndex

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

getIndex

public Index<?,E,java.lang.Long> getIndex(java.lang.String id)
                                   throws IndexNotFoundException
Specified by:
getIndex in interface Store<E,java.lang.Long>
Throws:
IndexNotFoundException

getSystemIndex

public Index<?,E,java.lang.Long> getSystemIndex(java.lang.String id)
                                         throws IndexNotFoundException
Specified by:
getSystemIndex in interface Store<E,java.lang.Long>
Throws:
IndexNotFoundException

getUpdnIndex

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

getUserIndex

public Index<?,E,java.lang.Long> getUserIndex(java.lang.String id)
                                       throws IndexNotFoundException
Specified by:
getUserIndex in interface Store<E,java.lang.Long>
Throws:
IndexNotFoundException

getUserIndices

public java.util.Set<Index<?,E,java.lang.Long>> getUserIndices()
Specified by:
getUserIndices in interface Store<E,java.lang.Long>

hasIndexOn

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

hasSystemIndexOn

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

hasUserIndexOn

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

isInitialized

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

list

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

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

setAliasIndex

public void setAliasIndex(Index<java.lang.String,E,java.lang.Long> index)
                   throws java.lang.Exception
Specified by:
setAliasIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

setName

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

setNdnIndex

public void setNdnIndex(Index<java.lang.String,E,java.lang.Long> index)
                 throws java.lang.Exception
Specified by:
setNdnIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

setOneAliasIndex

public void setOneAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
                      throws java.lang.Exception
Specified by:
setOneAliasIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

setOneLevelIndex

public void setOneLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
                      throws java.lang.Exception
Specified by:
setOneLevelIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

setPresenceIndex

public void setPresenceIndex(Index<java.lang.String,E,java.lang.Long> index)
                      throws java.lang.Exception
Specified by:
setPresenceIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

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

setSubAliasIndex

public void setSubAliasIndex(Index<java.lang.Long,E,java.lang.Long> index)
                      throws java.lang.Exception
Specified by:
setSubAliasIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

setSubLevelIndex

public void setSubLevelIndex(Index<java.lang.Long,E,java.lang.Long> index)
                      throws java.lang.Exception
Specified by:
setSubLevelIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

setUpdnIndex

public void setUpdnIndex(Index<java.lang.String,E,java.lang.Long> index)
                  throws java.lang.Exception
Specified by:
setUpdnIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

systemIndices

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

userIndices

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

getCacheSize

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

getEntryCsnIndex

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

getEntryUuidIndex

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

getObjectClassIndex

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

getSuffix

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

getSuffixDn

public java.lang.String getSuffixDn()
Specified by:
getSuffixDn 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>

setCacheSize

public void setCacheSize(int size)
Specified by:
setCacheSize in interface Store<E,java.lang.Long>

setUserIndices

public void setUserIndices(java.util.Set<Index<?,E,java.lang.Long>> userIndices)
Specified by:
setUserIndices in interface Store<E,java.lang.Long>

setSuffixDn

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

setEntryCsnIndex

public void setEntryCsnIndex(Index<java.lang.String,E,java.lang.Long> index)
                      throws java.lang.Exception
Specified by:
setEntryCsnIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

setEntryUuidIndex

public void setEntryUuidIndex(Index<java.lang.String,E,java.lang.Long> index)
                       throws java.lang.Exception
Specified by:
setEntryUuidIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

setObjectClassIndex

public void setObjectClassIndex(Index<java.lang.String,E,java.lang.Long> index)
                         throws java.lang.Exception
Specified by:
setObjectClassIndex in interface Store<E,java.lang.Long>
Throws:
java.lang.Exception

getDefaultId

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


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.