Package org.opends.server.protocols.ldap
Class LDAPModification
- java.lang.Object
-
- org.opends.server.types.RawModification
-
- org.opends.server.protocols.ldap.LDAPModification
-
public class LDAPModification extends RawModification
This class defines the data structures and methods to use when interacting with an LDAP modification, which describes a change that should be made to an attribute.
-
-
Constructor Summary
Constructors Constructor Description LDAPModification(ModificationType modificationType, RawAttribute attribute)Creates a new LDAP modification with the provided type and attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RawAttributegetAttribute()Retrieves the attribute for this modification.ModificationTypegetModificationType()Retrieves the modification type for this modification.voidsetAttribute(RawAttribute attribute)Specifies the attribute for this modification.voidsetModificationType(ModificationType modificationType)Specifies the modification type for this modification.ModificationtoModification()Creates a new coreModificationobject from this LDAP modification.StringtoString()Retrieves a string representation of this modification.voidtoString(StringBuilder buffer)Appends a string representation of this modification to the provided buffer.voidtoString(StringBuilder buffer, int indent)Appends a multi-line string representation of this LDAP modification to the provided buffer.
-
-
-
Constructor Detail
-
LDAPModification
public LDAPModification(ModificationType modificationType, RawAttribute attribute)
Creates a new LDAP modification with the provided type and attribute.- Parameters:
modificationType- The modification type for this modification.attribute- The attribute for this modification.
-
-
Method Detail
-
getModificationType
public ModificationType getModificationType()
Retrieves the modification type for this modification.- Specified by:
getModificationTypein classRawModification- Returns:
- The modification type for this modification.
-
setModificationType
public void setModificationType(ModificationType modificationType)
Specifies the modification type for this modification.- Specified by:
setModificationTypein classRawModification- Parameters:
modificationType- The modification type for this modification.
-
getAttribute
public RawAttribute getAttribute()
Retrieves the attribute for this modification.- Specified by:
getAttributein classRawModification- Returns:
- The attribute for this modification.
-
setAttribute
public void setAttribute(RawAttribute attribute)
Specifies the attribute for this modification.- Specified by:
setAttributein classRawModification- Parameters:
attribute- The attribute for this modification.
-
toModification
public Modification toModification() throws LDAPException
Creates a new coreModificationobject from this LDAP modification.- Specified by:
toModificationin classRawModification- Returns:
- The decoded modification.
- Throws:
LDAPException- If a problem occurs while trying to convert the LDAP attribute to a coreAttribute.
-
toString
public String toString()
Retrieves a string representation of this modification.- Overrides:
toStringin classRawModification- Returns:
- A string representation of this modification.
-
toString
public void toString(StringBuilder buffer)
Appends a string representation of this modification to the provided buffer.- Specified by:
toStringin classRawModification- Parameters:
buffer- The buffer to which the information should be appended.
-
toString
public void toString(StringBuilder buffer, int indent)
Appends a multi-line string representation of this LDAP modification to the provided buffer.- Specified by:
toStringin classRawModification- Parameters:
buffer- The buffer to which the information should be appended.indent- The number of spaces from the margin that the lines should be indented.
-
-