|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ldap.server.partition.impl.btree.BTreeDirectoryPartition
org.apache.ldap.server.partition.impl.btree.jdbm.JdbmDirectoryPartition
public class JdbmDirectoryPartition
A DirectoryPartition
that stores entries in
JDBM database.
Field Summary |
---|
Fields inherited from interface org.apache.ldap.server.partition.DirectoryPartition |
---|
ALIAS_ATTRIBUTE, ALIAS_OBJECT |
Constructor Summary | |
---|---|
JdbmDirectoryPartition()
Creates a store based on JDBM B+Trees. |
Method Summary | |
---|---|
void |
add(java.lang.String updn,
javax.naming.Name dn,
javax.naming.directory.Attributes entry)
Adds an entry to this ContextPartition. |
void |
addIndexOn(org.apache.ldap.common.schema.AttributeType spec)
|
int |
count()
Gets the count of the total number of entries in the database. |
void |
delete(java.math.BigInteger id)
|
void |
destroy()
Deinitialized this partition. |
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)
|
java.lang.String |
getEntryDn(java.math.BigInteger id)
|
java.math.BigInteger |
getEntryId(java.lang.String dn)
|
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()
|
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)
|
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)
|
java.math.BigInteger |
getParentId(java.lang.String dn)
|
java.lang.String |
getProperty(java.lang.String propertyName)
|
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(boolean normalized)
Gets the distinguished/absolute name of the suffix for all entries stored within this ContextPartition. |
javax.naming.directory.Attributes |
getSuffixEntry()
|
Index |
getSystemIndex(java.lang.String indexName)
|
java.util.Iterator |
getSystemIndices()
|
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)
|
java.util.Iterator |
getUserIndices()
|
boolean |
hasSystemIndexOn(java.lang.String attribute)
|
boolean |
hasUserIndexOn(java.lang.String attribute)
|
void |
init(DirectoryServiceConfiguration factoryCfg,
DirectoryPartitionConfiguration cfg)
Initializes this partition. |
boolean |
isInitialized()
Checks to see if this partition is initialized or not. |
javax.naming.NamingEnumeration |
list(java.math.BigInteger id)
|
javax.naming.directory.Attributes |
lookup(java.math.BigInteger id)
|
void |
modify(javax.naming.Name dn,
int modOp,
javax.naming.directory.Attributes mods)
Modifies an entry by adding, removing or replacing a set of attributes. |
void |
modify(javax.naming.Name dn,
javax.naming.directory.ModificationItem[] mods)
Modifies an entry by using a combination of adds, removes or replace operations using a set of ModificationItems. |
void |
modifyRn(javax.naming.Name dn,
java.lang.String newRdn,
boolean deleteOldRdn)
Changes the relative distinuished name of an entry specified by a distinguished name with the optional removal of the old Rdn attribute value from the entry. |
void |
move(javax.naming.Name oldChildDn,
javax.naming.Name newParentDn)
Transplants a child entry, to a position in the namespace under a new parent entry. |
void |
move(javax.naming.Name oldChildDn,
javax.naming.Name newParentDn,
java.lang.String newRdn,
boolean deleteOldRdn)
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 |
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 propertyName,
java.lang.String propertyValue)
|
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()
Flushes any changes made to this partition now. |
Methods inherited from class org.apache.ldap.server.partition.impl.btree.BTreeDirectoryPartition |
---|
delete, getSearchEngine, hasEntry, inspect, isSuffix, list, lookup, lookup, search |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbmDirectoryPartition()
Method Detail |
---|
public void init(DirectoryServiceConfiguration factoryCfg, DirectoryPartitionConfiguration cfg) throws javax.naming.NamingException
DirectoryPartition
init
in interface DirectoryPartition
init
in class BTreeDirectoryPartition
javax.naming.NamingException
public void destroy()
DirectoryPartition
destroy
in interface DirectoryPartition
destroy
in class BTreeDirectoryPartition
public boolean isInitialized()
DirectoryPartition
isInitialized
in interface DirectoryPartition
isInitialized
in class BTreeDirectoryPartition
public void sync() throws javax.naming.NamingException
DirectoryPartition
sync
in interface DirectoryPartition
sync
in class BTreeDirectoryPartition
javax.naming.NamingException
public void addIndexOn(org.apache.ldap.common.schema.AttributeType spec) throws javax.naming.NamingException
addIndexOn
in class BTreeDirectoryPartition
javax.naming.NamingException
public Index getExistanceIndex()
getExistanceIndex
in class BTreeDirectoryPartition
public void setExistanceIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeDirectoryPartition
setExistanceIndexOn
in class BTreeDirectoryPartition
attrType
- the attribute existance Index
javax.naming.NamingException
public Index getHierarchyIndex()
BTreeDirectoryPartition
getHierarchyIndex
in class BTreeDirectoryPartition
public void setHierarchyIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeDirectoryPartition
setHierarchyIndexOn
in class BTreeDirectoryPartition
attrType
- the hierarchy Index
javax.naming.NamingException
public Index getAliasIndex()
BTreeDirectoryPartition
getAliasIndex
in class BTreeDirectoryPartition
public void setAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeDirectoryPartition
setAliasIndexOn
in class BTreeDirectoryPartition
attrType
- the index on the ALIAS_ATTRIBUTE
javax.naming.NamingException
public Index getOneAliasIndex()
BTreeDirectoryPartition
getOneAliasIndex
in class BTreeDirectoryPartition
public void setOneAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeDirectoryPartition
setOneAliasIndexOn
in class BTreeDirectoryPartition
attrType
- a one level alias index
javax.naming.NamingException
public Index getSubAliasIndex()
BTreeDirectoryPartition
getSubAliasIndex
in class BTreeDirectoryPartition
public void setSubAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeDirectoryPartition
setSubAliasIndexOn
in class BTreeDirectoryPartition
attrType
- a subtree alias index
javax.naming.NamingException
public Index getUpdnIndex()
BTreeDirectoryPartition
getUpdnIndex
in class BTreeDirectoryPartition
public void setUpdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeDirectoryPartition
setUpdnIndexOn
in class BTreeDirectoryPartition
attrType
- the updn Index
javax.naming.NamingException
public Index getNdnIndex()
BTreeDirectoryPartition
getNdnIndex
in class BTreeDirectoryPartition
public void setNdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeDirectoryPartition
setNdnIndexOn
in class BTreeDirectoryPartition
attrType
- the ndn Index
javax.naming.NamingException
public java.util.Iterator getUserIndices()
getUserIndices
in class BTreeDirectoryPartition
public java.util.Iterator getSystemIndices()
getSystemIndices
in class BTreeDirectoryPartition
public boolean hasUserIndexOn(java.lang.String attribute)
hasUserIndexOn
in class BTreeDirectoryPartition
public boolean hasSystemIndexOn(java.lang.String attribute)
hasSystemIndexOn
in class BTreeDirectoryPartition
public Index getUserIndex(java.lang.String attribute) throws IndexNotFoundException
getUserIndex
in class BTreeDirectoryPartition
IndexNotFoundException
BTreeDirectoryPartition.getUserIndex(String)
public Index getSystemIndex(java.lang.String indexName) throws IndexNotFoundException
getSystemIndex
in class BTreeDirectoryPartition
IndexNotFoundException
BTreeDirectoryPartition.getEntryId(String)
public java.math.BigInteger getEntryId(java.lang.String dn) throws javax.naming.NamingException
getEntryId
in class BTreeDirectoryPartition
javax.naming.NamingException
public java.lang.String getEntryDn(java.math.BigInteger id) throws javax.naming.NamingException
getEntryDn
in class BTreeDirectoryPartition
javax.naming.NamingException
public java.math.BigInteger getParentId(java.lang.String dn) throws javax.naming.NamingException
getParentId
in class BTreeDirectoryPartition
javax.naming.NamingException
public java.math.BigInteger getParentId(java.math.BigInteger childId) throws javax.naming.NamingException
getParentId
in class BTreeDirectoryPartition
javax.naming.NamingException
public java.lang.String getEntryUpdn(java.math.BigInteger id) throws javax.naming.NamingException
BTreeDirectoryPartition
getEntryUpdn
in class BTreeDirectoryPartition
id
- the entry id
javax.naming.NamingException
- if the updn index cannot be accessedpublic java.lang.String getEntryUpdn(java.lang.String dn) throws javax.naming.NamingException
BTreeDirectoryPartition
getEntryUpdn
in class BTreeDirectoryPartition
dn
- the normalized distinguished name
javax.naming.NamingException
- if the updn and ndn indices cannot be accessedpublic int count() throws javax.naming.NamingException
BTreeDirectoryPartition
count
in class BTreeDirectoryPartition
javax.naming.NamingException
- if there is a failure to read the countpublic void add(java.lang.String updn, javax.naming.Name dn, javax.naming.directory.Attributes entry) throws javax.naming.NamingException
DirectoryPartition
add
in interface DirectoryPartition
add
in class BTreeDirectoryPartition
updn
- the user provided distinguished/absolute name of the entrydn
- the normalized distinguished/absolute name of the entryentry
- the entry to add to this ContextPartition
javax.naming.NamingException
- if there are any problemspublic javax.naming.directory.Attributes lookup(java.math.BigInteger id) throws javax.naming.NamingException
lookup
in class BTreeDirectoryPartition
javax.naming.NamingException
public void delete(java.math.BigInteger id) throws javax.naming.NamingException
delete
in class BTreeDirectoryPartition
javax.naming.NamingException
public javax.naming.NamingEnumeration list(java.math.BigInteger id) throws javax.naming.NamingException
list
in class BTreeDirectoryPartition
javax.naming.NamingException
public int getChildCount(java.math.BigInteger id) throws javax.naming.NamingException
getChildCount
in class BTreeDirectoryPartition
javax.naming.NamingException
public javax.naming.Name getSuffix(boolean normalized)
DirectoryPartition
normalized
- boolean value used to control the normalization of the
returned Name. If true the normalized Name is returned, otherwise the
original user provided Name without normalization is returned.
public javax.naming.directory.Attributes getSuffixEntry() throws javax.naming.NamingException
getSuffixEntry
in class BTreeDirectoryPartition
javax.naming.NamingException
public void setProperty(java.lang.String propertyName, java.lang.String propertyValue) throws javax.naming.NamingException
setProperty
in class BTreeDirectoryPartition
javax.naming.NamingException
public java.lang.String getProperty(java.lang.String propertyName) throws javax.naming.NamingException
getProperty
in class BTreeDirectoryPartition
javax.naming.NamingException
public javax.naming.directory.Attributes getIndices(java.math.BigInteger id) throws javax.naming.NamingException
getIndices
in class BTreeDirectoryPartition
javax.naming.NamingException
public void modify(javax.naming.Name dn, int modOp, javax.naming.directory.Attributes mods) throws javax.naming.NamingException
DirectoryPartition
modify
in interface DirectoryPartition
modify
in class BTreeDirectoryPartition
dn
- the normalized distinguished/absolute name of the entry to
modifymodOp
- the modification operation to perform on the entry which
is one of constants specified by the DirContext interface:
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
.mods
- the attributes and their values used to affect the
modification with.
javax.naming.NamingException
- if there are any problemsDirContext
,
DirContext.ADD_ATTRIBUTE
,
DirContext.REMOVE_ATTRIBUTE
,
DirContext.REPLACE_ATTRIBUTE
public void modify(javax.naming.Name dn, javax.naming.directory.ModificationItem[] mods) throws javax.naming.NamingException
DirectoryPartition
modify
in interface DirectoryPartition
modify
in class BTreeDirectoryPartition
dn
- the normalized distinguished/absolute name of the entry to modifymods
- the ModificationItems used to affect the modification with
javax.naming.NamingException
- if there are any problemsModificationItem
public void modifyRn(javax.naming.Name dn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
modifyRn
in interface DirectoryPartition
modifyRn
in class BTreeDirectoryPartition
dn
- the normalized distinguished name of the entry to alternewRdn
- the new Rdn to setdeleteOldRdn
- whether or not to remove the old Rdn attr/val
javax.naming.NamingException
- if there are any errors propagating the name
changes.public void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
DirectoryPartition
move
in interface DirectoryPartition
move
in class BTreeDirectoryPartition
oldChildDn
- the normalized distinguished/absolute name of the
original child name representing the child entry to movenewParentDn
- the normalized distinguished/absolute name of the
new parent to move the targeted entry tonewRdn
- the new RN of the entrydeleteOldRdn
- boolean flag which removes the old RN attribute
from the entry if set to true, and has no affect if set to false
javax.naming.NamingException
- if there are any problemspublic void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn) throws javax.naming.NamingException
DirectoryPartition
move
in interface DirectoryPartition
move
in class BTreeDirectoryPartition
oldChildDn
- the normalized distinguished/absolute name of the
original child name representing the child entry to movenewParentDn
- the normalized distinguished/absolute name of the
new parent to move the target entry to
javax.naming.NamingException
- if there are any problems
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |