Package com.iplanet.services.ldap
Class ModSet
- java.lang.Object
-
- com.iplanet.services.ldap.ModSet
-
- All Implemented Interfaces:
Serializable
public class ModSet extends Object implements Serializable
Represents a set of modification on attributes- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int op, org.forgerock.opendj.ldap.Attribute attr)Specifies another modification to be added to the set of modifications.org.forgerock.opendj.ldap.ModificationelementAt(int index)Retrieves a particularLDAPModificationobject at the position specified by the index.voidremove(String name)Removes the first attribute with the specified name in the set of modifications.voidremoveElementAt(int index)Removes a particularLDAPModificationobject at the position specified by the index.intsize()Retrieves the number ofLDAPModificationobjects in this set.StringtoString()Retrieves the string representation of the modification set.
-
-
-
Constructor Detail
-
ModSet
public ModSet()
Default consturctor
-
ModSet
public ModSet(AttrSet attrSet)
Constructor with an attribute set defaulting all operation types to ModSet.ADD- Parameters:
attrSet- Attribute set to construct the modSet. All operations are default to ModSet.ADD
-
ModSet
public ModSet(AttrSet attrSet, int op)
Construct ModSet given the same operation on a set of attributes- Parameters:
attrSet- Attribute set to construct the ModSetop- Operation type for ADD, REPLACE or DELETE
-
-
Method Detail
-
size
public int size()
Retrieves the number ofLDAPModificationobjects in this set.- Returns:
- the number of
LDAPModificationobjects in this set.
-
elementAt
public org.forgerock.opendj.ldap.Modification elementAt(int index)
Retrieves a particularLDAPModificationobject at the position specified by the index.- Parameters:
index- position of theLDAPModificationobject that you want to retrieve.- Returns:
LDAPModificationobject representing a change to make to an attribute.
-
removeElementAt
public void removeElementAt(int index)
Removes a particularLDAPModificationobject at the position specified by the index.- Parameters:
index- position of theLDAPModificationobject that you want to remove
-
add
public void add(int op, org.forgerock.opendj.ldap.Attribute attr)Specifies another modification to be added to the set of modifications.- Parameters:
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 modify
-
remove
public void remove(String name)
Removes the first attribute with the specified name in the set of modifications.- Parameters:
name- name of the attribute to remove
-
-