From 67405dde9ba213331dab1fc46cb18c485070fd5b Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 05 Jun 2009 09:04:50 +0000
Subject: [PATCH] svn merge -r5333:5417 https://opends.dev.java.net/svn/opends/branches/b2.0

---
 opends/src/server/org/opends/server/tasks/ImportTask.java |   55 ++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 34 insertions(+), 21 deletions(-)

diff --git a/opends/src/server/org/opends/server/tasks/ImportTask.java b/opends/src/server/org/opends/server/tasks/ImportTask.java
index ffe7490..a8aa714 100644
--- a/opends/src/server/org/opends/server/tasks/ImportTask.java
+++ b/opends/src/server/org/opends/server/tasks/ImportTask.java
@@ -163,31 +163,31 @@
   }
 
 
-  boolean append                  = false;
-  boolean isCompressed            = false;
-  boolean isEncrypted             = false;
-  boolean overwrite               = false;
-  boolean replaceExisting         = false;
-  boolean skipSchemaValidation    = false;
-  boolean clearBackend            = false;
-  String  backendID               = null;
-  String  rejectFile              = null;
-  String  skipFile                = null;
-  ArrayList<String>  excludeAttributeStrings = null;
-  ArrayList<String>  excludeBranchStrings    = null;
-  ArrayList<String>  excludeFilterStrings    = null;
-  ArrayList<String>  includeAttributeStrings = null;
-  ArrayList<String>  includeBranchStrings    = null;
-  ArrayList<String>  includeFilterStrings    = null;
-  ArrayList<String>  ldifFiles               = null;
-  String templateFile = null;
-  int randomSeed = 0;
-
+  private boolean append = false;
+  private boolean isCompressed = false;
+  private boolean isEncrypted = false;
+  private boolean overwrite = false;
+  private boolean replaceExisting = false;
+  private boolean skipSchemaValidation = false;
+  private boolean clearBackend = false;
+  private String backendID = null;
+  private String rejectFile = null;
+  private String skipFile = null;
+  private ArrayList<String> excludeAttributeStrings = null;
+  private ArrayList<String> excludeBranchStrings = null;
+  private ArrayList<String> excludeFilterStrings = null;
+  private ArrayList<String> includeAttributeStrings = null;
+  private ArrayList<String> includeBranchStrings = null;
+  private ArrayList<String> includeFilterStrings = null;
+  private ArrayList<String> ldifFiles = null;
+  private String templateFile = null;
+  private int randomSeed = 0;
   private LDIFImportConfig importConfig;
 
   /**
    * {@inheritDoc}
    */
+  @Override
   public Message getDisplayName() {
     return INFO_TASK_IMPORT_NAME.get();
   }
@@ -195,6 +195,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   public Message getAttributeDisplayName(String name) {
     return argDisplayMap.get(name);
   }
@@ -479,7 +480,7 @@
         throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
       }
       // Make sure that if the "backendID" argument was provided, no include
-      // base was included, and the "append" ption was not provided, the
+      // base was included, and the "append" option was not provided, the
       // "clearBackend" argument was also provided if there are more then one
       // baseDNs for the backend being imported.
       else if(!append && includeBranchStrings.isEmpty() &&
@@ -517,6 +518,15 @@
                                          message);
           }
         }
+        else
+        {
+          // The include branch is not associated with any backend.
+          Message message =
+              ERR_NO_BACKENDS_FOR_BASE.get(includeBranch
+                  .toNormalizedString());
+          throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
+              message);
+        }
       }
     }
 
@@ -543,6 +553,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   public void interruptTask(TaskState interruptState, Message interruptReason)
   {
     if (TaskState.STOPPED_BY_ADMINISTRATOR.equals(interruptState) &&
@@ -559,6 +570,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   public boolean isInterruptable()
   {
     return true;
@@ -568,6 +580,7 @@
   /**
    * {@inheritDoc}
    */
+  @Override
   protected TaskState runTask()
   {
     // See if there were any user-defined sets of include/exclude attributes or

--
Gitblit v1.10.0