|
|||||||||||
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.BTreeContextPartition
org.apache.ldap.server.partition.impl.btree.jdbm.JdbmContextPartition
A ContextPartition
that stores entries in
JDBM database.
Field Summary |
Fields inherited from interface org.apache.ldap.server.partition.ContextPartition |
ALIAS_ATTRIBUTE, ALIAS_OBJECT |
Constructor Summary | |
JdbmContextPartition()
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(ContextFactoryConfiguration factoryCfg,
ContextPartitionConfiguration 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)
Moves an entry under a new parent. |
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.BTreeContextPartition |
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 JdbmContextPartition()
Method Detail |
public void init(ContextFactoryConfiguration factoryCfg, ContextPartitionConfiguration cfg) throws javax.naming.NamingException
ContextPartition
init
in interface ContextPartition
init
in class BTreeContextPartition
javax.naming.NamingException
public void destroy()
ContextPartition
destroy
in interface ContextPartition
destroy
in class BTreeContextPartition
public boolean isInitialized()
ContextPartition
isInitialized
in interface ContextPartition
isInitialized
in class BTreeContextPartition
public void sync() throws javax.naming.NamingException
ContextPartition
sync
in interface ContextPartition
sync
in class BTreeContextPartition
javax.naming.NamingException
public void addIndexOn(org.apache.ldap.common.schema.AttributeType spec) throws javax.naming.NamingException
addIndexOn
in class BTreeContextPartition
javax.naming.NamingException
public Index getExistanceIndex()
getExistanceIndex
in class BTreeContextPartition
public void setExistanceIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeContextPartition
setExistanceIndexOn
in class BTreeContextPartition
attrType
- the attribute existance Index
javax.naming.NamingException
public Index getHierarchyIndex()
BTreeContextPartition
getHierarchyIndex
in class BTreeContextPartition
public void setHierarchyIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeContextPartition
setHierarchyIndexOn
in class BTreeContextPartition
attrType
- the hierarchy Index
javax.naming.NamingException
public Index getAliasIndex()
BTreeContextPartition
getAliasIndex
in class BTreeContextPartition
public void setAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeContextPartition
setAliasIndexOn
in class BTreeContextPartition
attrType
- the index on the ALIAS_ATTRIBUTE
javax.naming.NamingException
public Index getOneAliasIndex()
BTreeContextPartition
getOneAliasIndex
in class BTreeContextPartition
public void setOneAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeContextPartition
setOneAliasIndexOn
in class BTreeContextPartition
attrType
- a one level alias index
javax.naming.NamingException
public Index getSubAliasIndex()
BTreeContextPartition
getSubAliasIndex
in class BTreeContextPartition
public void setSubAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeContextPartition
setSubAliasIndexOn
in class BTreeContextPartition
attrType
- a subtree alias index
javax.naming.NamingException
public Index getUpdnIndex()
BTreeContextPartition
getUpdnIndex
in class BTreeContextPartition
public void setUpdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeContextPartition
setUpdnIndexOn
in class BTreeContextPartition
attrType
- the updn Index
javax.naming.NamingException
public Index getNdnIndex()
BTreeContextPartition
getNdnIndex
in class BTreeContextPartition
public void setNdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
BTreeContextPartition
setNdnIndexOn
in class BTreeContextPartition
attrType
- the ndn Index
javax.naming.NamingException
public java.util.Iterator getUserIndices()
getUserIndices
in class BTreeContextPartition
public java.util.Iterator getSystemIndices()
getSystemIndices
in class BTreeContextPartition
public boolean hasUserIndexOn(java.lang.String attribute)
hasUserIndexOn
in class BTreeContextPartition
public boolean hasSystemIndexOn(java.lang.String attribute)
hasSystemIndexOn
in class BTreeContextPartition
public Index getUserIndex(java.lang.String attribute) throws IndexNotFoundException
getUserIndex
in class BTreeContextPartition
IndexNotFoundException
BTreeContextPartition.getUserIndex(String)
public Index getSystemIndex(java.lang.String indexName) throws IndexNotFoundException
getSystemIndex
in class BTreeContextPartition
IndexNotFoundException
BTreeContextPartition.getEntryId(String)
public java.math.BigInteger getEntryId(java.lang.String dn) throws javax.naming.NamingException
getEntryId
in class BTreeContextPartition
javax.naming.NamingException
public java.lang.String getEntryDn(java.math.BigInteger id) throws javax.naming.NamingException
getEntryDn
in class BTreeContextPartition
javax.naming.NamingException
public java.math.BigInteger getParentId(java.lang.String dn) throws javax.naming.NamingException
getParentId
in class BTreeContextPartition
javax.naming.NamingException
public java.math.BigInteger getParentId(java.math.BigInteger childId) throws javax.naming.NamingException
getParentId
in class BTreeContextPartition
javax.naming.NamingException
public java.lang.String getEntryUpdn(java.math.BigInteger id) throws javax.naming.NamingException
BTreeContextPartition
getEntryUpdn
in class BTreeContextPartition
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
BTreeContextPartition
getEntryUpdn
in class BTreeContextPartition
dn
- the normalized distinguished name
javax.naming.NamingException
- if the updn and ndn indices cannot be accessedpublic int count() throws javax.naming.NamingException
BTreeContextPartition
count
in class BTreeContextPartition
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
ContextPartition
add
in interface ContextPartition
add
in class BTreeContextPartition
javax.naming.NamingException
public javax.naming.directory.Attributes lookup(java.math.BigInteger id) throws javax.naming.NamingException
lookup
in class BTreeContextPartition
javax.naming.NamingException
public void delete(java.math.BigInteger id) throws javax.naming.NamingException
delete
in class BTreeContextPartition
javax.naming.NamingException
public javax.naming.NamingEnumeration list(java.math.BigInteger id) throws javax.naming.NamingException
list
in class BTreeContextPartition
javax.naming.NamingException
public int getChildCount(java.math.BigInteger id) throws javax.naming.NamingException
getChildCount
in class BTreeContextPartition
javax.naming.NamingException
public javax.naming.Name getSuffix(boolean normalized)
ContextPartition
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 BTreeContextPartition
javax.naming.NamingException
public void setProperty(java.lang.String propertyName, java.lang.String propertyValue) throws javax.naming.NamingException
setProperty
in class BTreeContextPartition
javax.naming.NamingException
public java.lang.String getProperty(java.lang.String propertyName) throws javax.naming.NamingException
getProperty
in class BTreeContextPartition
javax.naming.NamingException
public javax.naming.directory.Attributes getIndices(java.math.BigInteger id) throws javax.naming.NamingException
getIndices
in class BTreeContextPartition
javax.naming.NamingException
public void modify(javax.naming.Name dn, int modOp, javax.naming.directory.Attributes mods) throws javax.naming.NamingException
ContextPartition
modify
in interface ContextPartition
modify
in class BTreeContextPartition
javax.naming.NamingException
public void modify(javax.naming.Name dn, javax.naming.directory.ModificationItem[] mods) throws javax.naming.NamingException
ContextPartition
modify
in interface ContextPartition
modify
in class BTreeContextPartition
javax.naming.NamingException
public void modifyRn(javax.naming.Name dn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
modifyRn
in interface ContextPartition
modifyRn
in class BTreeContextPartition
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
ContextPartition
move
in interface ContextPartition
move
in class BTreeContextPartition
javax.naming.NamingException
public void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn) throws javax.naming.NamingException
move
in interface ContextPartition
move
in class BTreeContextPartition
oldChildDn
- the normalized dn of the child to be movednewParentDn
- the normalized dn of the new parent for the child
javax.naming.NamingException
- if something goes wrong
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |