APIdia Launch Partner
Top Description Fields Constructors Methods
javax.naming.directory

public Class ModificationItem

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.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.

Authors
Rosanna Lee, Scott Seligman
Since
1.3

Field Summary

Modifier and TypeField and Description
private Attribute
attr

Contains the attribute identifying the attribute and/or its value to be applied for the modification.

private int
mod_op

Contains an integer identify the modification to be performed.

private static final long
serialVersionUID

Use serialVersionUID from JNDI 1.1.1 for interoperability

Constructor Summary

AccessConstructor and Description
public
ModificationItem(int
Modification to apply. It must be one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE
mod_op
,
Attribute
The non-null attribute to use for modification.
attr
)

Creates a new instance of ModificationItem.

Method Summary

Modifier and TypeMethod and Description
public Attribute

Returns:

The non-null attribute to use for the modification.
getAttribute
()

Retrieves the attribute associated with this modification item.

public int

Returns:

The modification code. It is one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE
getModificationOp
()

Retrieves the modification code of this modification item.

public String

Returns:

The non-null string representation of this modification item.
toString
()

Overrides java.lang.Object.toString.

Generates the string representation of this modification item, which consists of the modification operation and its related attribute.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

attrback to summary
private Attribute attr

Contains the attribute identifying the attribute and/or its value to be applied for the modification.

mod_opback to summary
private int mod_op

Contains an integer identify the modification to be performed.

serialVersionUIDback to summary
private static final long serialVersionUID

Use serialVersionUID from JNDI 1.1.1 for interoperability

Constructor Detail

ModificationItemback to summary
public ModificationItem(int mod_op, Attribute attr)

Creates a new instance of ModificationItem.

Parameters
mod_op:int

Modification to apply. It must be one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE

attr:Attribute

The non-null attribute to use for modification.

Exceptions
IllegalArgumentException:
If attr is null, or if mod_op is not one of the ones specified above.

Method Detail

getAttributeback to summary
public Attribute getAttribute()

Retrieves the attribute associated with this modification item.

Returns:Attribute

The non-null attribute to use for the modification.

getModificationOpback to summary
public int getModificationOp()

Retrieves the modification code of this modification item.

Returns:int

The modification code. It is one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE

toStringback to summary
public String toString()

Overrides java.lang.Object.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:String

The non-null string representation of this modification item.