From 8228fb82f3ad657adf7832eb05c624bf48c4a30e Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Wed, 19 Sep 2007 00:31:06 +0000
Subject: [PATCH] More changes relating to issue 1449: aggregation support.

---
 opends/src/server/org/opends/server/admin/client/spi/AbstractManagedObject.java |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/admin/client/spi/AbstractManagedObject.java b/opends/src/server/org/opends/server/admin/client/spi/AbstractManagedObject.java
index 88b7ca4..f7fc2a9 100644
--- a/opends/src/server/org/opends/server/admin/client/spi/AbstractManagedObject.java
+++ b/opends/src/server/org/opends/server/admin/client/spi/AbstractManagedObject.java
@@ -68,6 +68,7 @@
 import org.opends.server.admin.client.ManagementContext;
 import org.opends.server.admin.client.MissingMandatoryPropertiesException;
 import org.opends.server.admin.client.OperationRejectedException;
+import org.opends.server.admin.client.OperationRejectedException.OperationType;
 
 
 
@@ -151,7 +152,8 @@
     }
 
     if (!exceptions.isEmpty()) {
-      throw new MissingMandatoryPropertiesException(exceptions);
+      throw new MissingMandatoryPropertiesException(definition
+          .getUserFriendlyName(), exceptions, !existsOnServer);
     }
 
     // Now enforce any constraints.
@@ -175,7 +177,13 @@
     }
 
     if (!isAcceptable) {
-      throw new OperationRejectedException(messages);
+      if (existsOnServer) {
+        throw new OperationRejectedException(OperationType.MODIFY, definition
+            .getUserFriendlyName(), messages);
+      } else {
+        throw new OperationRejectedException(OperationType.CREATE, definition
+            .getUserFriendlyName(), messages);
+      }
     }
 
     // Commit the managed object.

--
Gitblit v1.10.0