|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.ca.commons.jndi.BasicOps
|
+--com.ca.commons.jndi.AdvancedOps
The AdvancedOps class extends BasicOps to allow for complex directory operations such as manipulating entire trees.
It requires initialisation with a Directory Context, through which all the low level directory calls are passed (basicOps is a wrapper to jndi). It contains a number of functions (pop(), push() and inc() ) that may be over-ridden by classes derived from this that with to track progress.
| Field Summary | |
protected javax.naming.NameParser |
parser
|
| Fields inherited from class com.ca.commons.jndi.BasicOps |
ALWAYSLOG, CHANGELOG, connectionData, ctx, DONTLOG, ldapVersion, VERBOSELOG |
| Constructor Summary | |
AdvancedOps(javax.naming.directory.DirContext c)
Initialise the AdvancedOps object with a BasicOps object. |
|
| Method Summary | |
void |
close()
overload this method for progress tracker. |
boolean |
copyTree(javax.naming.Name oldNodeDN,
javax.naming.Name newNodeDN)
Copies a DN representing a subtree to a new subtree, including copying all subordinate entries. |
boolean |
deleteTree(javax.naming.Name nodeDN)
|
static BasicOps |
getInstance(ConnectionData cData)
Factory Method to create BasicOps objects, initialised with an ldap context created from the connectionData, and maintaining a reference to that connectionData. |
void |
inc()
overload this method for progress tracker. |
boolean |
moveTree(javax.naming.Name oldNodeDN,
javax.naming.Name newNodeDN)
Moves a DN to a new DN, including all subordinate entries. |
void |
open(java.lang.String heading,
java.lang.String operationName)
overload this method for progress tracker. |
void |
pop()
overload this method for progress tracker. |
javax.naming.NamingEnumeration |
push(javax.naming.NamingEnumeration elements)
overload this method for progress tracker. |
boolean |
recCopyTree(javax.naming.Name from,
javax.naming.Name to)
Takes two DNs, and goes through the first, copying each element from the top down to the new DN. |
boolean |
recDeleteTree(javax.naming.Name dn)
deletes a subtree by recursively deleting sub-sub trees. |
boolean |
recMoveTree(javax.naming.Name from,
javax.naming.Name to)
Moves a tree. |
| Methods inherited from class com.ca.commons.jndi.BasicOps |
addAttribute, addAttributes, addObject, copyObject, deleteAttribute, deleteAttributes, deleteObject, error, exists, getBaseNameParser, getContext, getLdapVersion, getSchema, list, log, modifyAttributes, modifyAttributes, openContext, openContext, openContext, openContext, openContext, openContext, postParse, postParseNameClassPairs, preParse, read, read, renameObject, searchBaseObject, searchBaseObject, searchOneLevel, searchOneLevel, searchSubTree, searchSubTree, setConnectionData, updateAttribute, updateAttributes, updateObject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected javax.naming.NameParser parser
| Constructor Detail |
public AdvancedOps(javax.naming.directory.DirContext c)
Warning: the basic ops object is used to obtain a Name Parser for the current context, which is asumed to be homogenous: AdvancedOps does *not* support tree operations across multiple name spaces.
| Method Detail |
public static BasicOps getInstance(ConnectionData cData)
throws javax.naming.NamingException
cData - the details of the directory to connect to
javax.naming.NamingException
public void open(java.lang.String heading,
java.lang.String operationName)
public void close()
close in class BasicOpspublic void pop()
public javax.naming.NamingEnumeration push(javax.naming.NamingEnumeration elements)
public void inc()
public boolean deleteTree(javax.naming.Name nodeDN)
public boolean recDeleteTree(javax.naming.Name dn)
dn - the distinguished name of the sub-tree apex to delete.
public boolean moveTree(javax.naming.Name oldNodeDN,
javax.naming.Name newNodeDN)
public boolean recMoveTree(javax.naming.Name from,
javax.naming.Name to)
If the new tree creation fails during creation, an attempt is made to delete the new tree, and the operation fails. If the new tree creation succeeds, but the old tree deletion fails, the operation fails, leaving the new tree and the partial old tree in existence. (This last should be unlikely.)
public boolean copyTree(javax.naming.Name oldNodeDN,
javax.naming.Name newNodeDN)
oldNodeDN - the original DN of the sub tree root
to be copied (may be a single entry).newNodeDN - the target DN for the tree to be moved to.
public boolean recCopyTree(javax.naming.Name from,
javax.naming.Name to)
from - the ldap Name dn to copy the tree fromto - the ldap Name dn to copy the tree to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||