netscape.ldap
Class LDAPModification
java.lang.Object
netscape.ldap.LDAPModification
- java.io.Serializable
public class LDAPModification
extends java.lang.Object
implements java.io.Serializable
Specifies changes to be made to the values of an attribute. The change is
specified in terms of the following aspects:
- the type of modification (add, replace, or delete the value of an attribute)
- the type of value being modified (string or binary)
- the name of the attribute being modified
- the actual value
After you specify a change to an attribute, you can execute the change
by calling the
LDAPConnection.modify
method and specifying
the DN of the entry that you want to modify.
netscape.ldap.LDAPConnection.modify(java.lang.String, netscape.ldap.LDAPModification)
, Serialized Form
static int | ADD - Specifies that a value should be added to an attribute.
|
static int | DELETE - Specifies that a value should be removed from an attribute.
|
static int | REPLACE - Specifies that a value should replace the existing value in an attribute.
|
LDAPAttribute | getAttribute() - Returns the attribute (possibly with values) to be modified.
|
BERElement | getBERElement() - Retrieves the BER (Basic Encoding Rules) representation
of the current modification.
|
int | getOp() - Returns the type of modification specified by this object.
|
String | toString() - Retrieves the string representation of the current
modification.
|
ADD
public static final int ADD
Specifies that a value should be added to an attribute.
DELETE
public static final int DELETE
Specifies that a value should be removed from an attribute.
REPLACE
public static final int REPLACE
Specifies that a value should replace the existing value in an attribute.
LDAPModification
public LDAPModification(int op,
LDAPAttribute attr)
Specifies a modification to be made to an attribute.
op
- the type of modification to make. This can be one of the following:
LDAPModification.ADD
(the value should be added to the attribute)
LDAPModification.DELETE
(the value should be removed from the attribute)
LDAPModification.REPLACE
(the value should replace the existing value of the attribute)
attr
- the attribute (possibly with values) to modify
getAttribute
public LDAPAttribute getAttribute()
Returns the attribute (possibly with values) to be modified.
- the attribute to be modified.
getBERElement
public BERElement getBERElement()
Retrieves the BER (Basic Encoding Rules) representation
of the current modification.
- BER representation of the modification.
getOp
public int getOp()
Returns the type of modification specified by this object.
- one of the following types of modifications:
LDAPModification.ADD
(the value should be added to the attribute)
LDAPModification.DELETE
(the value should be removed from the attribute)
LDAPModification.REPLACE
(the value should replace the existing value of the attribute)
toString
public String toString()
Retrieves the string representation of the current
modification. For example:
LDAPModification: REPLACE, LDAPAttribute {type='mail', values='babs@ace.com'}
LDAPModification: ADD, LDAPAttribute {type='description', values='This entry was modified with the modattrs program'}
- string representation of the current modification.