From 6ee454dbd5ced05c401c8056afc7a2cb595094f1 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Thu, 28 Jan 2010 15:34:30 +0000
Subject: [PATCH] SE-198 fix bug concerning wrong version shown

SVN: 14562
---
 screening/resource/server/web.xml                         | 2 +-
 .../{ => plugin/screening}/BuildAndEnvironmentInfo.java   | 2 +-
 .../client/web/client/application/ScreeningClient.java    | 8 ++++++++
 .../client/web/server/ScreeningClientService.java         | 7 +++++++
 4 files changed, 17 insertions(+), 2 deletions(-)
 rename screening/source/java/ch/systemsx/cisd/openbis/{ => plugin/screening}/BuildAndEnvironmentInfo.java (96%)

diff --git a/screening/resource/server/web.xml b/screening/resource/server/web.xml
index 691602a7fb6..019c217688c 100644
--- a/screening/resource/server/web.xml
+++ b/screening/resource/server/web.xml
@@ -17,7 +17,7 @@
 
     <context-param>
         <param-name>infoClass</param-name>
-        <param-value>ch.systemsx.cisd.openbis.BuildAndEnvironmentInfo</param-value>
+        <param-value>ch.systemsx.cisd.openbis.plugin.screening.BuildAndEnvironmentInfo</param-value>
     </context-param>
 
     <context-param>
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/BuildAndEnvironmentInfo.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/BuildAndEnvironmentInfo.java
similarity index 96%
rename from screening/source/java/ch/systemsx/cisd/openbis/BuildAndEnvironmentInfo.java
rename to screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/BuildAndEnvironmentInfo.java
index 5da72b36ba6..a5bf06acc14 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/BuildAndEnvironmentInfo.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/BuildAndEnvironmentInfo.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package ch.systemsx.cisd.openbis;
+package ch.systemsx.cisd.openbis.plugin.screening;
 
 import ch.systemsx.cisd.base.utilities.AbstractBuildAndEnvironmentInfo;
 
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ScreeningClient.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ScreeningClient.java
index dbc4c843858..c0c3e58b67f 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ScreeningClient.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ScreeningClient.java
@@ -16,6 +16,7 @@
 
 package ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application;
 
+import ch.systemsx.cisd.openbis.generic.client.web.client.IClientServiceAsync;
 import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.Client;
 import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
@@ -47,4 +48,11 @@ public class ScreeningClient extends Client
         return new ClientPluginFactoryProvider(commonContext);
     }
 
+    @Override
+    protected IClientServiceAsync getServiceForRetrievingApplicationInfo(
+            IViewContext<ICommonClientServiceAsync> context)
+    {
+        return new ScreeningViewContext(context).getService();
+    }
+
 }
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/server/ScreeningClientService.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/server/ScreeningClientService.java
index cedea34d7c4..a83c4748611 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/server/ScreeningClientService.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/server/ScreeningClientService.java
@@ -38,6 +38,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.GenericTableRow;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Material;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleParentWithDerived;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifierFactory;
+import ch.systemsx.cisd.openbis.plugin.screening.BuildAndEnvironmentInfo;
 import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.IScreeningClientService;
 import ch.systemsx.cisd.openbis.plugin.screening.shared.IScreeningServer;
 import ch.systemsx.cisd.openbis.plugin.screening.shared.ResourceNames;
@@ -83,6 +84,12 @@ public final class ScreeningClientService extends AbstractClientService implemen
     // IScreeningClientService
     //
 
+    @Override
+    protected String getVersion()
+    {
+        return BuildAndEnvironmentInfo.INSTANCE.getFullVersion();
+    }
+
     public final SampleParentWithDerived getSampleGenerationInfo(final TechId sampleId)
             throws UserFailureException
     {
-- 
GitLab