From 9b6dfe96f8d0e0c92c4fdbf3f65459271bca425c Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Mon, 07 Apr 2008 12:50:35 +0000
Subject: [PATCH] Fix for issue #2270 (export-ldif doesn't exclude operational attributes when it's a task)

---
 opends/src/server/org/opends/server/tasks/ExportTask.java |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/tasks/ExportTask.java b/opends/src/server/org/opends/server/tasks/ExportTask.java
index 80e6d6c..0f39887 100644
--- a/opends/src/server/org/opends/server/tasks/ExportTask.java
+++ b/opends/src/server/org/opends/server/tasks/ExportTask.java
@@ -131,6 +131,7 @@
   private boolean compressLDIF;
   private boolean encryptLDIF;
   private boolean signHash;
+  private boolean includeOperationalAttributes;
   private ArrayList<String> includeAttributeStrings;
   private ArrayList<String> excludeAttributeStrings;
   private ArrayList<String> includeFilterStrings;
@@ -189,6 +190,7 @@
     AttributeType typeIncludeBranch;
     AttributeType typeExcludeBranch;
     AttributeType typeWrapColumn;
+    AttributeType typeIncludeOperationalAttributes;
 
 
     typeLdifFile =
@@ -217,6 +219,8 @@
          getAttributeType(ATTR_TASK_EXPORT_EXCLUDE_BRANCH, true);
     typeWrapColumn =
          getAttributeType(ATTR_TASK_EXPORT_WRAP_COLUMN, true);
+    typeIncludeOperationalAttributes =
+      getAttributeType(ATTR_TASK_EXPORT_INCLUDE_OPERATIONAL_ATTRIBUTES, true);
 
 
     List<Attribute> attrList;
@@ -260,6 +264,9 @@
     attrList = taskEntry.getAttribute(typeWrapColumn);
     wrapColumn = TaskUtils.getSingleValueInteger(attrList, 0);
 
+    attrList = taskEntry.getAttribute(typeIncludeOperationalAttributes);
+    includeOperationalAttributes = TaskUtils.getBoolean(attrList, true);
+
   }
 
 
@@ -522,6 +529,7 @@
     exportConfig.setIncludeFilters(includeFilters);
     exportConfig.setSignHash(signHash);
     exportConfig.setWrapColumn(wrapColumn);
+    exportConfig.setIncludeOperationalAttributes(includeOperationalAttributes);
 
     // FIXME -- Should this be conditional?
     exportConfig.setInvokeExportPlugins(true);

--
Gitblit v1.10.0