com.ibm.dse.services.ldap
Class ModMapping

java.lang.Object
  |
  +--com.ibm.dse.services.ldap.Mapping
        |
        +--com.ibm.dse.services.ldap.ModMapping

public class ModMapping
extends Mapping

This class represents an LDAP modification item. It extends from Mapping, and provides support for specifying the attribute to be modified, as well as the modification code to use. The attribute to be modified will be created with the name specified in targetName, and with the value obtained from sourceName (or the default value if none).


Field Summary
static int ADD
           
static int REMOVE
           
static int REPLACE
           
 
Constructor Summary
ModMapping()
          ModFormatItem constructor.
 
Method Summary
 java.lang.String convertModCode(int modCode)
          Returns a string representing the modification code attribute of this mapping.
 boolean equals(java.lang.Object o)
          This method defines equality between two ModMapping objects.
 int getModificationCode()
          Returns the modification code attribute.
 int hashCode()
          Returns a hashcode for this object.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes this objects state from externalized data.
 void setModificationCode(int newModificationCode)
          Sets the modification code attribute of this object.
 java.lang.String toString()
          Returns the string representation of this object.
 int translateModCode(java.lang.String modValue)
          A utility method for translating a string value into a valid modification code.
 
Methods inherited from class com.ibm.dse.services.ldap.Mapping
getDefaultValue, getFormat, getName, getSourceName, getTargetName, setDefaultValue, setName, setSourceName, setTargetName, toStrings
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD

public static final int ADD

REMOVE

public static final int REMOVE

REPLACE

public static final int REPLACE
Constructor Detail

ModMapping

public ModMapping()
ModFormatItem constructor.
Method Detail

convertModCode

public java.lang.String convertModCode(int modCode)
Returns a string representing the modification code attribute of this mapping.
Parameters:
modCode - int
Returns:
java.lang.String

equals

public boolean equals(java.lang.Object o)
This method defines equality between two ModMapping objects.
Overrides:
equals in class Mapping
Parameters:
o - java.lang.Object
Returns:
boolean

getModificationCode

public int getModificationCode()
Returns the modification code attribute.
Returns:
int

hashCode

public int hashCode()
Returns a hashcode for this object. Caveat: if this object instance is reused, and the targetName, sourceName, defaultValue, and modificationCode properties are identical, then hashCode uniqueness cannot be assured.
Overrides:
hashCode in class Mapping
Returns:
int

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException,
                                       DSEException
Initializes this objects state from externalized data.
Overrides:
initializeFrom in class Mapping
Parameters:
aTag - com.ibm.dse.base.Tag
Returns:
java.lang.Object
Throws:
java.io.IOException -  
DSEException -  

setModificationCode

public void setModificationCode(int newModificationCode)
Sets the modification code attribute of this object.
Parameters:
newModificationCode - int

toString

public java.lang.String toString()
Returns the string representation of this object.
Overrides:
toString in class Mapping
Returns:
java.lang.String

translateModCode

public int translateModCode(java.lang.String modValue)
                     throws DSEException
A utility method for translating a string value into a valid modification code. The valid value to pass are: add remove replace
Parameters:
modValue - java.lang.String
Returns:
int
Throws:
DSEException -