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/AddOperation.java | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/AddOperation.java b/opends/src/server/org/opends/server/core/AddOperation.java
index c3ff384..c5d8808 100644
--- a/opends/src/server/org/opends/server/core/AddOperation.java
+++ b/opends/src/server/org/opends/server/core/AddOperation.java
@@ -116,6 +116,9 @@
// The processed DN of the entry to add.
private DN entryDN;
+ // The entry being added to the server.
+ private Entry entry;
+
// The set of attributes (including the objectclass attribute) in a raw,
// unprocessed form as provided in the request. One or more of these
// attributes may be invalid.
@@ -178,6 +181,7 @@
responseControls = new ArrayList<Control>();
cancelRequest = null;
+ entry = null;
entryDN = null;
userAttributes = null;
operationalAttributes = null;
@@ -226,6 +230,8 @@
this.userAttributes = userAttributes;
this.operationalAttributes = operationalAttributes;
+ entry = null;
+
rawEntryDN = new ASN1OctetString(entryDN.toString());
rawAttributes = new ArrayList<LDAPAttribute>();
@@ -445,6 +451,23 @@
/**
+ * Retrieves the entry to be added to the server. Note that this will not be
+ * available to pre-parse plugins or during the conflict resolution portion of
+ * the synchronization processing.
+ *
+ * @return The entry to be added to the server, or <CODE>null</CODE> if it is
+ * not yet available.
+ */
+ public Entry getEntryToAdd()
+ {
+ assert debugEnter(CLASS_NAME, "getEntryToAdd");
+
+ return entry;
+ }
+
+
+
+ /**
* Retrieves the time that processing started for this operation.
*
* @return The time that processing started for this operation.
@@ -667,7 +690,6 @@
// Start the processing timer.
processingStartTime = System.currentTimeMillis();
setResultCode(ResultCode.UNDEFINED);
- Entry entry = null;
// Check for and handle a request to cancel this operation.
--
Gitblit v1.10.0