All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.naming.directory.ModificationItem

java.lang.Object
   |
   +----javax.naming.directory.ModificationItem

public class ModificationItem
extends Object
implements Serializable
This class represents a modification item. It consists of a modification code and an attribute on which to operate.

A ModificationItem instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single ModificationItem instance should lock the object.

The serialized form of a ModificationItem object consists of the modification op (and int) and the corresponding Attribute.


Constructor Index

 o ModificationItem(int, Attribute)
Creates a new instance of ModificationItem.

Method Index

 o getAttribute()
Retrieves the attribute associated with this modification item.
 o getModificationOp()
Retrieves the modification code of this modification item.
 o toString()
Generates the string representation of this modification item, which consists of the modification operation and its related attribute.

Constructors

 o ModificationItem
 public ModificationItem(int mod_op,
                         Attribute attr)
Creates a new instance of ModificationItem.

Parameters:
mod_op - Modification to apply. It must be one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE
attr - The non-null attribute to use for modification.
Throws: IllegalArgumentException
If attr is null, or if mod_op is not one of the ones specified above.

Methods

 o getModificationOp
 public int getModificationOp()
Retrieves the modification code of this modification item.

Returns:
The modification code. It is one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE
 o getAttribute
 public Attribute getAttribute()
Retrieves the attribute associated with this modification item.

Returns:
The non-null attribute to use for the modification.
 o toString
 public String toString()
Generates the string representation of this modification item, which consists of the modification operation and its related attribute. The string representation is meant for debugging and not to be interpreted programmatically.

Returns:
The non-null string representation of this modification item.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index