From a438e8421db64431b3cfe41412355722df240c57 Mon Sep 17 00:00:00 2001
From: kohleman <kohleman>
Date: Tue, 12 Jul 2011 14:50:10 +0000
Subject: [PATCH] Added 'Done' and an output of line.size() at the end

SVN: 22094
---
 .../generic/client/console/AdminConsole.java        | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/AdminConsole.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/AdminConsole.java
index 9ecbf4c8348..40621efeb37 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/AdminConsole.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/AdminConsole.java
@@ -32,6 +32,7 @@ import ch.systemsx.cisd.common.spring.HttpInvokerUtils;
 import ch.systemsx.cisd.common.utilities.ExtendedProperties;
 import ch.systemsx.cisd.openbis.generic.shared.ICommonServer;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SessionContextDTO;
+import ch.systemsx.cisd.openbis.plugin.generic.shared.IGenericServer;
 
 /**
  * @author Franz-Josef Elmer
@@ -60,11 +61,14 @@ public class AdminConsole
         {
             password = getConsoleReader().readLine("Password: ", Character.valueOf('*'));
         }
-        ICommonServer service =
+        ICommonServer commonService =
                 HttpInvokerUtils.createServiceStub(ICommonServer.class, serverURL + SERVICE_PATH,
                         5 * DateUtils.MILLIS_PER_MINUTE);
+        IGenericServer genericService =
+                HttpInvokerUtils.createServiceStub(IGenericServer.class, serverURL + SERVICE_PATH,
+                        5 * DateUtils.MILLIS_PER_MINUTE);
 
-        SessionContextDTO session = service.tryToAuthenticate(userID, password);
+        SessionContextDTO session = commonService.tryToAuthenticate(userID, password);
         if (session == null)
         {
             System.err.println("Authentication failed");
@@ -94,7 +98,7 @@ public class AdminConsole
                     {
                         try
                         {
-                            cmd.execute(service, sessionToken, context, argument);
+                            cmd.execute(commonService, sessionToken, context, argument);
                         } catch (RuntimeException ex)
                         {
                             printError(i, line, ex);
@@ -102,7 +106,8 @@ public class AdminConsole
                     }
                 }
             }
-            service.logout(sessionToken);
+            commonService.logout(sessionToken);
+            System.out.println("Done. Processed " + lines.size() + " lines.");
         }
     }
 
-- 
GitLab