|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--netscape.ldap.LDAPModificationSet
Represents a set of modifications to be made to attributes in an entry.
A set of modifications is made up of LDAPModification
objects.
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.
LDAPModification
,
LDAPConnection.modify(java.lang.String, netscape.ldap.LDAPModificationSet)
Constructor Summary | |
LDAPModificationSet()
Constructs a new, empty set of modifications. |
Method Summary | |
void |
add(int op,
LDAPAttribute attr)
Specifies another modification to be added to the set of modifications. |
LDAPModification |
elementAt(int index)
Retrieves a particular LDAPModification object at
the position specified by the index. |
void |
remove(java.lang.String name)
Removes the first attribute with the specified name in the set of modifications. |
void |
removeElementAt(int index)
Removes a particular LDAPModification object at
the position specified by the index. |
int |
size()
Retrieves the number of LDAPModification
objects in this set. |
java.lang.String |
toString()
Retrieves the string representation of the modification set. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public LDAPModificationSet()
LDAPModificationsSet.add
method.Method Detail |
public int size()
LDAPModification
objects in this set.LDAPModification
objects in this set.public LDAPModification elementAt(int index)
LDAPModification
object at
the position specified by the index.index
- position of the LDAPModification
object that you want to retrieve.LDAPModification
object representing
a change to make to an attribute.public void removeElementAt(int index)
LDAPModification
object at
the position specified by the index.index
- position of the LDAPModification
object that you want to removepublic void add(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)
If you are working with a binary value (not a string value), you need to bitwise OR (|) the
modification type with LDAPModification.BVALUES
.
attr
- the attribute (possibly with values) to modifypublic void remove(java.lang.String name)
name
- name of the attribute to removepublic java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |