|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ldap.server.partition.DirectoryPartitionNexus
org.apache.ldap.server.partition.DefaultDirectoryPartitionNexus
public class DefaultDirectoryPartitionNexus
A nexus for partitions dedicated for storing entries specific to a naming context.
Field Summary |
---|
Fields inherited from class org.apache.ldap.server.partition.DirectoryPartitionNexus |
---|
ADMIN_PASSWORD, ADMIN_PRINCIPAL, ADMIN_UID, GROUPS_BASE_NAME, SYSTEM_PARTITION_SUFFIX, USERS_BASE_NAME |
Fields inherited from interface org.apache.ldap.server.partition.DirectoryPartition |
---|
ALIAS_ATTRIBUTE, ALIAS_OBJECT |
Constructor Summary | |
---|---|
DefaultDirectoryPartitionNexus(javax.naming.directory.Attributes rootDSE)
Creates the root nexus singleton of the entire system. |
Method Summary | |
---|---|
void |
add(java.lang.String updn,
javax.naming.Name dn,
javax.naming.directory.Attributes an_entry)
Looks up the backend corresponding to the entry first, then checks to see if the entry already exists. |
void |
addContextPartition(DirectoryPartitionConfiguration config)
|
boolean |
compare(javax.naming.Name name,
java.lang.String oid,
java.lang.Object value)
Performs a comparison check to see if an attribute of an entry has a specified value. |
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. |
void |
destroy()
Deinitialized this partition. |
javax.naming.ldap.LdapContext |
getLdapContext()
Gets the LdapContext associated with the calling thread. |
javax.naming.Name |
getMatchedName(javax.naming.Name dn,
boolean normalized)
Gets the most significant Dn that exists within the server for any Dn. |
javax.naming.directory.Attributes |
getRootDSE()
Get's the RootDSE entry for the DSA. |
javax.naming.Name |
getSuffix(boolean normalized)
Gets the distinguished/absolute name of the suffix for all entries stored within this ContextPartition. |
javax.naming.Name |
getSuffix(javax.naming.Name dn,
boolean normalized)
Gets the distinguished name of the suffix that would hold an entry with the supplied distinguished name parameter. |
DirectoryPartition |
getSystemPartition()
|
boolean |
hasEntry(javax.naming.Name dn)
Fast operation to check and see if a particular entry exists. |
void |
init(DirectoryServiceConfiguration factoryCfg,
DirectoryPartitionConfiguration cfg)
Initializes this partition. |
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. |
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. |
java.util.Iterator |
listSuffixes(boolean normalized)
Gets an iteration over the Name suffixes of the Backends managed by this DirectoryPartitionNexus . |
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. |
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 oriChildName,
javax.naming.Name newParentName)
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 |
removeContextPartition(javax.naming.Name suffix)
|
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. |
void |
sync()
Flushes any changes made to this partition now. |
Methods inherited from class org.apache.ldap.server.partition.DirectoryPartitionNexus |
---|
getAdminName, getGroupsBaseName, getUsersBaseName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultDirectoryPartitionNexus(javax.naming.directory.Attributes rootDSE)
Method Detail |
---|
public void init(DirectoryServiceConfiguration factoryCfg, DirectoryPartitionConfiguration cfg) throws javax.naming.NamingException
DirectoryPartition
javax.naming.NamingException
public boolean isInitialized()
DirectoryPartition
public void destroy()
DirectoryPartition
public void sync() throws javax.naming.NamingException
DirectoryPartition
javax.naming.NamingException
DirectoryPartition.sync()
public boolean compare(javax.naming.Name name, java.lang.String oid, java.lang.Object value) throws javax.naming.NamingException
DirectoryPartitionNexus
compare
in class DirectoryPartitionNexus
name
- the normalized name of the entryoid
- the attribute being comparedvalue
- the value the attribute is compared to
javax.naming.NamingException
- if there is a problem accessing the entry and its valuespublic void addContextPartition(DirectoryPartitionConfiguration config) throws javax.naming.NamingException
addContextPartition
in class DirectoryPartitionNexus
javax.naming.NamingException
public void removeContextPartition(javax.naming.Name suffix) throws javax.naming.NamingException
removeContextPartition
in class DirectoryPartitionNexus
javax.naming.NamingException
public DirectoryPartition getSystemPartition()
getSystemPartition
in class DirectoryPartitionNexus
public javax.naming.ldap.LdapContext getLdapContext()
DirectoryPartitionNexus
getLdapContext
in class DirectoryPartitionNexus
DirectoryPartitionNexus.getLdapContext()
public javax.naming.Name getMatchedName(javax.naming.Name dn, boolean normalized) throws javax.naming.NamingException
DirectoryPartitionNexus
getMatchedName
in class DirectoryPartitionNexus
dn
- the normalized distinguished name to use for matching.normalized
- boolean if true cause the return of a normalized Dn,
if false it returns the original user provided distinguished name for
the matched portion of the Dn as it was provided on entry creation.
javax.naming.NamingException
- if there are any problemsDirectoryPartitionNexus.getMatchedName(javax.naming.Name, boolean)
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.Name getSuffix(javax.naming.Name dn, boolean normalized) throws javax.naming.NamingException
DirectoryPartitionNexus
getSuffix
in class DirectoryPartitionNexus
dn
- the normalized distinguished name to use for finding a suffix.normalized
- if true causes the return of a normalized Dn, but
if false it returns the original user provided distinguished name for
the suffix Dn as it was provided on suffix entry creation.
javax.naming.NamingException
- if there are any problemsDirectoryPartitionNexus.getSuffix(javax.naming.Name, boolean)
public java.util.Iterator listSuffixes(boolean normalized) throws javax.naming.NamingException
DirectoryPartitionNexus
DirectoryPartitionNexus
.
listSuffixes
in class DirectoryPartitionNexus
normalized
- if true the returned Iterator contains normalized Dn
but, if false, it returns the original user provided distinguished names
in the Iterator.
javax.naming.NamingException
- if there are any problemsDirectoryPartitionNexus.listSuffixes(boolean)
public javax.naming.directory.Attributes getRootDSE()
DirectoryPartitionNexus
getRootDSE
in class DirectoryPartitionNexus
public void delete(javax.naming.Name dn) throws javax.naming.NamingException
DirectoryPartition
dn
- the normalized distinguished/absolute name of the entry to
delete from this ContextPartition.
javax.naming.NamingException
- if there are any problemsDirectoryPartition.delete(javax.naming.Name)
public void add(java.lang.String updn, javax.naming.Name dn, javax.naming.directory.Attributes an_entry) throws javax.naming.NamingException
updn
- the user provided distinguished/absolute name of the entrydn
- the normalized distinguished/absolute name of the entryan_entry
- the entry to add to this ContextPartition
javax.naming.NamingException
- if there are any problemsDirectoryPartition.add(String, Name, Attributes)
public void modify(javax.naming.Name dn, int modOp, javax.naming.directory.Attributes mods) throws javax.naming.NamingException
DirectoryPartition
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 problemsDirectoryPartition.modify(Name, int,Attributes)
public void modify(javax.naming.Name dn, javax.naming.directory.ModificationItem[] mods) throws javax.naming.NamingException
DirectoryPartition
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 problemsDirectoryPartition.modify(javax.naming.Name,
javax.naming.directory.ModificationItem[])
public javax.naming.NamingEnumeration list(javax.naming.Name base) throws javax.naming.NamingException
DirectoryPartition
base
- the base distinguished/absolute name for the search/listing
SearchResult
javax.naming.NamingException
- if there are any problemsDirectoryPartition.list(javax.naming.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
DirectoryPartition
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 problemsDirectoryPartition.search(Name, Map, ExprNode, SearchControls)
public javax.naming.directory.Attributes lookup(javax.naming.Name dn) throws javax.naming.NamingException
DirectoryPartition
dn
- the normalized distinguished name of the object to lookup
javax.naming.NamingException
- if there are any problemsDirectoryPartition.lookup(javax.naming.Name)
public javax.naming.directory.Attributes lookup(javax.naming.Name dn, java.lang.String[] attrIds) throws javax.naming.NamingException
DirectoryPartition
dn
- the normalized distinguished name of the object to lookupattrIds
- the set of attributes to return
javax.naming.NamingException
- if there are any problemsDirectoryPartition.lookup(javax.naming.Name, String[])
public boolean hasEntry(javax.naming.Name dn) throws javax.naming.NamingException
DirectoryPartition
dn
- the normalized distinguished/absolute name of the object to
check for existance
javax.naming.NamingException
- if there are any problemsDirectoryPartition.hasEntry(javax.naming.Name)
public boolean isSuffix(javax.naming.Name dn)
DirectoryPartition
dn
- the normalized distinguished/absolute name of the context
DirectoryPartition.isSuffix(javax.naming.Name)
public void modifyRn(javax.naming.Name dn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
DirectoryPartition
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 problemsDirectoryPartition.modifyRn(Name, String, boolean)
public void move(javax.naming.Name oriChildName, javax.naming.Name newParentName) throws javax.naming.NamingException
DirectoryPartition
oriChildName
- the normalized distinguished/absolute name of the
original child name representing the child entry to movenewParentName
- the normalized distinguished/absolute name of the
new parent to move the target entry to
javax.naming.NamingException
- if there are any problemsDirectoryPartition.move(Name, Name)
public void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
DirectoryPartition
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 problemsDirectoryPartition.move(javax.naming.Name,
javax.naming.Name, java.lang.String, boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |