|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ldap.server.partition.ContextPartitionNexus
org.apache.ldap.server.partition.DefaultContextPartitionNexus
A nexus for partitions dedicated for storing entries specific to a naming context.
Field Summary |
Fields inherited from class org.apache.ldap.server.partition.ContextPartitionNexus |
ADMIN_PRINCIPAL, ADMIN_PW, ADMIN_UID, GROUPS_BASE_NAME, SYSTEM_PARTITION_SUFFIX, USERS_BASE_NAME |
Fields inherited from interface org.apache.ldap.server.partition.ContextPartition |
ALIAS_ATTRIBUTE, ALIAS_OBJECT |
Constructor Summary | |
DefaultContextPartitionNexus(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(ContextPartitionConfiguration config)
|
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. |
ContextPartition |
getSystemPartition()
|
boolean |
hasEntry(javax.naming.Name dn)
Fast operation to check and see if a particular entry exists. |
void |
init(ContextFactoryConfiguration factoryCfg,
ContextPartitionConfiguration 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 ContextPartitionNexus . |
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.ContextPartitionNexus |
getAdminName, getGroupsBaseName, getUsersBaseName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultContextPartitionNexus(javax.naming.directory.Attributes rootDSE)
Method Detail |
public void init(ContextFactoryConfiguration factoryCfg, ContextPartitionConfiguration cfg) throws javax.naming.NamingException
ContextPartition
javax.naming.NamingException
public boolean isInitialized()
ContextPartition
public void destroy()
ContextPartition
public void sync() throws javax.naming.NamingException
ContextPartition
javax.naming.NamingException
ContextPartition.sync()
public void addContextPartition(ContextPartitionConfiguration config) throws javax.naming.NamingException
addContextPartition
in class ContextPartitionNexus
javax.naming.NamingException
public void removeContextPartition(javax.naming.Name suffix) throws javax.naming.NamingException
removeContextPartition
in class ContextPartitionNexus
javax.naming.NamingException
public ContextPartition getSystemPartition()
getSystemPartition
in class ContextPartitionNexus
public javax.naming.ldap.LdapContext getLdapContext()
ContextPartitionNexus
getLdapContext
in class ContextPartitionNexus
ContextPartitionNexus.getLdapContext()
public javax.naming.Name getMatchedName(javax.naming.Name dn, boolean normalized) throws javax.naming.NamingException
ContextPartitionNexus
getMatchedName
in class ContextPartitionNexus
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 problemsContextPartitionNexus.getMatchedName(javax.naming.Name, boolean)
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.Name getSuffix(javax.naming.Name dn, boolean normalized) throws javax.naming.NamingException
ContextPartitionNexus
getSuffix
in class ContextPartitionNexus
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 problemsContextPartitionNexus.getSuffix(javax.naming.Name, boolean)
public java.util.Iterator listSuffixes(boolean normalized) throws javax.naming.NamingException
ContextPartitionNexus
ContextPartitionNexus
.
listSuffixes
in class ContextPartitionNexus
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 problemsContextPartitionNexus.listSuffixes(boolean)
public javax.naming.directory.Attributes getRootDSE()
ContextPartitionNexus
getRootDSE
in class ContextPartitionNexus
public void delete(javax.naming.Name dn) throws javax.naming.NamingException
ContextPartition
dn
- the normalized distinguished/absolute name of the entry to
delete from this ContextPartition.
javax.naming.NamingException
- if there are any problemsContextPartition.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 problemsContextPartition.add(String, Name, Attributes)
public void modify(javax.naming.Name dn, int modOp, javax.naming.directory.Attributes mods) throws javax.naming.NamingException
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 problemsContextPartition.modify(Name, int,Attributes)
public void modify(javax.naming.Name dn, javax.naming.directory.ModificationItem[] mods) throws javax.naming.NamingException
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 problemsContextPartition.modify(javax.naming.Name,
javax.naming.directory.ModificationItem[])
public javax.naming.NamingEnumeration list(javax.naming.Name base) throws javax.naming.NamingException
ContextPartition
base
- the base distinguished/absolute name for the search/listing
SearchResult
javax.naming.NamingException
- if there are any problemsContextPartition.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
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 problemsContextPartition.search(Name, Map, ExprNode, SearchControls)
public javax.naming.directory.Attributes lookup(javax.naming.Name dn) throws javax.naming.NamingException
ContextPartition
dn
- the normalized distinguished name of the object to lookup
javax.naming.NamingException
- if there are any problemsContextPartition.lookup(javax.naming.Name)
public javax.naming.directory.Attributes lookup(javax.naming.Name dn, java.lang.String[] attrIds) throws javax.naming.NamingException
ContextPartition
dn
- the normalized distinguished name of the object to lookupattrIds
- the set of attributes to return
javax.naming.NamingException
- if there are any problemsContextPartition.lookup(javax.naming.Name, String[])
public boolean hasEntry(javax.naming.Name dn) throws javax.naming.NamingException
ContextPartition
dn
- the normalized distinguished/absolute name of the object to
check for existance
javax.naming.NamingException
- if there are any problemsContextPartition.hasEntry(javax.naming.Name)
public boolean isSuffix(javax.naming.Name dn)
ContextPartition
dn
- the normalized distinguished/absolute name of the context
ContextPartition.isSuffix(javax.naming.Name)
public void modifyRn(javax.naming.Name dn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
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 problemsContextPartition.modifyRn(Name, String, boolean)
public void move(javax.naming.Name oriChildName, javax.naming.Name newParentName) throws javax.naming.NamingException
ContextPartition
newParentName
- the normalized distinguished/absolute name of the
new parent to move the target entry tooriChildName
- the normalized distinguished/absolute name of the
original child name representing the child entry to move
javax.naming.NamingException
- if there are any problemsContextPartition.move(Name, Name)
public void move(javax.naming.Name oldChildDn, javax.naming.Name newParentDn, java.lang.String newRdn, boolean deleteOldRdn) throws javax.naming.NamingException
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 problemsContextPartition.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 |