org.apache.directory.server.core.partition.ldif
Class LdifPartition

java.lang.Object
  extended by org.apache.directory.server.core.partition.AbstractPartition
      extended by org.apache.directory.server.core.partition.impl.btree.BTreePartition<java.lang.Long>
          extended by org.apache.directory.server.core.partition.ldif.LdifPartition
All Implemented Interfaces:
Partition

public class LdifPartition
extends BTreePartition<java.lang.Long>

A LDIF based partition. Data are stored on disk as LDIF, following this organisation :

  • each entry is associated with a file, postfixed with LDIF
  • each entry having at least one child will have a directory created using its name. The root is the partition's suffix.
    So for instance, we may have on disk :
     /ou=example,ou=system.ldif
     /ou=example,ou=system/
       |
       +--> cn=test.ldif
            cn=test/
               |
               +--> cn=another test.ldif
                    ...
     


    In this exemple, the partition's suffix is ou=example,ou=system.

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

    Field Summary
     
    Fields inherited from class org.apache.directory.server.core.partition.impl.btree.BTreePartition
    cacheSize, contextEntry, id, optimizer, schemaManager, searchEngine, suffix, SYS_INDEX_OIDS
     
    Fields inherited from class org.apache.directory.server.core.partition.AbstractPartition
    initialized
     
    Constructor Summary
    LdifPartition()
              Creates a new instance of LdifPartition.
     
    Method Summary
     void add(AddOperationContext addContext)
              Adds an entry to this ContextPartition.
     void addIndexOn(Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
               
     void bind(BindOperationContext bindContext)
              Represents a bind operation issued to authenticate a client.
     int count()
              Gets the count of the total number of entries in the database.
     void delete(java.lang.Long id)
              
    protected  void doDestroy()
              Override this method to put your initialization code.
    protected  void doInit()
              Override this method to put your initialization code.
     Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getAliasIndex()
              Gets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.
     int getChildCount(java.lang.Long id)
               
     org.apache.directory.shared.ldap.entry.Entry getContextEntry()
               
     java.lang.String getEntryDn(java.lang.Long id)
               
     java.lang.Long getEntryId(java.lang.String dn)
               
     java.lang.String getEntryUpdn(java.lang.Long id)
              Gets the user provided distinguished name.
     java.lang.String getEntryUpdn(java.lang.String dn)
              Gets the user provided distinguished name.
     java.lang.String getId()
              Gets the unique identifier for this partition.
     Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getNdnIndex()
              Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries.
     Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getOneAliasIndex()
              Gets the alias index mapping parent entries with scope expanding aliases children one level below them; this system index is used to dereference aliases on one/single level scoped searches.
     Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getOneLevelIndex()
              Gets the Index mapping the primary keys of parents to the primary keys of their children.
     java.lang.Long getParentId(java.lang.Long childId)
               
     java.lang.Long getParentId(java.lang.String dn)
               
     Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getPresenceIndex()
               
     java.lang.String getProperty(java.lang.String propertyName)
               
     Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getSubAliasIndex()
              Gets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches.
     Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getSubLevelIndex()
              Gets the Index mapping the primary keys of ancestors to the primary keys of their descendants.
     Index<?,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getSystemIndex(java.lang.String id)
               
     java.util.Iterator<java.lang.String> getSystemIndices()
               
     Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getUpdnIndex()
              Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries.
     Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getUserIndex(java.lang.String id)
               
     java.util.Iterator<java.lang.String> getUserIndices()
               
     java.lang.String getWorkingDirectory()
               
     Partition getWrappedPartition()
               
     boolean hasSystemIndexOn(java.lang.String id)
               
     boolean hasUserIndexOn(java.lang.String id)
               
     boolean isInitialized()
              Returns true if this context partition is initialized successfully.
     IndexCursor<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> list(java.lang.Long id)
               
     ClonedServerEntry lookup(java.lang.Long id)
               
     void modify(ModifyOperationContext modifyContext)
              Modifies an entry by adding, removing or replacing a set of attributes.
     void move(MoveOperationContext moveContext)
              Transplants a child entry, to a position in the namespace under a new parent entry.
     void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
              Transplants a child entry, to a position in the namespace under a new parent entry and changes the RN of the child entry which can optionally have its old RN attributes removed.
     void rename(RenameOperationContext renameContext)
              Modifies an entry by changing its relative name.
     void setAliasIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
              Sets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.
     void setContextEntry(java.lang.String contextEntry)
               
     void setId(java.lang.String id)
              Sets the unique identifier for this partition.
     void setLdifScanInterval(int ldifScanInterval)
              the interval at which the config directory containing LDIF files should be scanned, default value is 10 min
     void setNdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
              Sets the normalized distinguished name Index.
     void setOneAliasIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
              Sets the alias index mapping parent entries with scope expanding aliases children one level below them; this system index is used to dereference aliases on one/single level scoped searches.
     void setOneLevelIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
              Sets the one level Index.
     void setPresenceIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
              Sets the attribute existence Index.
     void setProperty(java.lang.String propertyName, java.lang.String propertyValue)
               
     void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
              Sets the schema manager assigned to this Partition.
     void setSubAliasIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
              Sets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches.
     void setSuffix(java.lang.String suffix)
              Sets the user provided suffix for this Partition as a String.
     void setUpdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
              Sets the user provided distinguished name Index.
     void setWorkingDirectory(java.lang.String workingDirectory)
               
     void setWrappedPartition(AvlPartition wrappedPartition)
               
     void sync()
              This method does nothing by default.
     void unbind(UnbindOperationContext unbindContext)
              Represents an unbind operation issued by an authenticated client.
     
    Methods inherited from class org.apache.directory.server.core.partition.impl.btree.BTreePartition
    addIndexedAttributes, delete, getCacheSize, getIndexedAttributes, getPartitionDir, getSchemaManager, getSearchEngine, getSuffix, getSuffixDn, hasEntry, list, lookup, search, setCacheSize, setIndexedAttributes, setPartitionDir
     
    Methods inherited from class org.apache.directory.server.core.partition.AbstractPartition
    destroy, initialize
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    LdifPartition

    public LdifPartition()
    Creates a new instance of LdifPartition.

    Method Detail

    doInit

    protected void doInit()
                   throws java.lang.Exception
    Override this method to put your initialization code.

    Specified by:
    doInit in class AbstractPartition
    Throws:
    java.lang.Exception

    add

    public void add(AddOperationContext addContext)
             throws java.lang.Exception
    Adds an entry to this ContextPartition.

    Specified by:
    add in interface Partition
    Specified by:
    add in class BTreePartition<java.lang.Long>
    Parameters:
    addContext - the context used to add and entry to this ContextPartition
    Throws:
    java.lang.Exception - if there are any problems

    bind

    public void bind(BindOperationContext bindContext)
              throws java.lang.Exception
    Represents a bind operation issued to authenticate a client. Partitions need not support this operation. This operation is here to enable those interested in implementing virtual directories with ApacheDS.

    Parameters:
    bindContext - the bind context, containing all the needed informations to bind
    Throws:
    java.lang.Exception - if something goes wrong

    delete

    public void delete(java.lang.Long id)
                throws java.lang.Exception

    Specified by:
    delete in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    modify

    public void modify(ModifyOperationContext modifyContext)
                throws java.lang.Exception
    Modifies an entry by adding, removing or replacing a set of attributes.

    Specified by:
    modify in interface Partition
    Specified by:
    modify in class BTreePartition<java.lang.Long>
    Parameters:
    modifyContext - The context containing the modification operation to perform on the entry which is one of constants specified by the DirContext interface: ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE.
    Throws:
    java.lang.Exception - if there are any problems
    See Also:
    DirContext, DirContext.ADD_ATTRIBUTE, DirContext.REMOVE_ATTRIBUTE, DirContext.REPLACE_ATTRIBUTE

    move

    public void move(MoveOperationContext moveContext)
              throws java.lang.Exception
    Transplants a child entry, to a position in the namespace under a new parent entry.

    Specified by:
    move in interface Partition
    Specified by:
    move in class BTreePartition<java.lang.Long>
    Parameters:
    moveContext - The context containing the DNs to move
    Throws:
    java.lang.Exception - if there are any problems

    moveAndRename

    public void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
                       throws java.lang.Exception
    Transplants a child entry, to a position in the namespace under a new parent entry and changes the RN of the child entry which can optionally have its old RN attributes removed. The removal of old RN attributes may not make sense in all namespaces. If the concept is undefined in a namespace this parameters is ignored. An example of a namespace where this parameter is significant is the LDAP namespace.

    Specified by:
    moveAndRename in interface Partition
    Specified by:
    moveAndRename in class BTreePartition<java.lang.Long>
    Parameters:
    moveAndRenameContext - The context contain all the information about the modifyDN operation
    Throws:
    java.lang.Exception - if there are any problems

    rename

    public void rename(RenameOperationContext renameContext)
                throws java.lang.Exception
    Modifies an entry by changing its relative name. Optionally attributes associated with the old relative name can be removed from the entry. This makes sense only in certain namespaces like LDAP and will be ignored if it is irrelevant.

    Specified by:
    rename in interface Partition
    Specified by:
    rename in class BTreePartition<java.lang.Long>
    Parameters:
    renameContext - the modify DN context
    Throws:
    java.lang.Exception - if there are any problems

    addIndexOn

    public void addIndexOn(Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
                    throws java.lang.Exception
    Specified by:
    addIndexOn in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    count

    public int count()
              throws java.lang.Exception
    Description copied from class: BTreePartition
    Gets the count of the total number of entries in the database. TODO shouldn't this be a BigInteger instead of an int?

    Specified by:
    count in class BTreePartition<java.lang.Long>
    Returns:
    the number of entries in the database
    Throws:
    java.lang.Exception - if there is a failure to read the count

    doDestroy

    protected void doDestroy()
                      throws java.lang.Exception
    Description copied from class: AbstractPartition
    Override this method to put your initialization code.

    Specified by:
    doDestroy in class AbstractPartition
    Throws:
    java.lang.Exception

    getAliasIndex

    public Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getAliasIndex()
    Description copied from class: BTreePartition
    Gets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.

    Specified by:
    getAliasIndex in class BTreePartition<java.lang.Long>
    Returns:
    the index on the ALIAS_ATTRIBUTE

    getChildCount

    public int getChildCount(java.lang.Long id)
                      throws java.lang.Exception
    Specified by:
    getChildCount in class BTreePartition<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 class BTreePartition<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 class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    getEntryUpdn

    public java.lang.String getEntryUpdn(java.lang.Long id)
                                  throws java.lang.Exception
    Description copied from class: BTreePartition
    Gets the user provided distinguished name.

    Specified by:
    getEntryUpdn in class BTreePartition<java.lang.Long>
    Parameters:
    id - the entry id
    Returns:
    the user provided distinguished name
    Throws:
    java.lang.Exception - if the updn index cannot be accessed

    getEntryUpdn

    public java.lang.String getEntryUpdn(java.lang.String dn)
                                  throws java.lang.Exception
    Description copied from class: BTreePartition
    Gets the user provided distinguished name.

    Specified by:
    getEntryUpdn in class BTreePartition<java.lang.Long>
    Parameters:
    dn - the normalized distinguished name
    Returns:
    the user provided distinguished name
    Throws:
    java.lang.Exception - if the updn and ndn indices cannot be accessed

    getNdnIndex

    public Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getNdnIndex()
    Description copied from class: BTreePartition
    Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries.

    Specified by:
    getNdnIndex in class BTreePartition<java.lang.Long>
    Returns:
    the normalized distinguished name Index

    getOneAliasIndex

    public Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getOneAliasIndex()
    Description copied from class: BTreePartition
    Gets the alias index mapping parent entries with scope expanding aliases children one level below them; this system index is used to dereference aliases on one/single level scoped searches.

    Specified by:
    getOneAliasIndex in class BTreePartition<java.lang.Long>
    Returns:
    the one alias index

    getOneLevelIndex

    public Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getOneLevelIndex()
    Description copied from class: BTreePartition
    Gets the Index mapping the primary keys of parents to the primary keys of their children.

    Specified by:
    getOneLevelIndex in class BTreePartition<java.lang.Long>
    Returns:
    the one level Index

    getParentId

    public java.lang.Long getParentId(java.lang.Long childId)
                               throws java.lang.Exception
    Specified by:
    getParentId in class BTreePartition<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 class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    getPresenceIndex

    public Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getPresenceIndex()
    Specified by:
    getPresenceIndex in class BTreePartition<java.lang.Long>

    getProperty

    public java.lang.String getProperty(java.lang.String propertyName)
                                 throws java.lang.Exception
    Specified by:
    getProperty in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    getSubAliasIndex

    public Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getSubAliasIndex()
    Description copied from class: BTreePartition
    Gets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches.

    Specified by:
    getSubAliasIndex in class BTreePartition<java.lang.Long>
    Returns:
    the sub alias index

    getSubLevelIndex

    public Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getSubLevelIndex()
    Description copied from class: BTreePartition
    Gets the Index mapping the primary keys of ancestors to the primary keys of their descendants.

    Specified by:
    getSubLevelIndex in class BTreePartition<java.lang.Long>
    Returns:
    the sub tree level Index

    getSystemIndex

    public Index<?,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getSystemIndex(java.lang.String id)
                                                                                              throws java.lang.Exception
    Specified by:
    getSystemIndex in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    getSystemIndices

    public java.util.Iterator<java.lang.String> getSystemIndices()
    Specified by:
    getSystemIndices in class BTreePartition<java.lang.Long>

    getUpdnIndex

    public Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getUpdnIndex()
    Description copied from class: BTreePartition
    Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries.

    Specified by:
    getUpdnIndex in class BTreePartition<java.lang.Long>
    Returns:
    the user provided distinguished name Index

    getUserIndex

    public Index<? extends java.lang.Object,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> getUserIndex(java.lang.String id)
                                                                                                                     throws java.lang.Exception
    Specified by:
    getUserIndex in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    getUserIndices

    public java.util.Iterator<java.lang.String> getUserIndices()
    Specified by:
    getUserIndices in class BTreePartition<java.lang.Long>

    hasSystemIndexOn

    public boolean hasSystemIndexOn(java.lang.String id)
                             throws java.lang.Exception
    Specified by:
    hasSystemIndexOn in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    hasUserIndexOn

    public boolean hasUserIndexOn(java.lang.String id)
                           throws java.lang.Exception
    Specified by:
    hasUserIndexOn in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    isInitialized

    public boolean isInitialized()
    Description copied from class: AbstractPartition
    Returns true if this context partition is initialized successfully.

    Specified by:
    isInitialized in interface Partition
    Overrides:
    isInitialized in class AbstractPartition
    Returns:
    true if the partition is initialized, false otherwise

    list

    public IndexCursor<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> list(java.lang.Long id)
                                                                                                       throws java.lang.Exception
    Specified by:
    list in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    lookup

    public ClonedServerEntry lookup(java.lang.Long id)
                             throws java.lang.Exception
    Specified by:
    lookup in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception

    setAliasIndexOn

    public void setAliasIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
                         throws java.lang.Exception
    Description copied from class: BTreePartition
    Sets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.

    Specified by:
    setAliasIndexOn in class BTreePartition<java.lang.Long>
    Parameters:
    index - the index on the ALIAS_ATTRIBUTE
    Throws:
    java.lang.Exception - if there is a problem setting up the index

    setNdnIndexOn

    public void setNdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
                       throws java.lang.Exception
    Description copied from class: BTreePartition
    Sets the normalized distinguished name Index.

    Specified by:
    setNdnIndexOn in class BTreePartition<java.lang.Long>
    Parameters:
    index - the ndn Index
    Throws:
    java.lang.Exception - if there is a problem setting up the index

    setOneAliasIndexOn

    public void setOneAliasIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
                            throws java.lang.Exception
    Description copied from class: BTreePartition
    Sets the alias index mapping parent entries with scope expanding aliases children one level below them; this system index is used to dereference aliases on one/single level scoped searches.

    Specified by:
    setOneAliasIndexOn in class BTreePartition<java.lang.Long>
    Parameters:
    index - a one level alias index
    Throws:
    java.lang.Exception - if there is a problem setting up the index

    setOneLevelIndexOn

    public void setOneLevelIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
                            throws java.lang.Exception
    Description copied from class: BTreePartition
    Sets the one level Index.

    Specified by:
    setOneLevelIndexOn in class BTreePartition<java.lang.Long>
    Parameters:
    index - the one level Index
    Throws:
    java.lang.Exception - if there is a problem setting up the index

    setPresenceIndexOn

    public void setPresenceIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
                            throws java.lang.Exception
    Description copied from class: BTreePartition
    Sets the attribute existence Index.

    Specified by:
    setPresenceIndexOn in class BTreePartition<java.lang.Long>
    Parameters:
    index - the attribute existence Index
    Throws:
    java.lang.Exception - if there is a problem setting up the index

    setProperty

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

    setSchemaManager

    public void setSchemaManager(org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
    Description copied from class: BTreePartition
    Sets the schema manager assigned to this Partition.

    Specified by:
    setSchemaManager in interface Partition
    Overrides:
    setSchemaManager in class BTreePartition<java.lang.Long>

    setSubAliasIndexOn

    public void setSubAliasIndexOn(Index<java.lang.Long,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
                            throws java.lang.Exception
    Description copied from class: BTreePartition
    Sets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches.

    Specified by:
    setSubAliasIndexOn in class BTreePartition<java.lang.Long>
    Parameters:
    index - a subtree alias index
    Throws:
    java.lang.Exception - if there is a problem setting up the index

    setUpdnIndexOn

    public void setUpdnIndexOn(Index<java.lang.String,org.apache.directory.shared.ldap.entry.ServerEntry,java.lang.Long> index)
                        throws java.lang.Exception
    Description copied from class: BTreePartition
    Sets the user provided distinguished name Index.

    Specified by:
    setUpdnIndexOn in class BTreePartition<java.lang.Long>
    Parameters:
    index - the updn Index
    Throws:
    java.lang.Exception - if there is a problem setting up the index

    sync

    public void sync()
              throws java.lang.Exception
    Description copied from class: AbstractPartition
    This method does nothing by default.

    Specified by:
    sync in interface Partition
    Specified by:
    sync in class BTreePartition<java.lang.Long>
    Throws:
    java.lang.Exception - if buffers cannot be flushed to disk

    unbind

    public void unbind(UnbindOperationContext unbindContext)
                throws java.lang.Exception
    Description copied from interface: Partition
    Represents an unbind operation issued by an authenticated client. Partitions need not support this operation. This operation is here to enable those interested in implementing virtual directories with ApacheDS.

    Parameters:
    unbindContext - the context used to unbind
    Throws:
    java.lang.Exception - if something goes wrong

    getId

    public java.lang.String getId()
    Description copied from class: BTreePartition
    Gets the unique identifier for this partition.

    Specified by:
    getId in interface Partition
    Overrides:
    getId in class BTreePartition<java.lang.Long>
    Returns:
    the unique identifier for this partition

    setId

    public void setId(java.lang.String id)
    Description copied from class: BTreePartition
    Sets the unique identifier for this partition.

    Specified by:
    setId in interface Partition
    Overrides:
    setId in class BTreePartition<java.lang.Long>
    Parameters:
    id - the unique identifier for this partition

    setSuffix

    public void setSuffix(java.lang.String suffix)
                   throws org.apache.directory.shared.ldap.exception.LdapInvalidDnException
    Description copied from class: BTreePartition
    Sets the user provided suffix for this Partition as a String.

    Specified by:
    setSuffix in interface Partition
    Overrides:
    setSuffix in class BTreePartition<java.lang.Long>
    Parameters:
    suffix - the suffix String for this Partition.
    Throws:
    org.apache.directory.shared.ldap.exception.LdapInvalidDnException - if the suffix does not conform to LDAP DN syntax

    setLdifScanInterval

    public void setLdifScanInterval(int ldifScanInterval)
    the interval at which the config directory containing LDIF files should be scanned, default value is 10 min

    Parameters:
    ldifScanInterval - the scan interval time in minutes

    getWorkingDirectory

    public java.lang.String getWorkingDirectory()
    Returns:
    the workingDirectory

    setWorkingDirectory

    public void setWorkingDirectory(java.lang.String workingDirectory)
    Parameters:
    workingDirectory - the workingDirectory to set

    getContextEntry

    public org.apache.directory.shared.ldap.entry.Entry getContextEntry()
    Returns:
    the contextEntry

    setContextEntry

    public void setContextEntry(java.lang.String contextEntry)
                         throws org.apache.directory.shared.ldap.ldif.LdapLdifException
    Parameters:
    contextEntry - the contextEntry to set
    Throws:
    org.apache.directory.shared.ldap.ldif.LdapLdifException

    getWrappedPartition

    public Partition getWrappedPartition()
    Returns:
    the wrappedPartition

    setWrappedPartition

    public void setWrappedPartition(AvlPartition wrappedPartition)
    Parameters:
    wrappedPartition - the wrappedPartition to set


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