- java.lang.Object
-
- javax.naming.directory.ModificationItem
-
- All Implemented Interfaces:
- Serializable
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.
- Since:
- 1.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ModificationItem(int mod_op, Attribute attr)
Creates a new instance of ModificationItem.
-
Method Summary
Methods Modifier and Type Method and Description Attribute
getAttribute()
Retrieves the attribute associated with this modification item.int
getModificationOp()
Retrieves the modification code of this modification item.String
toString()
Generates the string representation of this modification item, which consists of the modification operation and its related attribute.
-
-
-
Constructor Detail
-
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_ATTRIBUTEattr
- 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.
-
-
Method Detail
-
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
-
getAttribute
public Attribute getAttribute()
Retrieves the attribute associated with this modification item.- Returns:
- The non-null attribute to use for the modification.
-
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.
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/naming/directory/modificationitem.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.