mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
18.39.2015 e8cead474d5ce2b933d931f0c4743a78e68d9cfc
opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/DeleteResponseProtocolOp.java
@@ -26,16 +26,15 @@
 */
package org.opends.server.protocols.ldap;
import org.forgerock.i18n.LocalizableMessage;
import java.util.List;
import java.io.IOException;
import java.util.List;
import org.forgerock.opendj.io.*;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.io.ASN1Writer;
import org.forgerock.util.Utils;
import org.opends.server.types.DN;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
import static org.opends.server.util.ServerConstants.*;
@@ -50,17 +49,12 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The matched DN for this response. */
  private DN matchedDN;
  /** The result code for this response. */
  private int resultCode;
  /** The set of referral URLs for this response. */
  private List<String> referralURLs;
  /** The error message for this response. */
  private LocalizableMessage errorMessage;
@@ -74,10 +68,6 @@
  public DeleteResponseProtocolOp(int resultCode)
  {
    this.resultCode = resultCode;
    errorMessage = null;
    matchedDN = null;
    referralURLs = null;
  }
@@ -93,9 +83,6 @@
  {
    this.resultCode   = resultCode;
    this.errorMessage = errorMessage;
    matchedDN    = null;
    referralURLs = null;
  }
@@ -168,36 +155,19 @@
    return referralURLs;
  }
  /**
   * Retrieves the BER type for this protocol op.
   *
   * @return  The BER type for this protocol op.
   */
  @Override
  public byte getType()
  {
    return OP_TYPE_DELETE_RESPONSE;
  }
  /**
   * Retrieves the name for this protocol op type.
   *
   * @return  The name for this protocol op type.
   */
  @Override
  public String getProtocolOpName()
  {
    return "Delete Response";
  }
  /**
   * Writes this protocol op to an ASN.1 output stream.
   *
   * @param stream The ASN.1 output stream to write to.
   * @throws IOException If a problem occurs while writing to the stream.
   */
  @Override
  public void write(ASN1Writer stream) throws IOException
  {
    stream.writeStartSequence(OP_TYPE_DELETE_RESPONSE);
@@ -234,14 +204,7 @@
    stream.writeEndSequence();
  }
  /**
   * Appends a string representation of this LDAP protocol op to the provided
   * buffer.
   *
   * @param  buffer  The buffer to which the string should be appended.
   */
  @Override
  public void toString(StringBuilder buffer)
  {
    buffer.append("DeleteResponse(resultCode=");
@@ -260,23 +223,14 @@
    if (referralURLs != null && !referralURLs.isEmpty())
    {
      buffer.append(", referralURLs={");
      buffer.append(Utils.joinAsString(", ", referralURLs));
      Utils.joinAsString(buffer, ", ", referralURLs);
      buffer.append("}");
    }
    buffer.append(")");
  }
  /**
   * Appends a multi-line string representation of this LDAP protocol op to the
   * provided buffer.
   *
   * @param  buffer  The buffer to which the information should be appended.
   * @param  indent  The number of spaces from the margin that the lines should
   *                 be indented.
   */
  @Override
  public void toString(StringBuilder buffer, int indent)
  {
    StringBuilder indentBuf = new StringBuilder(indent);
@@ -326,4 +280,3 @@
    }
  }
}