From 9f7e54f54e452973cd947137118321672f5ecb65 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Wed, 02 Aug 2006 06:30:27 +0000
Subject: [PATCH] Add methods to various operations in order to get the target entry (or, in the case of modify and modify DN operations, both the before and after entries). The entries will not be available for use in pre-parse plugins, and in some cases they may not be available for conflict resolution synchronization processing.
---
opends/src/server/org/opends/server/core/CompareOperation.java | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/CompareOperation.java b/opends/src/server/org/opends/server/core/CompareOperation.java
index 13c71f5..cd15438 100644
--- a/opends/src/server/org/opends/server/core/CompareOperation.java
+++ b/opends/src/server/org/opends/server/core/CompareOperation.java
@@ -95,6 +95,9 @@
// The DN of the entry for the compare operation.
private DN entryDN;
+ // The entry to be compared.
+ private Entry entry;
+
// The set of response controls for this compare operation.
private List<Control> responseControls;
@@ -148,6 +151,7 @@
this.assertionValue = assertionValue;
responseControls = new ArrayList<Control>();
+ entry = null;
entryDN = null;
attributeType = null;
cancelRequest = null;
@@ -195,6 +199,7 @@
rawEntryDN = new ASN1OctetString(entryDN.toString());
rawAttributeType = attributeType.getNameOrOID();
cancelRequest = null;
+ entry = null;
}
@@ -344,6 +349,22 @@
/**
+ * Retrieves the entry to target with the compare operation. It will not be
+ * available to pre-parse plugins.
+ *
+ * @return The entry to target with the compare operation, or
+ * <CODE>null</CODE> if the entry is not yet available.
+ */
+ public Entry getEntryToCompare()
+ {
+ assert debugEnter(CLASS_NAME, "getEntryToCompare");
+
+ return entry;
+ }
+
+
+
+ /**
* Retrieves the time that processing started for this operation.
*
* @return The time that processing started for this operation.
@@ -697,7 +718,6 @@
try
{
// Get the entry. If it does not exist, then fail.
- Entry entry = null;
try
{
entry = DirectoryServer.getEntry(entryDN);
--
Gitblit v1.10.0