|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ldap.server.AbstractContextPartition
An Abstract BackingStore using a formal database and a search engine. All the common code between a SystemBackingStore and a DefaultBackingStore will be added to this super class.
Field Summary | |
static java.lang.String |
ALIAS_OID
Private OID (1.2.6.1.4.1.18060.1.1.1.3.7) for _alias index |
static java.lang.String |
EXISTANCE_OID
Private OID (1.2.6.1.4.1.18060.1.1.1.3.3) for _existance op attrib |
static java.lang.String |
HIERARCHY_OID
Private OID (1.2.6.1.4.1.18060.1.1.1.3.4) for _hierarchy op attrib |
static java.lang.String |
NDN_OID
Private OID (1.2.6.1.4.1.18060.1.1.1.3.1) for _ndn op attrib |
static java.lang.String |
ONEALIAS_OID
Private OID (1.2.6.1.4.1.18060.1.1.1.3.5) for _oneAlias index |
static java.lang.String |
SUBALIAS_OID
Private OID (1.2.6.1.4.1.18060.1.1.1.3.6) for _subAlias index |
static java.lang.String |
UPDN_OID
Private OID (1.2.6.1.4.1.18060.1.1.1.3.2) for _updn op attrib |
Constructor Summary | |
AbstractContextPartition(Database db,
SearchEngine searchEngine,
org.apache.ldap.common.schema.AttributeType[] indexAttributes)
Creates a context partition with a new database and a search engine. |
Method Summary | |
void |
add(java.lang.String updn,
javax.naming.Name dn,
javax.naming.directory.Attributes entry)
Adds an entry to this BackingStore. |
void |
close()
Closes or shuts down this BackingStore. |
void |
delete(javax.naming.Name dn)
Deletes a leaf entry from this BackingStore: non-leaf entries cannot be deleted until this operation has been applied to their children. |
Database |
getDb()
Gets the Database used by this ContextPartition. |
SearchEngine |
getEngine()
Gets the DefaultSearchEngine used by this ContextPartition to search the Database. |
boolean |
hasEntry(javax.naming.Name dn)
Fast operation to check and see if a particular entry exists. |
void |
inspect()
|
boolean |
isClosed()
Checks to see if this BackingStore has been closed or shut down. |
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. |
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 name. |
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)
Modifies an entry by changing its relative name. |
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. |
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 BackingStore. |
void |
sync()
Cue to BackingStores with caches to flush entry and index changes to disk. |
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.ContextPartition |
getSuffix |
Methods inherited from interface org.apache.ldap.server.BackingStore |
isSuffix |
Field Detail |
public static final java.lang.String NDN_OID
public static final java.lang.String UPDN_OID
public static final java.lang.String EXISTANCE_OID
public static final java.lang.String HIERARCHY_OID
public static final java.lang.String ONEALIAS_OID
public static final java.lang.String SUBALIAS_OID
public static final java.lang.String ALIAS_OID
Constructor Detail |
public AbstractContextPartition(Database db, SearchEngine searchEngine, org.apache.ldap.common.schema.AttributeType[] indexAttributes) throws javax.naming.NamingException
db
- the dedicated database for this backing storesearchEngine
- the search engine for this backing storeMethod Detail |
public Database getDb()
public SearchEngine getEngine()
public void delete(javax.naming.Name dn) throws javax.naming.NamingException
BackingStore
delete
in interface BackingStore
dn
- the normalized distinguished/absolute name of the entry to
delete from this BackingStore.
javax.naming.NamingException
- if there are any problemsBackingStore.delete( Name )
public void add(java.lang.String updn, javax.naming.Name dn, javax.naming.directory.Attributes entry) throws javax.naming.NamingException
BackingStore
add
in interface BackingStore
updn
- the user provided distinguished/absolute name of the entrydn
- the normalized distinguished/absolute name of the entryentry
- the entry to add to this BackingStore
javax.naming.NamingException
- if there are any problemsBackingStore.add( String, Name, Attributes )
public void modify(javax.naming.Name dn, int modOp, javax.naming.directory.Attributes mods) throws javax.naming.NamingException
BackingStore
modify
in interface BackingStore
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 problemsBackingStore.modify( Name, int, Attributes )
public void modify(javax.naming.Name dn, javax.naming.directory.ModificationItem[] mods) throws javax.naming.NamingException
BackingStore
modify
in interface BackingStore
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 problemsBackingStore.modify( Name,ModificationItem[] )
public javax.naming.NamingEnumeration list(javax.naming.Name base) throws javax.naming.NamingException
BackingStore
list
in interface BackingStore
base
- the base distinguished/absolute name for the search/listing
DbSearchResult
javax.naming.NamingException
- if there are any problemsBackingStore.list( Name )
public 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
BackingStore
search
in interface BackingStore
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 problemsBackingStore.search(Name, Map, ExprNode, SearchControls)
public javax.naming.directory.Attributes lookup(javax.naming.Name dn) throws javax.naming.NamingException
BackingStore
lookup
in interface BackingStore
dn
- the normalized distinguished name of the object to lookup
javax.naming.NamingException
- if there are any problemsBackingStore.lookup( Name )
public javax.naming.directory.Attributes lookup(javax.naming.Name dn, java.lang.String[] attrIds) throws javax.naming.NamingException
BackingStore
lookup
in interface BackingStore
dn
- the normalized distinguished name of the object to lookupattrIds
- the set of attributes to return
javax.naming.NamingException
- if there are any problemsBackingStore.lookup(Name,String[])
public boolean hasEntry(javax.naming.Name dn) throws javax.naming.NamingException
BackingStore
hasEntry
in interface BackingStore
dn
- the normalized distinguished/absolute name of the object to
check for existance
javax.naming.NamingException
- if there are any problemsBackingStore.hasEntry( Name )
public void modifyRn(javax.naming.Name dn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
BackingStore
modifyRn
in interface BackingStore
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 problemsBackingStore.modifyRn( Name, String, boolean )
public void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn) throws javax.naming.NamingException
BackingStore
move
in interface BackingStore
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 problemsBackingStore.move( Name, Name )
public void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
BackingStore
move
in interface BackingStore
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 problemsBackingStore.move( Name, Name, String, boolean )
public void sync() throws javax.naming.NamingException
BackingStore
sync
in interface BackingStore
javax.naming.NamingException
- if there are problems flushing cachespublic void close() throws javax.naming.NamingException
BackingStore
close
in interface BackingStore
javax.naming.NamingException
- if there are problems shutting downpublic boolean isClosed()
BackingStore
isClosed
in interface BackingStore
public void inspect() throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |