|
||||||||||
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
An abstract ContextPartition
that uses general BTree operations.
Field Summary |
Fields inherited from interface org.apache.ldap.server.partition.ContextPartition |
ALIAS_ATTRIBUTE, ALIAS_OBJECT |
Constructor Summary | |
protected |
BTreeContextPartition()
Creates a B-tree based context partition. |
Method Summary | |
abstract void |
add(java.lang.String updn,
javax.naming.Name dn,
javax.naming.directory.Attributes entry)
Adds an entry to this ContextPartition. |
abstract void |
addIndexOn(org.apache.ldap.common.schema.AttributeType attribute)
|
abstract int |
count()
Gets the count of the total number of entries in the database. |
abstract void |
delete(java.math.BigInteger id)
|
void |
delete(javax.naming.Name dn)
Deletes a leaf entry from this ContextPartition: non-leaf entries cannot be deleted until this operation has been applied to their children. |
abstract void |
destroy()
Deinitialized this partition. |
abstract 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. |
abstract int |
getChildCount(java.math.BigInteger id)
|
abstract java.lang.String |
getEntryDn(java.math.BigInteger id)
|
abstract java.math.BigInteger |
getEntryId(java.lang.String dn)
|
abstract java.lang.String |
getEntryUpdn(java.math.BigInteger id)
Gets the user provided distinguished name. |
abstract java.lang.String |
getEntryUpdn(java.lang.String dn)
Gets the user provided distinguished name. |
abstract Index |
getExistanceIndex()
|
abstract Index |
getHierarchyIndex()
Gets the Index mapping the BigInteger primary keys of parents to the BigInteger primary keys of their children. |
abstract javax.naming.directory.Attributes |
getIndices(java.math.BigInteger id)
|
abstract Index |
getNdnIndex()
Gets the Index mapping the normalized distinguished names of entries as Strings to the BigInteger primary keys of entries. |
abstract 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. |
abstract java.math.BigInteger |
getParentId(java.math.BigInteger childId)
|
abstract java.math.BigInteger |
getParentId(java.lang.String dn)
|
abstract java.lang.String |
getProperty(java.lang.String key)
|
SearchEngine |
getSearchEngine()
Gets the DefaultSearchEngine used by this ContextPartition to search the Database. |
abstract 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. |
abstract javax.naming.directory.Attributes |
getSuffixEntry()
|
abstract Index |
getSystemIndex(java.lang.String attribute)
|
abstract java.util.Iterator |
getSystemIndices()
|
abstract Index |
getUpdnIndex()
Gets the Index mapping user provided distinguished names of entries as Strings to the BigInteger primary keys of entries. |
abstract Index |
getUserIndex(java.lang.String attribute)
|
abstract java.util.Iterator |
getUserIndices()
|
boolean |
hasEntry(javax.naming.Name dn)
Fast operation to check and see if a particular entry exists. |
abstract boolean |
hasSystemIndexOn(java.lang.String attribute)
|
abstract boolean |
hasUserIndexOn(java.lang.String attribute)
|
void |
init(ContextFactoryConfiguration factoryCfg,
ContextPartitionConfiguration cfg)
Initializes this partition. |
void |
inspect()
|
abstract boolean |
isInitialized()
Checks to see if this partition is initialized or not. |
boolean |
isSuffix(javax.naming.Name dn)
Checks to see if name is a context suffix. |
abstract javax.naming.NamingEnumeration |
list(java.math.BigInteger id)
|
javax.naming.NamingEnumeration |
list(javax.naming.Name base)
A specialized form of one level search used to return a minimal set of information regarding child entries under a base. |
abstract javax.naming.directory.Attributes |
lookup(java.math.BigInteger id)
|
javax.naming.directory.Attributes |
lookup(javax.naming.Name dn)
Looks up an entry by distinguished/absolute name. |
javax.naming.directory.Attributes |
lookup(javax.naming.Name dn,
java.lang.String[] attrIds)
Looks up an entry by distinguished/absolute name. |
abstract 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. |
abstract 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. |
abstract void |
modifyRn(javax.naming.Name dn,
java.lang.String newRdn,
boolean deleteOldRdn)
Modifies an entry by changing its relative name. |
abstract 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. |
abstract 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. |
javax.naming.NamingEnumeration |
search(javax.naming.Name base,
java.util.Map env,
org.apache.ldap.common.filter.ExprNode filter,
javax.naming.directory.SearchControls searchCtls)
Conducts a search against this ContextPartition. |
abstract 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. |
abstract void |
setExistanceIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
Sets the attribute existance Index. |
abstract void |
setHierarchyIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
Sets the hierarchy Index. |
abstract void |
setNdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
Sets the normalized distinguished name Index. |
abstract 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. |
abstract void |
setProperty(java.lang.String key,
java.lang.String value)
|
abstract 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. |
abstract void |
setUpdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType)
Sets the user provided distinguished name Index. |
abstract void |
sync()
Flushes any changes made to this partition now. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.ldap.server.partition.ContextPartition |
getSuffix |
Constructor Detail |
protected BTreeContextPartition()
Method Detail |
public void init(ContextFactoryConfiguration factoryCfg, ContextPartitionConfiguration cfg) throws javax.naming.NamingException
ContextPartition
init
in interface ContextPartition
javax.naming.NamingException
public SearchEngine getSearchEngine()
public void delete(javax.naming.Name dn) throws javax.naming.NamingException
ContextPartition
delete
in interface ContextPartition
dn
- the normalized distinguished/absolute name of the entry to
delete from this ContextPartition.
javax.naming.NamingException
- if there are any problemspublic abstract void add(java.lang.String updn, javax.naming.Name dn, javax.naming.directory.Attributes entry) throws javax.naming.NamingException
ContextPartition
add
in interface ContextPartition
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 abstract void modify(javax.naming.Name dn, int modOp, javax.naming.directory.Attributes mods) throws javax.naming.NamingException
ContextPartition
modify
in interface ContextPartition
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 abstract void modify(javax.naming.Name dn, javax.naming.directory.ModificationItem[] mods) throws javax.naming.NamingException
ContextPartition
modify
in interface ContextPartition
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 javax.naming.NamingEnumeration list(javax.naming.Name base) throws javax.naming.NamingException
ContextPartition
list
in interface ContextPartition
base
- the base distinguished/absolute name for the search/listing
SearchResult
javax.naming.NamingException
- if there are any problemspublic javax.naming.NamingEnumeration search(javax.naming.Name base, java.util.Map env, org.apache.ldap.common.filter.ExprNode filter, javax.naming.directory.SearchControls searchCtls) throws javax.naming.NamingException
ContextPartition
search
in interface ContextPartition
base
- the normalized distinguished/absolute name of the search baseenv
- the environment under which operation occursfilter
- the root node of the filter expression treesearchCtls
- the search controls
javax.naming.NamingException
- if there are any problemspublic javax.naming.directory.Attributes lookup(javax.naming.Name dn) throws javax.naming.NamingException
ContextPartition
lookup
in interface ContextPartition
dn
- the normalized distinguished name of the object to lookup
javax.naming.NamingException
- if there are any problemspublic javax.naming.directory.Attributes lookup(javax.naming.Name dn, java.lang.String[] attrIds) throws javax.naming.NamingException
ContextPartition
lookup
in interface ContextPartition
dn
- the normalized distinguished name of the object to lookupattrIds
- the set of attributes to return
javax.naming.NamingException
- if there are any problemspublic boolean hasEntry(javax.naming.Name dn) throws javax.naming.NamingException
ContextPartition
hasEntry
in interface ContextPartition
dn
- the normalized distinguished/absolute name of the object to
check for existance
javax.naming.NamingException
- if there are any problemspublic abstract void modifyRn(javax.naming.Name dn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
ContextPartition
modifyRn
in interface ContextPartition
dn
- the normalized distinguished/absolute name of the entry to
modify the RN of.newRdn
- the new RN of the entry specified by namedeleteOldRdn
- 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 abstract void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn) throws javax.naming.NamingException
ContextPartition
move
in interface ContextPartition
newParentDn
- the normalized distinguished/absolute name of the
new parent to move the target entry tooldChildDn
- the normalized distinguished/absolute name of the
original child name representing the child entry to move
javax.naming.NamingException
- if there are any problemspublic abstract 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
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 abstract void sync() throws javax.naming.NamingException
ContextPartition
sync
in interface ContextPartition
javax.naming.NamingException
public abstract void destroy()
ContextPartition
destroy
in interface ContextPartition
public abstract boolean isInitialized()
ContextPartition
isInitialized
in interface ContextPartition
public boolean isSuffix(javax.naming.Name dn) throws javax.naming.NamingException
ContextPartition
isSuffix
in interface ContextPartition
dn
- the normalized distinguished/absolute name of the context
javax.naming.NamingException
- if there are any problemspublic void inspect() throws java.lang.Exception
java.lang.Exception
public abstract void addIndexOn(org.apache.ldap.common.schema.AttributeType attribute) throws javax.naming.NamingException
javax.naming.NamingException
public abstract boolean hasUserIndexOn(java.lang.String attribute)
public abstract boolean hasSystemIndexOn(java.lang.String attribute)
public abstract Index getExistanceIndex()
public abstract Index getHierarchyIndex()
public abstract Index getUpdnIndex()
public abstract Index getNdnIndex()
public abstract Index getOneAliasIndex()
public abstract Index getSubAliasIndex()
public abstract Index getAliasIndex()
public abstract void setAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
attrType
- the index on the ALIAS_ATTRIBUTE
javax.naming.NamingException
public abstract void setExistanceIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
attrType
- the attribute existance Index
javax.naming.NamingException
public abstract void setHierarchyIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
attrType
- the hierarchy Index
javax.naming.NamingException
public abstract void setUpdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
attrType
- the updn Index
javax.naming.NamingException
public abstract void setNdnIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
attrType
- the ndn Index
javax.naming.NamingException
public abstract void setOneAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
attrType
- a one level alias index
javax.naming.NamingException
public abstract void setSubAliasIndexOn(org.apache.ldap.common.schema.AttributeType attrType) throws javax.naming.NamingException
attrType
- a subtree alias index
javax.naming.NamingException
public abstract Index getUserIndex(java.lang.String attribute) throws IndexNotFoundException
IndexNotFoundException
public abstract Index getSystemIndex(java.lang.String attribute) throws IndexNotFoundException
IndexNotFoundException
public abstract java.math.BigInteger getEntryId(java.lang.String dn) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.lang.String getEntryDn(java.math.BigInteger id) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.math.BigInteger getParentId(java.lang.String dn) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.math.BigInteger getParentId(java.math.BigInteger childId) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.lang.String getEntryUpdn(java.math.BigInteger id) throws javax.naming.NamingException
id
- the entry id
javax.naming.NamingException
- if the updn index cannot be accessedpublic abstract java.lang.String getEntryUpdn(java.lang.String dn) throws javax.naming.NamingException
dn
- the normalized distinguished name
javax.naming.NamingException
- if the updn and ndn indices cannot be accessedpublic abstract javax.naming.directory.Attributes lookup(java.math.BigInteger id) throws javax.naming.NamingException
javax.naming.NamingException
public abstract void delete(java.math.BigInteger id) throws javax.naming.NamingException
javax.naming.NamingException
public abstract javax.naming.NamingEnumeration list(java.math.BigInteger id) throws javax.naming.NamingException
javax.naming.NamingException
public abstract int getChildCount(java.math.BigInteger id) throws javax.naming.NamingException
javax.naming.NamingException
public abstract javax.naming.directory.Attributes getSuffixEntry() throws javax.naming.NamingException
javax.naming.NamingException
public abstract void setProperty(java.lang.String key, java.lang.String value) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.lang.String getProperty(java.lang.String key) throws javax.naming.NamingException
javax.naming.NamingException
public abstract java.util.Iterator getUserIndices()
public abstract java.util.Iterator getSystemIndices()
public abstract javax.naming.directory.Attributes getIndices(java.math.BigInteger id) throws javax.naming.NamingException
javax.naming.NamingException
public abstract int count() throws javax.naming.NamingException
javax.naming.NamingException
- if there is a failure to read the count
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |