com.ca.commons.naming
Class DXOps

java.lang.Object
  |
  +--com.ca.commons.jndi.BasicOps
        |
        +--com.ca.commons.jndi.AdvancedOps
              |
              +--com.ca.commons.naming.DXOps
Direct Known Subclasses:
CBGraphicsOps

public class DXOps
extends AdvancedOps

A wrapper for BasicOps that converts the jndi primative names into com.ca.commons.naming objects...


Field Summary
 
Fields inherited from class com.ca.commons.jndi.AdvancedOps
parser
 
Fields inherited from class com.ca.commons.jndi.BasicOps
ALWAYSLOG, CHANGELOG, connectionData, ctx, DONTLOG, ldapVersion, VERBOSELOG
 
Constructor Summary
DXOps(javax.naming.directory.DirContext ctx)
          Initialise with the directory context.
 
Method Summary
 boolean addEntry(DXEntry newEntry)
          Add the new entry to the directory.
 boolean modifyEntry(DXEntry oldEntry, DXEntry newEntry)
          Update an entry with the designated DN.
 javax.naming.Name postParse(javax.naming.Name name)
          This postparses a name, after it has been returned from the jndi operation.
 javax.naming.Name postParse(java.lang.String name)
          This postparses a name, after it has been returned from the jndi operation.
 javax.naming.NamingEnumeration postParseNameClassPairs(javax.naming.NamingEnumeration e, javax.naming.Name base)
          This postparses a namingEnumeration of NameClassPairs, after it has been returned from the jndi operation.
 java.lang.String postParseString(java.lang.String name)
          This postparses a name, after it has been returned from the jndi operation.
 javax.naming.Name preParse(javax.naming.Name name)
          This preparses a name, preparitory to passing to the jndi operation.
 boolean updateEntry(DXEntry oldSet, DXEntry newSet)
          Update an entry with the designated DN.
 
Methods inherited from class com.ca.commons.jndi.AdvancedOps
close, copyTree, deleteTree, getInstance, inc, moveTree, open, pop, push, recCopyTree, recDeleteTree, recMoveTree
 
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, 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
 

Constructor Detail

DXOps

public DXOps(javax.naming.directory.DirContext ctx)
Initialise with the directory context.

Method Detail

preParse

public javax.naming.Name preParse(javax.naming.Name name)
This preparses a name, preparitory to passing to the jndi operation. Usefull to over-ride if a Name needs to be escaped or re-formatted.

Overrides:
preParse in class BasicOps
Parameters:
name - the pre jndi operation name.
Returns:
the version used by the operation.

postParse

public javax.naming.Name postParse(javax.naming.Name name)
This postparses a name, after it has been returned from the jndi operation. Usefull to over-ride if the name needs to be unescaped or reformatted.

Overrides:
postParse in class BasicOps
Parameters:
name - the post jndi operation name.
Returns:
the re-formatted version used by the application.

postParse

public javax.naming.Name postParse(java.lang.String name)
This postparses a name, after it has been returned from the jndi operation. It assumes that it has got a jndi CompositeName that needs to be converted to a legal ldap dn (i.e. an ldap CompoundName). If this is *not* the case, there will be trouble...

Parameters:
name - the post jndi operation name.
Returns:
the re-formatted version used by the application, as a DN object.

postParseString

public java.lang.String postParseString(java.lang.String name)
This postparses a name, after it has been returned from the jndi operation. It assumes that it has got a jndi CompositeName that needs to be converted to a legal ldap dn (i.e. an ldap CompoundName). If this is *not* the case, there will be trouble...

Parameters:
name - the post jndi operation name.
Returns:
the re-formatted version used by the application as an ldap String.

postParseNameClassPairs

public javax.naming.NamingEnumeration postParseNameClassPairs(javax.naming.NamingEnumeration e,
                                                              javax.naming.Name base)
                                                       throws javax.naming.NamingException
This postparses a namingEnumeration of NameClassPairs, after it has been returned from the jndi operation. Usefull to over-ride if the names in the enumeration need to be unescaped or reformatted.

Overrides:
postParseNameClassPairs in class BasicOps
Parameters:
e - the post jndi operation namingEnumeration.
Returns:
the re-formatted version used by the application.
javax.naming.NamingException

modifyEntry

public boolean modifyEntry(DXEntry oldEntry,
                           DXEntry newEntry)
Update an entry with the designated DN.

Parameters:
oldEntry - the old entry containing teh old set of attributes.
newEntry - the new entry containing the replacement set of attributes.
Returns:
the operation's success status.

addEntry

public boolean addEntry(DXEntry newEntry)
Add the new entry to the directory.

Parameters:
newEntry - the new entry containing the replacement set of attributes.
Returns:
the operation's success status

updateEntry

public boolean updateEntry(DXEntry oldSet,
                           DXEntry newSet)
Update an entry with the designated DN.

Returns:
the operation's success status.