org.apache.ldap.server.db
Interface Database

All Known Implementing Classes:
JdbmDatabase

public interface Database

A database for storing attributes.

Version:
$Rev: 164289 $
Author:
Apache Directory Project

Field Summary
static java.lang.String ALIAS_ATTRIBUTE
          The aliased Dn attribute name: aliasedObjectName for LDAP and aliasedEntryName or X.500.
static java.lang.String ALIAS_OBJECT
          The objectClass name for aliases: 'alias'
 
Method Summary
 void add(java.lang.String updn, javax.naming.Name dn, javax.naming.directory.Attributes entry)
          TODO Document me!
 void addIndexOn(org.apache.ldap.common.schema.AttributeType attribute)
          TODO Document me!
 void close()
          TODO Document me!
 int count()
          Gets the count of the total number of entries in the database.
 void delete(java.math.BigInteger id)
          TODO Document me!
 Index 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.math.BigInteger id)
          TODO Document me!
 java.lang.String getEntryDn(java.math.BigInteger id)
          TODO Document me!
 java.math.BigInteger getEntryId(java.lang.String dn)
          TODO Document me!
 java.lang.String getEntryUpdn(java.math.BigInteger id)
          Gets the user provided distinguished name.
 java.lang.String getEntryUpdn(java.lang.String dn)
          Gets the user provided distinguished name.
 Index getExistanceIndex()
          Gets the Index mapping the names of attributes as Strings to the BigInteger primary keys of entries containing one or more values of those attributes.
 Index getHierarchyIndex()
          Gets the Index mapping the BigInteger primary keys of parents to the BigInteger primary keys of their children.
 javax.naming.directory.Attributes getIndices(java.math.BigInteger id)
          TODO Document me!
 Index getNdnIndex()
          Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries.
 Index 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.
 java.math.BigInteger getParentId(java.math.BigInteger childId)
          TODO Document me!
 java.math.BigInteger getParentId(java.lang.String dn)
          TODO Document me!
 java.lang.String getProperty(java.lang.String key)
          TODO Document me!
 Index 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.
 javax.naming.Name getSuffix()
           
 javax.naming.directory.Attributes getSuffixEntry()
          TODO Document me!
 Index getSystemIndex(java.lang.String attribute)
          TODO Document me!
 java.util.Iterator getSystemIndices()
          TODO Document me!
 Index getUpdnIndex()
          Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries.
 Index getUserIndex(java.lang.String attribute)
          TODO Document me!
 java.util.Iterator getUserIndices()
          TODO Document me!
 boolean hasSystemIndexOn(java.lang.String attribute)
          TODO Document me!
 boolean hasUserIndexOn(java.lang.String attribute)
          TODO Document me!
 boolean isClosed()
          Checks to see if this BackingStore has been closed or shut down.
 javax.naming.NamingEnumeration list(java.math.BigInteger id)
          TODO Document me!
 javax.naming.directory.Attributes lookup(java.math.BigInteger id)
          TODO Document me!
 void modify(javax.naming.Name dn, int modOp, javax.naming.directory.Attributes mods)
          TODO Document me!
 void modify(javax.naming.Name dn, javax.naming.directory.ModificationItem[] mods)
          TODO Document me!
 void modifyRdn(javax.naming.Name dn, java.lang.String newRdn, boolean deleteOldRdn)
          TODO Document me!
 void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn)
          TODO Document me!
 void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn, java.lang.String newRdn, boolean deleteOldRdn)
          Moves a child from one location to another while changing the Rdn attribute used in the new location and optionally deleting the old Rdn attribute value pair.
 void setAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
          Sets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.
 void setExistanceIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
          Sets the attribute existance Index.
 void setHierarchyIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
          Sets the hierarchy Index.
 void setNdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
          Sets the normalized distinguished name Index.
 void setOneAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
          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 setProperty(java.lang.String key, java.lang.String value)
          TODO Document me!
 void setSubAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
          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 setUpdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
          Sets the user provided distinguished name Index.
 void sync()
          TODO Document me!
 

Field Detail

ALIAS_OBJECT

public static final java.lang.String ALIAS_OBJECT
The objectClass name for aliases: 'alias'

See Also:
Constant Field Values

ALIAS_ATTRIBUTE

public static final java.lang.String ALIAS_ATTRIBUTE
The aliased Dn attribute name: aliasedObjectName for LDAP and aliasedEntryName or X.500.

See Also:
Constant Field Values
Method Detail

addIndexOn

public void addIndexOn(org.apache.ldap.common.schema.AttributeType attribute)
                throws javax.naming.NamingException
TODO Document me!

Parameters:
attribute - TODO
Throws:
javax.naming.NamingException - TODO

hasUserIndexOn

public boolean hasUserIndexOn(java.lang.String attribute)
TODO Document me!

Parameters:
attribute - TODO
Returns:
TODO

hasSystemIndexOn

public boolean hasSystemIndexOn(java.lang.String attribute)
TODO Document me!

Parameters:
attribute - TODO
Returns:
TODO

getExistanceIndex

public Index getExistanceIndex()
Gets the Index mapping the names of attributes as Strings to the BigInteger primary keys of entries containing one or more values of those attributes.

Returns:
the existance Index

getHierarchyIndex

public Index getHierarchyIndex()
Gets the Index mapping the BigInteger primary keys of parents to the BigInteger primary keys of their children.

Returns:
the hierarchy Index

getUpdnIndex

public Index getUpdnIndex()
Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries.

Returns:
the user provided distinguished name Index

getNdnIndex

public Index getNdnIndex()
Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries.

Returns:
the normalized distinguished name Index

getOneAliasIndex

public Index 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.

Returns:
the one alias index

getSubAliasIndex

public Index 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.

Returns:
the sub alias index

getAliasIndex

public Index getAliasIndex()
Gets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.

Returns:
the index on the ALIAS_ATTRIBUTE

setAliasIndexOn

public void setAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
                     throws javax.naming.NamingException
Sets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would be the aliasedObjectName and for X.500 would be aliasedEntryName.

Parameters:
attrType - the index on the ALIAS_ATTRIBUTE
Throws:
javax.naming.NamingException

setExistanceIndexOn

public void setExistanceIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
                         throws javax.naming.NamingException
Sets the attribute existance Index.

Parameters:
attrType - the attribute existance Index
Throws:
javax.naming.NamingException

setHierarchyIndexOn

public void setHierarchyIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
                         throws javax.naming.NamingException
Sets the hierarchy Index.

Parameters:
attrType - the hierarchy Index
Throws:
javax.naming.NamingException

setUpdnIndexOn

public void setUpdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
                    throws javax.naming.NamingException
Sets the user provided distinguished name Index.

Parameters:
attrType - the updn Index
Throws:
javax.naming.NamingException

setNdnIndexOn

public void setNdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
                   throws javax.naming.NamingException
Sets the normalized distinguished name Index.

Parameters:
attrType - the ndn Index
Throws:
javax.naming.NamingException

setOneAliasIndexOn

public void setOneAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
                        throws javax.naming.NamingException
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.

Parameters:
attrType - a one level alias index
Throws:
javax.naming.NamingException

setSubAliasIndexOn

public void setSubAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
                        throws javax.naming.NamingException
Sets the alias index mapping relative entries with scope expanding alias descendents; this system index is used to dereference aliases on subtree scoped searches.

Parameters:
attrType - a subtree alias index
Throws:
javax.naming.NamingException

getUserIndex

public Index getUserIndex(java.lang.String attribute)
                   throws IndexNotFoundException
TODO Document me!

Parameters:
attribute - TODO
Returns:
TODO
Throws:
IndexNotFoundException - TODO

getSystemIndex

public Index getSystemIndex(java.lang.String attribute)
                     throws IndexNotFoundException
TODO Document me!

Parameters:
attribute - TODO
Returns:
TODO
Throws:
IndexNotFoundException - TODO

getEntryId

public java.math.BigInteger getEntryId(java.lang.String dn)
                                throws javax.naming.NamingException
TODO Document me!

Parameters:
dn - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

getEntryDn

public java.lang.String getEntryDn(java.math.BigInteger id)
                            throws javax.naming.NamingException
TODO Document me!

Parameters:
id - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

getParentId

public java.math.BigInteger getParentId(java.lang.String dn)
                                 throws javax.naming.NamingException
TODO Document me!

Parameters:
dn - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

getParentId

public java.math.BigInteger getParentId(java.math.BigInteger childId)
                                 throws javax.naming.NamingException
TODO Document me!

Parameters:
childId - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

getEntryUpdn

public java.lang.String getEntryUpdn(java.math.BigInteger id)
                              throws javax.naming.NamingException
Gets the user provided distinguished name.

Parameters:
id - the entry id
Returns:
the user provided distinguished name
Throws:
javax.naming.NamingException - if the updn index cannot be accessed

getEntryUpdn

public java.lang.String getEntryUpdn(java.lang.String dn)
                              throws javax.naming.NamingException
Gets the user provided distinguished name.

Parameters:
dn - the normalized distinguished name
Returns:
the user provided distinguished name
Throws:
javax.naming.NamingException - if the updn and ndn indices cannot be accessed

add

public void add(java.lang.String updn,
                javax.naming.Name dn,
                javax.naming.directory.Attributes entry)
         throws javax.naming.NamingException
TODO Document me!

Parameters:
updn - the user provided distinguished name of the entry
dn - TODO
entry - TODO
Throws:
javax.naming.NamingException - TODO

lookup

public javax.naming.directory.Attributes lookup(java.math.BigInteger id)
                                         throws javax.naming.NamingException
TODO Document me!

Parameters:
id - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

delete

public void delete(java.math.BigInteger id)
            throws javax.naming.NamingException
TODO Document me!

Parameters:
id - TODO
Throws:
javax.naming.NamingException - TODO

list

public javax.naming.NamingEnumeration list(java.math.BigInteger id)
                                    throws javax.naming.NamingException
TODO Document me!

Parameters:
id - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

getChildCount

public int getChildCount(java.math.BigInteger id)
                  throws javax.naming.NamingException
TODO Document me!

Parameters:
id - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

getSuffix

public javax.naming.Name getSuffix()
Returns:
TODO

getSuffixEntry

public javax.naming.directory.Attributes getSuffixEntry()
                                                 throws javax.naming.NamingException
TODO Document me!

Returns:
TODO
Throws:
javax.naming.NamingException - TODO

sync

public void sync()
          throws javax.naming.NamingException
TODO Document me!

Throws:
javax.naming.NamingException - TODO

close

public void close()
           throws javax.naming.NamingException
TODO Document me!

Throws:
javax.naming.NamingException - TODO

isClosed

public boolean isClosed()
Checks to see if this BackingStore has been closed or shut down. Operations against closed BackingStores will fail.

Returns:
true if shut down, false otherwise

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
                 throws javax.naming.NamingException
TODO Document me!

Parameters:
key - TODO
value - TODO
Throws:
javax.naming.NamingException - TODO

getProperty

public java.lang.String getProperty(java.lang.String key)
                             throws javax.naming.NamingException
TODO Document me!

Parameters:
key - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

getUserIndices

public java.util.Iterator getUserIndices()
TODO Document me!

Returns:
TODO

getSystemIndices

public java.util.Iterator getSystemIndices()
TODO Document me!

Returns:
TODO

getIndices

public javax.naming.directory.Attributes getIndices(java.math.BigInteger id)
                                             throws javax.naming.NamingException
TODO Document me!

Parameters:
id - TODO
Returns:
TODO
Throws:
javax.naming.NamingException - TODO

modify

public void modify(javax.naming.Name dn,
                   int modOp,
                   javax.naming.directory.Attributes mods)
            throws javax.naming.NamingException
TODO Document me!

Parameters:
dn - TODO
modOp - TODO
mods - TODO
Throws:
javax.naming.NamingException - TODO

modify

public void modify(javax.naming.Name dn,
                   javax.naming.directory.ModificationItem[] mods)
            throws javax.naming.NamingException
TODO Document me!

Parameters:
dn - TODO
mods - TODO
Throws:
javax.naming.NamingException - TODO

modifyRdn

public void modifyRdn(javax.naming.Name dn,
                      java.lang.String newRdn,
                      boolean deleteOldRdn)
               throws javax.naming.NamingException
TODO Document me!

Parameters:
dn - TODO
newRdn - TODO
deleteOldRdn - TODO
Throws:
javax.naming.NamingException - TODO

move

public void move(javax.naming.Name oldChildDn,
                 javax.naming.Name newParentDn)
          throws javax.naming.NamingException
TODO Document me!

Parameters:
oldChildDn - TODO
newParentDn - TODO
Throws:
javax.naming.NamingException - TODO

move

public void move(javax.naming.Name oldChildDn,
                 javax.naming.Name newParentDn,
                 java.lang.String newRdn,
                 boolean deleteOldRdn)
          throws javax.naming.NamingException
Moves a child from one location to another while changing the Rdn attribute used in the new location and optionally deleting the old Rdn attribute value pair.

Parameters:
oldChildDn - the normalized child dn to move
newParentDn - the normalized new parent dn to move the child to
newRdn - the new rdn of the child at its new location
deleteOldRdn - switch to remove the old rdn attribute/value pair
Throws:
javax.naming.NamingException - if a database failure results

count

public int count()
          throws javax.naming.NamingException
Gets the count of the total number of entries in the database. TODO shouldn't this be a BigInteger instead of an int?

Returns:
the number of entries in the database
Throws:
javax.naming.NamingException - if there is a failure to read the count


Copyright © 2002-2005 . All Rights Reserved.