From 2ab6b7fabea1d29a8c023dcbdbec9a76bd66c5cc 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
---
opends/src/server/org/opends/server/replication/protocol/ModifyCommonMsg.java | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/ModifyCommonMsg.java b/opends/src/server/org/opends/server/replication/protocol/ModifyCommonMsg.java
index b3d0e27..9a6b856 100644
--- a/opends/src/server/org/opends/server/replication/protocol/ModifyCommonMsg.java
+++ b/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