From dfbe880eb338a1d752ce790f689b5133761d7079 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 26 Sep 2013 07:35:55 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB
---
opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java b/opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java
index f0ea42e..ca16cd2 100644
--- a/opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java
@@ -31,6 +31,7 @@
import java.util.List;
import java.util.zip.DataFormatException;
+import org.opends.server.core.ModifyDNOperation;
import org.opends.server.core.ModifyDNOperationBasis;
import org.opends.server.protocols.asn1.ASN1Exception;
import org.opends.server.protocols.internal.InternalClientConnection;
@@ -58,7 +59,7 @@
public ModifyDNMsg(PostOperationModifyDNOperation operation)
{
super((OperationContext) operation.getAttachment(SYNCHROCONTEXT),
- operation.getRawEntryDN().toString());
+ operation.getEntryDN());
encodedMods = encodeMods(operation.getModifications());
@@ -89,7 +90,7 @@
* @param newSuperior The new Superior entry to use for building the message.
* @param newRDN The new Rdn to use for building the message.
*/
- public ModifyDNMsg(String dn, CSN csn, String entryUUID,
+ public ModifyDNMsg(DN dn, CSN csn, String entryUUID,
String newSuperiorEntryUUID, boolean deleteOldRdn,
String newSuperior, String newRDN)
{
@@ -115,7 +116,7 @@
* @param newRDN The new Rdn to use for building the message.
* @param mods The mod of the operation.
*/
- public ModifyDNMsg(String dn, CSN csn, String entryUUID,
+ public ModifyDNMsg(DN dn, CSN csn, String entryUUID,
String newSuperiorEntryUUID, boolean deleteOldRdn, String newSuperior,
String newRDN, List<Modification> mods)
{
@@ -158,13 +159,14 @@
* {@inheritDoc}
*/
@Override
- public Operation createOperation(InternalClientConnection connection,
- String newDn) throws LDAPException, ASN1Exception
+ public ModifyDNOperation createOperation(InternalClientConnection connection,
+ DN newDN) throws LDAPException, ASN1Exception
{
- ModifyDNOperationBasis moddn = new ModifyDNOperationBasis(connection,
+ ModifyDNOperation moddn = new ModifyDNOperationBasis(connection,
InternalClientConnection.nextOperationID(),
InternalClientConnection.nextMessageID(), null,
- ByteString.valueOf(newDn), ByteString.valueOf(newRDN),
+ ByteString.valueOf(newDN.toString()),
+ ByteString.valueOf(newRDN),
deleteOldRdn,
(newSuperior == null ? null : ByteString.valueOf(newSuperior)));
@@ -670,7 +672,7 @@
{
if (newSuperior == null)
{
- DN parentDn = DN.decode(this.getDn()).getParent();
+ DN parentDn = getDN().getParent();
return parentDn.concat(RDN.decode(newRDN));
}
else
--
Gitblit v1.10.0