Package org.opends.server.types
Class RawModification
- java.lang.Object
-
- org.opends.server.types.RawModification
-
- Direct Known Subclasses:
LDAPModification
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public abstract class RawModification extends Object
This class defines the data structures and methods to use when interacting with a raw modification, which describes a change that should be made to an attribute.
-
-
Constructor Summary
Constructors Constructor Description RawModification()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static RawModificationcreate(ModificationType modificationType, String attributeType)Creates a new raw modification with the provided type and attribute.static RawModificationcreate(ModificationType modificationType, String attributeType, String attributeValue)Creates a new raw modification with the provided type and attribute.static RawModificationcreate(ModificationType modificationType, String attributeType, ArrayList<ByteString> attributeValues)Creates a new raw modification with the provided type and attribute.static RawModificationcreate(ModificationType modificationType, String attributeType, ByteString attributeValue)Creates a new raw modification with the provided type and attribute.static RawModificationcreate(ModificationType modificationType, RawAttribute attribute)Creates a new raw modification with the provided type and attribute.static LDAPModificationdecode(ASN1Reader reader)Decodes the elements from the provided ASN.1 reader as an LDAP modification.abstract RawAttributegetAttribute()Retrieves the attribute for this modification.abstract ModificationTypegetModificationType()Retrieves the modification type for this modification.abstract voidsetAttribute(RawAttribute attribute)Specifies the attribute for this modification.abstract voidsetModificationType(ModificationType modificationType)Specifies the modification type for this modification.abstract ModificationtoModification()Creates a new coreModificationobject from this raw modification.StringtoString()Retrieves a string representation of this modification.abstract voidtoString(StringBuilder buffer)Appends a string representation of this modification to the provided buffer.abstract voidtoString(StringBuilder buffer, int indent)Appends a multi-line string representation of this LDAP modification to the provided buffer.voidwrite(ASN1Writer stream)Writes this modification to an ASN.1 stream.
-
-
-
Method Detail
-
create
public static RawModification create(ModificationType modificationType, RawAttribute attribute)
Creates a new raw modification with the provided type and attribute.- Parameters:
modificationType- The modification type for this modification.attribute- The attribute for this modification.- Returns:
- The constructed raw modification.
-
create
public static RawModification create(ModificationType modificationType, String attributeType)
Creates a new raw modification with the provided type and attribute.- Parameters:
modificationType- The modification type for this modification.attributeType- The name of the attribute type for this modification.- Returns:
- The constructed raw modification.
-
create
public static RawModification create(ModificationType modificationType, String attributeType, String attributeValue)
Creates a new raw modification with the provided type and attribute.- Parameters:
modificationType- The modification type for this modification.attributeType- The name of the attribute type for this modification.attributeValue- The attribute value for this modification.- Returns:
- The constructed raw modification.
-
create
public static RawModification create(ModificationType modificationType, String attributeType, ByteString attributeValue)
Creates a new raw modification with the provided type and attribute.- Parameters:
modificationType- The modification type for this modification.attributeType- The name of the attribute type for this modification.attributeValue- The attribute value for this modification.- Returns:
- The constructed raw modification.
-
create
public static RawModification create(ModificationType modificationType, String attributeType, ArrayList<ByteString> attributeValues)
Creates a new raw modification with the provided type and attribute.- Parameters:
modificationType- The modification type for this modification.attributeType- The name of the attribute type for this modification.attributeValues- The set of attribute values for this modification.- Returns:
- The constructed raw modification.
-
getModificationType
public abstract ModificationType getModificationType()
Retrieves the modification type for this modification.- Returns:
- The modification type for this modification.
-
setModificationType
public abstract void setModificationType(ModificationType modificationType)
Specifies the modification type for this modification.- Parameters:
modificationType- The modification type for this modification.
-
getAttribute
public abstract RawAttribute getAttribute()
Retrieves the attribute for this modification.- Returns:
- The attribute for this modification.
-
setAttribute
public abstract void setAttribute(RawAttribute attribute)
Specifies the attribute for this modification.- Parameters:
attribute- The attribute for this modification.
-
write
public void write(ASN1Writer stream) throws IOException
Writes this modification to an ASN.1 stream.- Parameters:
stream- The ASN.1 output stream to write to.- Throws:
IOException- If a problem occurs while writing to the stream.
-
decode
public static LDAPModification decode(ASN1Reader reader) throws LDAPException
Decodes the elements from the provided ASN.1 reader as an LDAP modification.- Parameters:
reader- The ASN.1 reader.- Returns:
- The decoded LDAP modification.
- Throws:
LDAPException- If a problem occurs while attempting to decode the provided ASN.1 element as a raw modification.
-
toModification
public abstract Modification toModification() throws LDAPException
Creates a new coreModificationobject from this raw modification.- Returns:
- The decoded modification.
- Throws:
LDAPException- If a problem occurs while trying to convert the raw modification to a coreModification.
-
toString
public String toString()
Retrieves a string representation of this modification.
-
toString
public abstract void toString(StringBuilder buffer)
Appends a string representation of this modification to the provided buffer.- Parameters:
buffer- The buffer to which the information should be appended.
-
toString
public abstract void toString(StringBuilder buffer, int indent)
Appends a multi-line string representation of this LDAP modification to the provided buffer.- 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.
-
-