|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.core.partition.PartitionNexus
org.apache.directory.server.core.partition.DefaultPartitionNexus
public class DefaultPartitionNexus
A nexus for partitions dedicated for storing entries specific to a naming context.
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.server.core.partition.PartitionNexus |
|---|
ADMIN_PASSWORD, ADMIN_PRINCIPAL, ADMIN_PRINCIPAL_NORMALIZED, ADMIN_UID, GROUPS_BASE_NAME, SYSTEM_PARTITION_SUFFIX, USERS_BASE_NAME |
| Fields inherited from interface org.apache.directory.server.core.partition.Partition |
|---|
ALIAS_ATTRIBUTE, ALIAS_OBJECT |
| Constructor Summary | |
|---|---|
DefaultPartitionNexus(javax.naming.directory.Attributes rootDSE)
Creates the root nexus singleton of the entire system. |
|
| Method Summary | |
|---|---|
void |
add(org.apache.directory.shared.ldap.name.LdapDN dn,
javax.naming.directory.Attributes entry)
Looks up the backend corresponding to the entry first, then checks to see if the entry already exists. |
void |
addContextPartition(PartitionConfiguration config)
|
void |
bind(org.apache.directory.shared.ldap.name.LdapDN bindDn,
byte[] credentials,
java.util.List mechanisms,
java.lang.String saslAuthId)
Represents a bind operation issued to authenticate a client. |
boolean |
compare(org.apache.directory.shared.ldap.name.LdapDN 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(org.apache.directory.shared.ldap.name.LdapDN 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. |
org.apache.directory.shared.ldap.name.LdapDN |
getMatchedName(org.apache.directory.shared.ldap.name.LdapDN dn)
Gets the most significant Dn that exists within the server for any Dn. |
Partition |
getPartition(org.apache.directory.shared.ldap.name.LdapDN dn)
Get's the partition corresponding to a distinguished name. |
javax.naming.directory.Attributes |
getRootDSE()
Get's the RootDSE entry for the DSA. |
org.apache.directory.shared.ldap.name.LdapDN |
getSuffix()
Gets the distinguished/absolute name of the suffix for all entries stored within this ContextPartition. |
org.apache.directory.shared.ldap.name.LdapDN |
getSuffix(org.apache.directory.shared.ldap.name.LdapDN dn)
Gets the distinguished name of the suffix that would hold an entry with the supplied distinguished name parameter. |
Partition |
getSystemPartition()
|
org.apache.directory.shared.ldap.name.LdapDN |
getUpSuffix()
Gets the distinguished/absolute name of the suffix for all entries stored within this ContextPartition. |
boolean |
hasEntry(org.apache.directory.shared.ldap.name.LdapDN dn)
Fast operation to check and see if a particular entry exists. |
void |
init(DirectoryServiceConfiguration factoryCfg,
PartitionConfiguration cfg)
Initializes this partition. |
boolean |
isInitialized()
Checks to see if this partition is initialized or not. |
boolean |
isSuffix(org.apache.directory.shared.ldap.name.LdapDN dn)
Checks to see if name is a context suffix. |
javax.naming.NamingEnumeration |
list(org.apache.directory.shared.ldap.name.LdapDN 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()
Gets an iteration over the Name suffixes of the partitions managed by this PartitionNexus. |
javax.naming.directory.Attributes |
lookup(org.apache.directory.shared.ldap.name.LdapDN dn)
Looks up an entry by distinguished/absolute name. |
javax.naming.directory.Attributes |
lookup(org.apache.directory.shared.ldap.name.LdapDN dn,
java.lang.String[] attrIds)
Looks up an entry by distinguished/absolute name. |
void |
modify(org.apache.directory.shared.ldap.name.LdapDN dn,
int modOp,
javax.naming.directory.Attributes mods)
Modifies an entry by adding, removing or replacing a set of attributes. |
void |
modify(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.message.ModificationItemImpl[] mods)
Modifies an entry by using a combination of adds, removes or replace operations using a set of ModificationItems. |
void |
modifyRn(org.apache.directory.shared.ldap.name.LdapDN dn,
java.lang.String newRdn,
boolean deleteOldRdn)
Modifies an entry by changing its relative name. |
void |
move(org.apache.directory.shared.ldap.name.LdapDN oriChildName,
org.apache.directory.shared.ldap.name.LdapDN newParentName)
Transplants a child entry, to a position in the namespace under a new parent entry. |
void |
move(org.apache.directory.shared.ldap.name.LdapDN oldChildDn,
org.apache.directory.shared.ldap.name.LdapDN 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 |
registerSupportedExtensions(java.util.Set extensionOids)
Adds a set of supportedExtension (OID Strings) to the RootDSE. |
void |
removeContextPartition(org.apache.directory.shared.ldap.name.LdapDN suffix)
|
javax.naming.NamingEnumeration |
search(org.apache.directory.shared.ldap.name.LdapDN base,
java.util.Map env,
org.apache.directory.shared.ldap.filter.ExprNode filter,
javax.naming.directory.SearchControls searchCtls)
Conducts a search against this ContextPartition. |
void |
sync()
Flushes any changes made to this partition now. |
void |
unbind(org.apache.directory.shared.ldap.name.LdapDN bindDn)
Represents an unbind operation issued by an authenticated client. |
| Methods inherited from class org.apache.directory.server.core.partition.PartitionNexus |
|---|
getAdminName, getGroupsBaseName, getUsersBaseName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultPartitionNexus(javax.naming.directory.Attributes rootDSE)
| Method Detail |
|---|
public void init(DirectoryServiceConfiguration factoryCfg,
PartitionConfiguration cfg)
throws javax.naming.NamingException
Partition
javax.naming.NamingExceptionpublic boolean isInitialized()
Partition
public void destroy()
Partition
public void sync()
throws javax.naming.NamingException
Partition
javax.naming.NamingExceptionPartition.sync()
public boolean compare(org.apache.directory.shared.ldap.name.LdapDN name,
java.lang.String oid,
java.lang.Object value)
throws javax.naming.NamingException
PartitionNexus
compare in class PartitionNexusname - 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 values
public void addContextPartition(PartitionConfiguration config)
throws javax.naming.NamingException
addContextPartition in class PartitionNexusjavax.naming.NamingException
public void removeContextPartition(org.apache.directory.shared.ldap.name.LdapDN suffix)
throws javax.naming.NamingException
removeContextPartition in class PartitionNexusjavax.naming.NamingExceptionpublic Partition getSystemPartition()
getSystemPartition in class PartitionNexuspublic javax.naming.ldap.LdapContext getLdapContext()
PartitionNexus
getLdapContext in class PartitionNexusPartitionNexus.getLdapContext()
public org.apache.directory.shared.ldap.name.LdapDN getMatchedName(org.apache.directory.shared.ldap.name.LdapDN dn)
throws javax.naming.NamingException
PartitionNexus
getMatchedName in class PartitionNexusdn - the normalized distinguished name to use for matching.
javax.naming.NamingException - if there are any problemsPartitionNexus.getMatchedName(org.apache.directory.shared.ldap.name.LdapDN)public org.apache.directory.shared.ldap.name.LdapDN getSuffix()
Partition
public org.apache.directory.shared.ldap.name.LdapDN getUpSuffix()
Partition
public org.apache.directory.shared.ldap.name.LdapDN getSuffix(org.apache.directory.shared.ldap.name.LdapDN dn)
throws javax.naming.NamingException
PartitionNexus
getSuffix in class PartitionNexusdn - the normalized distinguished name to use for finding a suffix.
javax.naming.NamingException - if there are any problemsPartitionNexus.getSuffix(org.apache.directory.shared.ldap.name.LdapDN)
public java.util.Iterator listSuffixes()
throws javax.naming.NamingException
PartitionNexusPartitionNexus.
listSuffixes in class PartitionNexusjavax.naming.NamingException - if there are any problemsPartitionNexus.listSuffixes()public javax.naming.directory.Attributes getRootDSE()
PartitionNexus
getRootDSE in class PartitionNexus
public void bind(org.apache.directory.shared.ldap.name.LdapDN bindDn,
byte[] credentials,
java.util.List mechanisms,
java.lang.String saslAuthId)
throws javax.naming.NamingException
Partition
bindDn - the normalized dn of the principalcredentials - the credentials of the principalmechanisms - the mechanisms requested by the JNDI caller or a single
mechanism representing the SASL bind mechanism used by a networked client (Strings)saslAuthId - the SASL authentication (may be null)
javax.naming.NamingException - if something goes wrong
public void unbind(org.apache.directory.shared.ldap.name.LdapDN bindDn)
throws javax.naming.NamingException
Partition
bindDn - the normalized dn of the principal attempting to unbind
javax.naming.NamingException - if something goes wrong
public void delete(org.apache.directory.shared.ldap.name.LdapDN dn)
throws javax.naming.NamingException
Partition
dn - the normalized distinguished/absolute name of the entry to
delete from this ContextPartition.
javax.naming.NamingException - if there are any problemsPartition.delete(org.apache.directory.shared.ldap.name.LdapDN)
public void add(org.apache.directory.shared.ldap.name.LdapDN dn,
javax.naming.directory.Attributes entry)
throws javax.naming.NamingException
entry - the entry to add to this ContextPartition
javax.naming.NamingException - if there are any problemsPartition.add(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.Attributes)
public void modify(org.apache.directory.shared.ldap.name.LdapDN dn,
int modOp,
javax.naming.directory.Attributes mods)
throws javax.naming.NamingException
Partition
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 problemsPartition.modify(org.apache.directory.shared.ldap.name.LdapDN,int,javax.naming.directory.Attributes)
public void modify(org.apache.directory.shared.ldap.name.LdapDN dn,
org.apache.directory.shared.ldap.message.ModificationItemImpl[] mods)
throws javax.naming.NamingException
Partition
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 problemsPartition#modify(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[])
public javax.naming.NamingEnumeration list(org.apache.directory.shared.ldap.name.LdapDN base)
throws javax.naming.NamingException
Partition
base - the base distinguished/absolute name for the search/listing
SearchResult
javax.naming.NamingException - if there are any problemsPartition.list(org.apache.directory.shared.ldap.name.LdapDN)
public javax.naming.NamingEnumeration search(org.apache.directory.shared.ldap.name.LdapDN base,
java.util.Map env,
org.apache.directory.shared.ldap.filter.ExprNode filter,
javax.naming.directory.SearchControls searchCtls)
throws javax.naming.NamingException
Partition
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 problemsPartition.search(org.apache.directory.shared.ldap.name.LdapDN,java.util.Map,org.apache.directory.shared.ldap.filter.ExprNode,javax.naming.directory.SearchControls)
public javax.naming.directory.Attributes lookup(org.apache.directory.shared.ldap.name.LdapDN dn)
throws javax.naming.NamingException
Partition
dn - the normalized distinguished name of the object to lookup
javax.naming.NamingException - if there are any problemsPartition.lookup(org.apache.directory.shared.ldap.name.LdapDN)
public javax.naming.directory.Attributes lookup(org.apache.directory.shared.ldap.name.LdapDN dn,
java.lang.String[] attrIds)
throws javax.naming.NamingException
Partition
dn - the normalized distinguished name of the object to lookupattrIds - the set of attributes to return
javax.naming.NamingException - if there are any problemsPartition.lookup(org.apache.directory.shared.ldap.name.LdapDN,String[])
public boolean hasEntry(org.apache.directory.shared.ldap.name.LdapDN dn)
throws javax.naming.NamingException
Partition
dn - the normalized distinguished/absolute name of the object to
check for existance
javax.naming.NamingException - if there are any problemsPartition.hasEntry(org.apache.directory.shared.ldap.name.LdapDN)public boolean isSuffix(org.apache.directory.shared.ldap.name.LdapDN dn)
Partition
dn - the normalized distinguished/absolute name of the context
Partition.isSuffix(org.apache.directory.shared.ldap.name.LdapDN)
public void modifyRn(org.apache.directory.shared.ldap.name.LdapDN dn,
java.lang.String newRdn,
boolean deleteOldRdn)
throws javax.naming.NamingException
Partition
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 problemsPartition.modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean)
public void move(org.apache.directory.shared.ldap.name.LdapDN oriChildName,
org.apache.directory.shared.ldap.name.LdapDN newParentName)
throws javax.naming.NamingException
Partition
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 problemsPartition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN)
public void move(org.apache.directory.shared.ldap.name.LdapDN oldChildDn,
org.apache.directory.shared.ldap.name.LdapDN newParentDn,
java.lang.String newRdn,
boolean deleteOldRdn)
throws javax.naming.NamingException
Partition
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 problemsPartition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN,String,boolean)
public Partition getPartition(org.apache.directory.shared.ldap.name.LdapDN dn)
throws javax.naming.NamingException
PartitionNexus
getPartition in class PartitionNexusdn - the normalized distinguished name to get a partition for
javax.naming.NamingException - if there is no partition for the dnpublic void registerSupportedExtensions(java.util.Set extensionOids)
PartitionNexus
registerSupportedExtensions in class PartitionNexusextensionOids - a set of OID strings to add to the supportedExtension
attribute in the RootDSE
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||