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

Jean-Noel Rouvignac
26.35.2013 597a315998e4d59414a967a7268cf1e7f8006b8c
opendj-sdk/opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java
@@ -27,19 +27,19 @@
 */
package org.opends.server.replication.protocol;
import static org.opends.server.replication.protocol.OperationContext.*;
import java.io.UnsupportedEncodingException;
import java.util.zip.DataFormatException;
import org.opends.server.controls.SubtreeDeleteControl;
import org.opends.server.core.DeleteOperation;
import org.opends.server.core.DeleteOperationBasis;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.replication.common.CSN;
import org.opends.server.types.ByteString;
import org.opends.server.types.Operation;
import org.opends.server.types.DN;
import org.opends.server.types.operation.PostOperationDeleteOperation;
import static org.opends.server.replication.protocol.OperationContext.*;
/**
 * Object used when sending delete information to replication servers.
 */
@@ -58,7 +58,7 @@
  public DeleteMsg(PostOperationDeleteOperation operation)
  {
    super((OperationContext) operation.getAttachment(SYNCHROCONTEXT),
           operation.getRawEntryDN().toString());
           operation.getEntryDN());
    try
    {
      if (operation.getRequestControl(SubtreeDeleteControl.DECODER) != null)
@@ -75,7 +75,7 @@
   * @param csn          The CSN with which the message must be created.
   * @param entryUUID    The unique id with which the message must be created.
   */
  public DeleteMsg(String dn, CSN csn, String entryUUID)
  public DeleteMsg(DN dn, CSN csn, String entryUUID)
  {
    super(new DeleteContext(csn, entryUUID), dn);
  }
@@ -111,13 +111,12 @@
   * {@inheritDoc}
   */
  @Override
  public Operation createOperation(InternalClientConnection connection,
      String newDn)
  public DeleteOperation createOperation(InternalClientConnection connection,
      DN newDN)
  {
    DeleteOperationBasis del =  new DeleteOperationBasis(connection,
    DeleteOperation del =  new DeleteOperationBasis(connection,
        InternalClientConnection.nextOperationID(),
        InternalClientConnection.nextMessageID(), null,
        ByteString.valueOf(newDn));
        InternalClientConnection.nextMessageID(), null, newDN);
    if (isSubtreeDelete)
      del.addRequestControl(new SubtreeDeleteControl(false));