|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interfaces that bridges between underlying JNDI entries and JNDI
Context
API. DIT (Directory Information Tree) consists one or
above ContextPartition
s whose parent is ContextPartitionNexus
,
and all of them are mapped to different
base suffix. Each partition contains entries whose name ends with that
base suffix.
Field Summary | |
static java.lang.String |
ALIAS_ATTRIBUTE
The aliased Dn attribute name: aliasedObjectName for LDAP and aliasedEntryName or X.500. |
static java.lang.String |
ALIAS_OBJECT
The objectClass name for aliases: 'alias' |
Method Summary | |
void |
add(java.lang.String userProvidedName,
javax.naming.Name normalizedName,
javax.naming.directory.Attributes entry)
Adds an entry to this ContextPartition. |
void |
delete(javax.naming.Name name)
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.Name |
getSuffix(boolean normalized)
Gets the distinguished/absolute name of the suffix for all entries stored within this ContextPartition. |
boolean |
hasEntry(javax.naming.Name name)
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 name)
Checks to see if name is a context suffix. |
javax.naming.NamingEnumeration |
list(javax.naming.Name baseName)
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 name)
Looks up an entry by distinguished/absolute name. |
javax.naming.directory.Attributes |
lookup(javax.naming.Name name,
java.lang.String[] attrIds)
Looks up an entry by distinguished/absolute name. |
void |
modify(javax.naming.Name name,
int modOp,
javax.naming.directory.Attributes attributes)
Modifies an entry by adding, removing or replacing a set of attributes. |
void |
modify(javax.naming.Name name,
javax.naming.directory.ModificationItem[] items)
Modifies an entry by using a combination of adds, removes or replace operations using a set of ModificationItems. |
void |
modifyRn(javax.naming.Name name,
java.lang.String newRn,
boolean deleteOldRn)
Modifies an entry by changing its relative name. |
void |
move(javax.naming.Name oldName,
javax.naming.Name newParentName)
Transplants a child entry, to a position in the namespace under a new parent entry. |
void |
move(javax.naming.Name oldName,
javax.naming.Name 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. |
javax.naming.NamingEnumeration |
search(javax.naming.Name baseName,
java.util.Map environment,
org.apache.ldap.common.filter.ExprNode filter,
javax.naming.directory.SearchControls searchControls)
Conducts a search against this ContextPartition. |
void |
sync()
Flushes any changes made to this partition now. |
Field Detail |
public static final java.lang.String ALIAS_OBJECT
public static final java.lang.String ALIAS_ATTRIBUTE
Method Detail |
public void init(ContextFactoryConfiguration factoryCfg, ContextPartitionConfiguration cfg) throws javax.naming.NamingException
javax.naming.NamingException
public void destroy()
public boolean isInitialized()
public void sync() throws javax.naming.NamingException
javax.naming.NamingException
public javax.naming.Name getSuffix(boolean normalized) throws javax.naming.NamingException
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.
javax.naming.NamingException
public void delete(javax.naming.Name name) throws javax.naming.NamingException
name
- the normalized distinguished/absolute name of the entry to
delete from this ContextPartition.
javax.naming.NamingException
- if there are any problemspublic void add(java.lang.String userProvidedName, javax.naming.Name normalizedName, javax.naming.directory.Attributes entry) throws javax.naming.NamingException
userProvidedName
- the user provided distinguished/absolute name of the entrynormalizedName
- the normalized distinguished/absolute name of the entryentry
- the entry to add to this ContextPartition
javax.naming.NamingException
- if there are any problemspublic void modify(javax.naming.Name name, int modOp, javax.naming.directory.Attributes attributes) throws javax.naming.NamingException
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
.attributes
- 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(javax.naming.Name name, javax.naming.directory.ModificationItem[] items) throws javax.naming.NamingException
name
- the normalized distinguished/absolute name of the entry to modifyitems
- the ModificationItems used to affect the modification with
javax.naming.NamingException
- if there are any problemsModificationItem
public javax.naming.NamingEnumeration list(javax.naming.Name baseName) throws javax.naming.NamingException
baseName
- the base distinguished/absolute name for the search/listing
SearchResult
javax.naming.NamingException
- if there are any problemspublic javax.naming.NamingEnumeration search(javax.naming.Name baseName, java.util.Map environment, org.apache.ldap.common.filter.ExprNode filter, javax.naming.directory.SearchControls searchControls) throws javax.naming.NamingException
baseName
- the normalized distinguished/absolute name of the search baseenvironment
- the environment under which operation occursfilter
- the root node of the filter expression treesearchControls
- the search controls
javax.naming.NamingException
- if there are any problemspublic javax.naming.directory.Attributes lookup(javax.naming.Name name) throws javax.naming.NamingException
name
- the normalized distinguished name of the object to lookup
javax.naming.NamingException
- if there are any problemspublic javax.naming.directory.Attributes lookup(javax.naming.Name name, java.lang.String[] attrIds) throws javax.naming.NamingException
name
- the normalized distinguished name of the object to lookupattrIds
- the set of attributes to return
javax.naming.NamingException
- if there are any problemspublic boolean hasEntry(javax.naming.Name name) throws javax.naming.NamingException
name
- the normalized distinguished/absolute name of the object to
check for existance
javax.naming.NamingException
- if there are any problemspublic boolean isSuffix(javax.naming.Name name) throws javax.naming.NamingException
name
- the normalized distinguished/absolute name of the context
javax.naming.NamingException
- if there are any problemspublic void modifyRn(javax.naming.Name name, java.lang.String newRn, boolean deleteOldRn) throws javax.naming.NamingException
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 move(javax.naming.Name oldName, javax.naming.Name newParentName) throws javax.naming.NamingException
newParentName
- the normalized distinguished/absolute name of the
new parent to move the target entry tooldName
- the normalized distinguished/absolute name of the
original child name representing the child entry to move
javax.naming.NamingException
- if there are any problemspublic void move(javax.naming.Name oldName, javax.naming.Name newParentName, java.lang.String newRn, boolean deleteOldRn) throws javax.naming.NamingException
oldName
- 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 problems
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |