Class RawModification

    • Constructor Detail

      • RawModification

        public RawModification()
    • 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 core Modification object from this raw modification.
        Returns:
        The decoded modification.
        Throws:
        LDAPException - If a problem occurs while trying to convert the raw modification to a core Modification.
      • toString

        public String toString()
        Retrieves a string representation of this modification.
        Overrides:
        toString in class Object
        Returns:
        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.