|
||||||||||
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.PartitionNexusProxy
public class PartitionNexusProxy
A decorator that wraps other PartitionNexus
to enable
InterceptorChain
and InvocationStack
support.
All Invocation
s made to this nexus is automatically pushed to
InvocationStack
of the current thread, and popped when
the operation ends. All invocations are filtered by InterceptorChain
.
Field Summary | |
---|---|
static java.lang.String |
BYPASS_ALL
Bypass String to use when ALL interceptors should be skipped |
static java.util.Collection |
BYPASS_ALL_COLLECTION
Bypass String to use when ALL interceptors should be skipped |
static java.util.Collection |
GETMATCHEDDN_BYPASS
safe to use set of bypass instructions to getMatchedDn |
static java.util.Collection |
LOOKUP_BYPASS
safe to use set of bypass instructions to lookup raw entries |
static java.util.Collection |
LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS
safe to use set of bypass instructions to lookup raw entries excluding operational attributes |
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 | |
---|---|
PartitionNexusProxy(javax.naming.Context caller,
DirectoryService service)
Creates a new instance. |
Method Summary | |
---|---|
void |
add(LdapDN normName,
javax.naming.directory.Attributes entry)
Adds an entry to this ContextPartition. |
void |
add(LdapDN normName,
javax.naming.directory.Attributes entry,
java.util.Collection bypass)
|
void |
addContextPartition(PartitionConfiguration config)
|
void |
addContextPartition(PartitionConfiguration config,
java.util.Collection bypass)
|
void |
addNamingListener(javax.naming.event.EventContext ctx,
javax.naming.Name name,
ExprNode filter,
javax.naming.directory.SearchControls searchControls,
javax.naming.event.NamingListener namingListener)
|
void |
bind(LdapDN bindDn,
byte[] credentials,
java.util.List mechanisms,
java.lang.String saslAuthId)
Represents a bind operation issued to authenticate a client. |
void |
bind(LdapDN bindDn,
byte[] credentials,
java.util.List mechanisms,
java.lang.String saslAuthId,
java.util.Collection bypass)
TODO : check if we can find another way to procect ourselves from recursion. |
void |
close()
|
boolean |
compare(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. |
boolean |
compare(LdapDN name,
java.lang.String oid,
java.lang.Object value,
java.util.Collection bypass)
|
void |
delete(LdapDN name)
Deletes a leaf entry from this ContextPartition: non-leaf entries cannot be deleted until this operation has been applied to their children. |
void |
delete(LdapDN name,
java.util.Collection bypass)
|
void |
destroy()
Deinitialized this partition. |
javax.naming.ldap.LdapContext |
getLdapContext()
Gets the LdapContext associated with the calling thread. |
LdapDN |
getMatchedName(LdapDN dn)
Gets the most significant Dn that exists within the server for any Dn. |
LdapDN |
getMatchedName(LdapDN dn,
java.util.Collection bypass)
|
Partition |
getPartition(LdapDN dn)
Get's the partition corresponding to a distinguished name. |
javax.naming.directory.Attributes |
getRootDSE()
Get's the RootDSE entry for the DSA. |
javax.naming.directory.Attributes |
getRootDSE(java.util.Collection bypass)
|
LdapDN |
getSuffix()
Gets the distinguished/absolute name of the suffix for all entries stored within this ContextPartition. |
LdapDN |
getSuffix(LdapDN dn)
Gets the distinguished name of the suffix that would hold an entry with the supplied distinguished name parameter. |
LdapDN |
getSuffix(LdapDN dn,
java.util.Collection bypass)
|
Partition |
getSystemPartition()
|
LdapDN |
getUpSuffix()
Gets the distinguished/absolute name of the suffix for all entries stored within this ContextPartition. |
boolean |
hasEntry(LdapDN name)
Fast operation to check and see if a particular entry exists. |
boolean |
hasEntry(LdapDN name,
java.util.Collection bypass)
|
void |
init(DirectoryServiceConfiguration factoryCfg,
PartitionConfiguration cfg)
Initializes this partition. |
boolean |
isInitialized()
Checks to see if this partition is initialized or not. |
boolean |
isSuffix(LdapDN name)
Checks to see if name is a context suffix. |
boolean |
isSuffix(LdapDN name,
java.util.Collection bypass)
|
javax.naming.NamingEnumeration |
list(LdapDN base)
A specialized form of one level search used to return a minimal set of information regarding child entries under a base. |
javax.naming.NamingEnumeration |
list(LdapDN base,
java.util.Collection bypass)
|
java.util.Iterator |
listSuffixes()
Gets an iteration over the Name suffixes of the partitions managed by this PartitionNexus . |
java.util.Iterator |
listSuffixes(java.util.Collection bypass)
|
javax.naming.directory.Attributes |
lookup(LdapDN name)
Looks up an entry by distinguished/absolute name. |
javax.naming.directory.Attributes |
lookup(LdapDN name,
java.util.Collection bypass)
|
javax.naming.directory.Attributes |
lookup(LdapDN dn,
java.lang.String[] attrIds)
Looks up an entry by distinguished/absolute name. |
javax.naming.directory.Attributes |
lookup(LdapDN dn,
java.lang.String[] attrIds,
java.util.Collection bypass)
|
void |
modify(LdapDN name,
int modOp,
javax.naming.directory.Attributes mods)
Modifies an entry by adding, removing or replacing a set of attributes. |
void |
modify(LdapDN name,
int modOp,
javax.naming.directory.Attributes mods,
java.util.Collection bypass)
|
void |
modify(LdapDN name,
javax.naming.directory.ModificationItem[] mods)
Modifies an entry by using a combination of adds, removes or replace operations using a set of ModificationItems. |
void |
modify(LdapDN name,
javax.naming.directory.ModificationItem[] mods,
java.util.Collection bypass)
|
void |
modifyRn(LdapDN name,
java.lang.String newRn,
boolean deleteOldRn)
Modifies an entry by changing its relative name. |
void |
modifyRn(LdapDN name,
java.lang.String newRn,
boolean deleteOldRn,
java.util.Collection bypass)
|
void |
move(LdapDN oriChildName,
LdapDN newParentName)
Transplants a child entry, to a position in the namespace under a new parent entry. |
void |
move(LdapDN oriChildName,
LdapDN newParentName,
java.util.Collection bypass)
|
void |
move(LdapDN oriChildName,
LdapDN newParentName,
java.lang.String newRn,
boolean deleteOldRn)
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 |
move(LdapDN oriChildName,
LdapDN newParentName,
java.lang.String newRn,
boolean deleteOldRn,
java.util.Collection bypass)
|
void |
registerSupportedExtensions(java.util.Set extensionOids)
Adds a set of supportedExtension (OID Strings) to the RootDSE. |
void |
removeContextPartition(LdapDN suffix)
|
void |
removeContextPartition(LdapDN suffix,
java.util.Collection bypass)
|
void |
removeNamingListener(javax.naming.event.EventContext ctx,
javax.naming.event.NamingListener namingListener)
|
javax.naming.NamingEnumeration |
search(LdapDN base,
java.util.Map env,
ExprNode filter,
javax.naming.directory.SearchControls searchCtls)
Conducts a search against this ContextPartition. |
javax.naming.NamingEnumeration |
search(LdapDN base,
java.util.Map env,
ExprNode filter,
javax.naming.directory.SearchControls searchCtls,
java.util.Collection bypass)
|
void |
sync()
Flushes any changes made to this partition now. |
void |
unbind(LdapDN bindDn)
Represents an unbind operation issued by an authenticated client. |
void |
unbind(LdapDN bindDn,
java.util.Collection bypass)
|
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 |
Field Detail |
---|
public static final java.util.Collection LOOKUP_BYPASS
public static final java.util.Collection GETMATCHEDDN_BYPASS
public static final java.util.Collection LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS
public static final java.lang.String BYPASS_ALL
public static final java.util.Collection BYPASS_ALL_COLLECTION
Constructor Detail |
---|
public PartitionNexusProxy(javax.naming.Context caller, DirectoryService service)
caller
- a JNDI Context
object that will call this proxyservice
- a JNDI serviceMethod Detail |
---|
public javax.naming.ldap.LdapContext getLdapContext()
PartitionNexus
getLdapContext
in class PartitionNexus
public void init(DirectoryServiceConfiguration factoryCfg, PartitionConfiguration cfg)
Partition
public void destroy()
Partition
public Partition getSystemPartition()
getSystemPartition
in class PartitionNexus
public Partition getPartition(LdapDN dn) throws javax.naming.NamingException
PartitionNexus
getPartition
in class PartitionNexus
dn
- the normalized distinguished name to get a partition for
javax.naming.NamingException
- if there is no partition for the dnpublic LdapDN getSuffix() throws javax.naming.NamingException
Partition
javax.naming.NamingException
public LdapDN getUpSuffix() throws javax.naming.NamingException
Partition
javax.naming.NamingException
public void sync() throws javax.naming.NamingException
Partition
javax.naming.NamingException
public void close() throws javax.naming.NamingException
javax.naming.NamingException
public boolean isInitialized()
Partition
public LdapDN getMatchedName(LdapDN dn) throws javax.naming.NamingException
PartitionNexus
getMatchedName
in class PartitionNexus
dn
- the normalized distinguished name to use for matching.
javax.naming.NamingException
- if there are any problemspublic LdapDN getMatchedName(LdapDN dn, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public LdapDN getSuffix(LdapDN dn) throws javax.naming.NamingException
PartitionNexus
getSuffix
in class PartitionNexus
dn
- the normalized distinguished name to use for finding a suffix.
javax.naming.NamingException
- if there are any problemspublic LdapDN getSuffix(LdapDN dn, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public java.util.Iterator listSuffixes() throws javax.naming.NamingException
PartitionNexus
PartitionNexus
.
listSuffixes
in class PartitionNexus
javax.naming.NamingException
- if there are any problemspublic java.util.Iterator listSuffixes(java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public boolean compare(LdapDN name, java.lang.String oid, java.lang.Object value) throws javax.naming.NamingException
PartitionNexus
compare
in class PartitionNexus
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 boolean compare(LdapDN name, java.lang.String oid, java.lang.Object value, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void delete(LdapDN name) throws javax.naming.NamingException
Partition
name
- the normalized distinguished/absolute name of the entry to
delete from this ContextPartition.
javax.naming.NamingException
- if there are any problemspublic void delete(LdapDN name, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void add(LdapDN normName, javax.naming.directory.Attributes entry) throws javax.naming.NamingException
Partition
entry
- the entry to add to this ContextPartition
javax.naming.NamingException
- if there are any problemspublic void add(LdapDN normName, javax.naming.directory.Attributes entry, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void modify(LdapDN name, int modOp, javax.naming.directory.Attributes mods) throws javax.naming.NamingException
Partition
name
- 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 void modify(LdapDN name, int modOp, javax.naming.directory.Attributes mods, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void modify(LdapDN name, javax.naming.directory.ModificationItem[] mods) throws javax.naming.NamingException
Partition
name
- 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 void modify(LdapDN name, javax.naming.directory.ModificationItem[] mods, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public javax.naming.NamingEnumeration list(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 problemspublic javax.naming.NamingEnumeration list(LdapDN base, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public javax.naming.NamingEnumeration search(LdapDN base, java.util.Map env, 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 problemspublic javax.naming.NamingEnumeration search(LdapDN base, java.util.Map env, ExprNode filter, javax.naming.directory.SearchControls searchCtls, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public javax.naming.directory.Attributes lookup(LdapDN name) throws javax.naming.NamingException
Partition
name
- the normalized distinguished name of the object to lookup
javax.naming.NamingException
- if there are any problemspublic javax.naming.directory.Attributes lookup(LdapDN name, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public javax.naming.directory.Attributes lookup(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 problemspublic javax.naming.directory.Attributes lookup(LdapDN dn, java.lang.String[] attrIds, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public boolean hasEntry(LdapDN name) throws javax.naming.NamingException
Partition
name
- the normalized distinguished/absolute name of the object to
check for existance
javax.naming.NamingException
- if there are any problemspublic boolean hasEntry(LdapDN name, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public boolean isSuffix(LdapDN name) throws javax.naming.NamingException
Partition
name
- the normalized distinguished/absolute name of the context
javax.naming.NamingException
- if there are any problemspublic boolean isSuffix(LdapDN name, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void modifyRn(LdapDN name, java.lang.String newRn, boolean deleteOldRn) throws javax.naming.NamingException
Partition
name
- the normalized distinguished/absolute name of the entry to
modify the RN of.newRn
- the new RN of the entry specified by namedeleteOldRn
- 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 void modifyRn(LdapDN name, java.lang.String newRn, boolean deleteOldRn, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void move(LdapDN oriChildName, 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 problemspublic void move(LdapDN oriChildName, LdapDN newParentName, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void move(LdapDN oriChildName, LdapDN newParentName, java.lang.String newRn, boolean deleteOldRn) 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 targeted entry tonewRn
- the new RN of the entrydeleteOldRn
- 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 void move(LdapDN oriChildName, LdapDN newParentName, java.lang.String newRn, boolean deleteOldRn, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void bind(LdapDN bindDn, byte[] credentials, java.util.List mechanisms, java.lang.String saslAuthId, java.util.Collection bypass) throws javax.naming.NamingException
bindDn
- credentials
- mechanisms
- saslAuthId
- bypass
-
javax.naming.NamingException
public void unbind(LdapDN bindDn, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void bind(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 wrongpublic void unbind(LdapDN bindDn) throws javax.naming.NamingException
Partition
bindDn
- the normalized dn of the principal attempting to unbind
javax.naming.NamingException
- if something goes wrongpublic javax.naming.directory.Attributes getRootDSE() throws javax.naming.NamingException
PartitionNexus
getRootDSE
in class PartitionNexus
javax.naming.NamingException
public javax.naming.directory.Attributes getRootDSE(java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void addContextPartition(PartitionConfiguration config) throws javax.naming.NamingException
addContextPartition
in class PartitionNexus
javax.naming.NamingException
public void addContextPartition(PartitionConfiguration config, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void removeContextPartition(LdapDN suffix) throws javax.naming.NamingException
removeContextPartition
in class PartitionNexus
javax.naming.NamingException
public void removeContextPartition(LdapDN suffix, java.util.Collection bypass) throws javax.naming.NamingException
javax.naming.NamingException
public void registerSupportedExtensions(java.util.Set extensionOids)
PartitionNexus
registerSupportedExtensions
in class PartitionNexus
extensionOids
- a set of OID strings to add to the supportedExtension
attribute in the RootDSEpublic void addNamingListener(javax.naming.event.EventContext ctx, javax.naming.Name name, ExprNode filter, javax.naming.directory.SearchControls searchControls, javax.naming.event.NamingListener namingListener) throws javax.naming.NamingException
javax.naming.NamingException
public void removeNamingListener(javax.naming.event.EventContext ctx, javax.naming.event.NamingListener namingListener) throws javax.naming.NamingException
javax.naming.NamingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |