com.ca.directory.jxplorer.broker
Class Special

java.lang.Object
  |
  +--com.ca.directory.jxplorer.broker.Special

public class Special
extends java.lang.Object

This static class contains special code for Mitchell Rozonkiewiecz of the OS390 security group, who requires special handling of ldap modify requests. It is only activated if a file 'specialocs.txt' is present in the browser home directory.


Method Summary
static boolean emptyAtt(javax.naming.directory.Attribute att)
          Utility ftn: checks that an attribute is not null and has at least one non-null value.
static DXAttributes getAdditionSet(RDN newRDN, javax.naming.directory.Attributes oldSet, javax.naming.directory.Attributes newSet)
          Returns the set of attributes that are in the newSet, but not in the old set, excluding the rdnclass.
static DXAttributes getDeletionSet(RDN newRDN, javax.naming.directory.Attributes oldSet, javax.naming.directory.Attributes newSet)
          Returns the set of attributes that are in the oldSet, but not in the new set, and thus must be deleted.
static DXAttribute getDiff(javax.naming.directory.Attribute baseAtt, javax.naming.directory.Attribute changeAtt)
          Returns an attribute containing all values that are contained in changeAtt, but not in baseAtt.
static DXAttributes getReplacementSet(RDN newRDN, javax.naming.directory.Attributes oldSet, javax.naming.directory.Attributes newSet)
          Returns all attributes that have not changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAdditionSet

public static DXAttributes getAdditionSet(RDN newRDN,
                                          javax.naming.directory.Attributes oldSet,
                                          javax.naming.directory.Attributes newSet)
                                   throws javax.naming.NamingException
Returns the set of attributes that are in the newSet, but not in the old set, excluding the rdnclass. IN ADDITION: it returns the set of all attribute values that have been modified or added as a add records (In the case of modified attributes, this requires a separate delete op to work properly)

Parameters:
newRDN - the RDN of the newer entry. (usually this is the same as the RDN of the original entry). May be null if it is not to be checked. Not currently used
oldSet - the set of already existing attributes
newSet - the set of new attributes to test
Returns:
attributes that must be added to the object.
javax.naming.NamingException

getDiff

public static DXAttribute getDiff(javax.naming.directory.Attribute baseAtt,
                                  javax.naming.directory.Attribute changeAtt)
Returns an attribute containing all values that are contained in changeAtt, but not in baseAtt.

Parameters:
baseAtt - the basic attribute set to compare changeAtt against
changeAtt - an attribute set containing possibly changed values.

getReplacementSet

public static DXAttributes getReplacementSet(RDN newRDN,
                                             javax.naming.directory.Attributes oldSet,
                                             javax.naming.directory.Attributes newSet)
                                      throws javax.naming.NamingException
Returns all attributes that have not changed.

Parameters:
newRDN - the RDN of the newer entry. (usually this is the same as the RDN of the original entry). May be null if it is not to be checked.
oldSet - the set of already existing attributes
newSet - the set of new attributes to test
Returns:
attributes that require updating
javax.naming.NamingException

getDeletionSet

public static DXAttributes getDeletionSet(RDN newRDN,
                                          javax.naming.directory.Attributes oldSet,
                                          javax.naming.directory.Attributes newSet)
                                   throws javax.naming.NamingException
Returns the set of attributes that are in the oldSet, but not in the new set, and thus must be deleted. (excluding the rdnclass).

Parameters:
newRDN - the RDN of the newer entry. (usually this is the same as the RDN of the original entry). May be null if it is not to be checked.
oldSet - the set of already existing attributes
newSet - the set of new attributes to test
javax.naming.NamingException

emptyAtt

public static boolean emptyAtt(javax.naming.directory.Attribute att)
Utility ftn: checks that an attribute is not null and has at least one non-null value.