Class LDAPPreReadRequestControl


  • public class LDAPPreReadRequestControl
    extends Control
    This class implements the pre-read request control as defined in RFC 4527. This control makes it possible to retrieve an entry in the state that it held immediately before a modify, delete, or modify DN operation. It may specify a specific set of attributes that should be included in that entry. The entry will be encoded in a corresponding response control.
    • Constructor Detail

      • LDAPPreReadRequestControl

        public LDAPPreReadRequestControl​(boolean isCritical,
                                         Set<String> rawAttributes)
        Creates a new instance of this LDAP pre-read request control with the provided information.
        Parameters:
        isCritical - Indicates whether support for this control should be considered a critical part of the server processing.
        rawAttributes - The set of raw attributes to return in the entry. A null or empty set will indicates that all user attributes should be returned.
    • Method Detail

      • writeValue

        public void writeValue​(ASN1Writer writer)
                        throws IOException
        Writes this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.
        Specified by:
        writeValue in class Control
        Parameters:
        writer - The ASN.1 output stream to write to.
        Throws:
        IOException - If a problem occurs while writing to the stream.
      • getRawAttributes

        public Set<String> getRawAttributes()
        Retrieves the raw, unprocessed set of requested attributes. It must not be altered by the caller without calling setRawAttributes with the updated set.
        Returns:
        The raw, unprocessed set of attributes.
      • getRequestedAttributes

        public Set<String> getRequestedAttributes()
        Retrieves the set of processed attributes that have been requested for inclusion in the entry that is returned.
        Returns:
        The set of processed attributes that have been requested for inclusion in the entry that is returned.
      • toString

        public void toString​(StringBuilder buffer)
        Appends a string representation of this LDAP pre-read request control to the provided buffer.
        Overrides:
        toString in class Control
        Parameters:
        buffer - The buffer to which the information should be appended.