From 846e596e82f75c734e75039feb4cfe60d81efb07 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Thu, 08 Oct 2009 09:39:12 +0000
Subject: [PATCH] Put back getMods() method erroneously removed from a previous commit

---
 opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyCommonMsg.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyCommonMsg.java b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyCommonMsg.java
index b3d0e27..9a6b856 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyCommonMsg.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/ModifyCommonMsg.java
@@ -102,6 +102,24 @@
     encodedMods = encodeMods(mods);
   }
 
+  /**
+   * Get the Modifications associated to the UpdateMsg to the provided value.
+   * @throws LDAPException In case of LDAP decoding exception
+   * @throws ASN1Exception In case of ASN1 decoding exception
+   * @return the list of modifications
+   */
+  public List<Modification> getMods() throws ASN1Exception, LDAPException
+  {
+    List<Modification> mods = new ArrayList<Modification>();
+
+    ASN1Reader reader = ASN1.getReader(encodedMods);
+
+    while (reader.hasNextElement())
+      mods.add((LDAPModification.decode(reader)).toModification());
+
+    return mods;
+  }
+
   // ============
   // Msg encoding
   // ============

--
Gitblit v1.10.0