Class LDAPModification
- java.lang.Object
-
- com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPModification
-
- All Implemented Interfaces:
java.io.Serializable
@NotExtensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class LDAPModification extends java.lang.Object implements java.io.Serializable
This class provides a data structure that represents an LDAP modification.
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, theModification
class should be used instead.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADD
The modification type that indicates that one or more values should be added to the target attribute.static int
DELETE
The modification type that indicates that one or more values should be removed from the target attribute.static int
REPLACE
The modification type that indicates that one or more values should be replaced in target attribute.
-
Constructor Summary
Constructors Constructor Description LDAPModification(int op, LDAPAttribute attr)
Creates a new LDAP modification with the provided information.LDAPModification(Modification modification)
Creates a new LDAP modification from the providedModification
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPAttribute
getAttribute()
Retrieves the attribute to include in this modification.int
getOp()
Retrieves the modification type for this LDAP modification.Modification
toModification()
Retrieves aModification
object that is the equivalent of this LDAP modification.java.lang.String
toString()
Retrieves a string representation of this LDAP modification.
-
-
-
Field Detail
-
ADD
public static final int ADD
The modification type that indicates that one or more values should be added to the target attribute.- See Also:
- Constant Field Values
-
DELETE
public static final int DELETE
The modification type that indicates that one or more values should be removed from the target attribute.- See Also:
- Constant Field Values
-
REPLACE
public static final int REPLACE
The modification type that indicates that one or more values should be replaced in target attribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LDAPModification
public LDAPModification(int op, LDAPAttribute attr)
Creates a new LDAP modification with the provided information.- Parameters:
op
- The type of modification to perform.attr
- The attribute to use for the modification.
-
LDAPModification
public LDAPModification(Modification modification)
Creates a new LDAP modification from the providedModification
object.- Parameters:
modification
- TheModification
object to use to create this LDAP modification.
-
-
Method Detail
-
getOp
public int getOp()
Retrieves the modification type for this LDAP modification.- Returns:
- The modification type for this LDAP modification.
-
getAttribute
public LDAPAttribute getAttribute()
Retrieves the attribute to include in this modification.- Returns:
- The attribute to include in this modification.
-
toModification
public Modification toModification()
Retrieves aModification
object that is the equivalent of this LDAP modification.- Returns:
- A
Modification
object that is the equivalent of this LDAP modification.
-
toString
public java.lang.String toString()
Retrieves a string representation of this LDAP modification.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this LDAP modification.
-
-