public class ModSet extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
ADD
Modification specifiers for ADD
|
static int |
DELETE
Modification specifiers for DELETE
|
static int |
REPLACE
Modification specifiers for REPLACE
|
Constructor and Description |
---|
ModSet()
Default consturctor
|
ModSet(AttrSet attrSet)
Constructor with an attribute set defaulting all operation types to
ModSet.ADD
|
ModSet(AttrSet attrSet,
int op)
Construct ModSet given the same operation on a set of attributes
|
Modifier and Type | Method and Description |
---|---|
void |
add(int op,
org.forgerock.opendj.ldap.Attribute attr)
Specifies another modification to be added to the set of modifications.
|
org.forgerock.opendj.ldap.Modification |
elementAt(int index)
Retrieves a particular
LDAPModification object at
the position specified by the index. |
void |
remove(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. |
String |
toString()
Retrieves the string representation of the
modification set.
|
public static final int ADD
public static final int REPLACE
public static final int DELETE
public ModSet()
public ModSet(AttrSet attrSet)
attrSet
- Attribute set to construct the modSet. All operations are
default to ModSet.ADDpublic ModSet(AttrSet attrSet, int op)
attrSet
- Attribute set to construct the ModSetop
- Operation type for ADD, REPLACE or DELETEpublic int size()
LDAPModification
objects in this set.LDAPModification
objects in this set.public org.forgerock.opendj.ldap.Modification 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, org.forgerock.opendj.ldap.Attribute 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(String name)
name
- name of the attribute to removeCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.