public class LDAPModification
extends java.lang.Object
implements java.io.Serializable
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.
LDAPConnection.modify(java.lang.String, netscape.ldap.LDAPModification)
,
Serialized FormModifier and Type | Field and Description |
---|---|
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.
|
Constructor and Description |
---|
LDAPModification(int op,
LDAPAttribute attr)
Specifies a modification to be made to an attribute.
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.String |
toString()
Retrieves the string representation of the current
modification.
|
public static final int ADD
public static final int DELETE
public static final int REPLACE
public LDAPModification(int op, LDAPAttribute attr)
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 modifyLDAPAttribute
public int getOp()
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)
public LDAPAttribute getAttribute()
LDAPAttribute
public BERElement getBERElement()
public java.lang.String toString()
LDAPModification: REPLACE, LDAPAttribute {type='mail', values='babs@ace.com'} LDAPModification: ADD, LDAPAttribute {type='description', values='This entry was modified with the modattrs program'}
toString
in class java.lang.Object