From 0aaeb52efc6ea7ce83965f0b3ce4bb48b8b72369 Mon Sep 17 00:00:00 2001
From: tpylak <tpylak>
Date: Mon, 1 Feb 2010 15:30:09 +0000
Subject: [PATCH] minor: fix dss after cifex library update

SVN: 14597
---
 .../dss/generic/server/UploadingCommand.java  | 24 +++++++++----------
 .../generic/server/UploadingCommandTest.java  | 13 ++++------
 2 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommand.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommand.java
index ff2efa703cd..0ec86114c65 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommand.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommand.java
@@ -92,8 +92,7 @@ class UploadingCommand implements IDataSetCommand
         {
         }
 
-        public void finished(boolean successful, List<String> warningMessages,
-                List<Throwable> exceptions)
+        public void finished(boolean successful)
         {
             if (successful)
             {
@@ -105,21 +104,22 @@ class UploadingCommand implements IDataSetCommand
             {
                 operationLog.warn("Uploading of zip file " + zipFile
                         + " has been aborted or failed.");
-                for (String warningMessage : warningMessages)
-                {
-                    operationLog.warn(warningMessage);
-
-                }
-                for (Throwable throwable : exceptions)
-                {
-                    notificationLog.error("An error occured during uploading of zip file "
-                            + zipFile + ".", throwable);
-                }
                 sendEMail("Uploading of zip file " + zipFile.getName()
                         + " with requested data sets failed.");
             }
         }
 
+        public void exceptionOccured(Throwable throwable)
+        {
+            notificationLog.error("An error occured during uploading of zip file " + zipFile + ".",
+                    throwable);
+        }
+
+        public void warningOccured(String warningMessage)
+        {
+            operationLog.warn(warningMessage);
+        }
+
     }
 
     private static final class MetaDataBuilder
diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommandTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommandTest.java
index d424d19cc85..8924fd8e0f4 100644
--- a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommandTest.java
+++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommandTest.java
@@ -300,8 +300,7 @@ public class UploadingCommandTest extends AssertJUnit
                         {
                             public Object invoke(Invocation invocation) throws Throwable
                             {
-                                listener[0].finished(true, Collections.<String> emptyList(),
-                                        Collections.<Throwable> emptyList());
+                                listener[0].finished(true);
                                 return null;
                             }
                         });
@@ -357,8 +356,7 @@ public class UploadingCommandTest extends AssertJUnit
                         {
                             public Object invoke(Invocation invocation) throws Throwable
                             {
-                                listener[0].finished(true, Collections.<String> emptyList(),
-                                        Collections.<Throwable> emptyList());
+                                listener[0].finished(true);
                                 return null;
                             }
                         });
@@ -388,13 +386,13 @@ public class UploadingCommandTest extends AssertJUnit
                     {
                         one(factory).createCIFEXComponent();
                         will(returnValue(cifex));
-    
+
                         one(cifex).login(uploadContextNoPasswordNotAuthenticated.getUserID(),
                                 uploadContextNoPasswordNotAuthenticated.getPassword());
                         will(throwException(new AuthorizationFailureException("forget it!")));
                     }
                 });
-    
+
             logRecorder.resetLogContent();
             commandAdminSessionNotAuthenticated.execute(STORE);
         } finally
@@ -452,8 +450,7 @@ public class UploadingCommandTest extends AssertJUnit
                         {
                             public Object invoke(Invocation invocation) throws Throwable
                             {
-                                listener[0].finished(false, Collections.<String> emptyList(),
-                                        Collections.<Throwable> emptyList());
+                                listener[0].finished(false);
                                 return null;
                             }
                         });
-- 
GitLab