From b356b726e7dcf15e889ddb1145adab848270b650 Mon Sep 17 00:00:00 2001
From: pkupczyk <pkupczyk>
Date: Wed, 6 Mar 2013 13:34:21 +0000
Subject: [PATCH] SP-529 / BIS-151 : Provide only one version of openbis.js
 file - add missing annotations to the screening API methods

SVN: 28538
---
 .../screening/server/ScreeningServer.java     | 14 +++++++++++
 .../shared/api/v1/IScreeningApiServer.java    | 24 +++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/ScreeningServer.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/ScreeningServer.java
index b7021639037..db92ba88f97 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/ScreeningServer.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/ScreeningServer.java
@@ -751,6 +751,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<String> listAvailableFeatureCodes(final String sessionToken,
             List<? extends IFeatureVectorDatasetIdentifier> featureDatasets)
     {
@@ -772,6 +773,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<FeatureInformation> listAvailableFeatures(final String sessionToken,
             List<? extends IFeatureVectorDatasetIdentifier> featureDatasets)
     {
@@ -794,6 +796,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.FeatureVectorDataset> loadFeatures(
             final String sessionToken, List<FeatureVectorDatasetReference> featureDatasets,
             final List<String> featureCodes)
@@ -817,6 +820,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<FeatureVectorWithDescription> loadFeaturesForDatasetWellReferences(
             final String sessionToken,
             List<FeatureVectorDatasetWellReference> datasetWellReferences,
@@ -841,6 +845,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<String> loadImagesBase64(final String sessionToken,
             List<PlateImageReference> imageReferences, final boolean convertToPng)
     {
@@ -862,6 +867,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<String> loadThumbnailImagesBase64(final String sessionToken,
             List<PlateImageReference> imageReferences)
     {
@@ -883,6 +889,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<String> loadImagesBase64(final String sessionToken,
             List<PlateImageReference> imageReferences, final ImageSize size)
     {
@@ -904,6 +911,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<String> loadImagesBase64(final String sessionToken,
             List<PlateImageReference> imageReferences)
     {
@@ -925,6 +933,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<String> loadImagesBase64(final String sessionToken,
             List<PlateImageReference> imageReferences, final LoadImageConfiguration configuration)
     {
@@ -944,6 +953,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<String> loadImagesBase64(final String sessionToken,
             List<PlateImageReference> imageReferences, final ImageRepresentationFormat format)
     {
@@ -963,6 +973,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<String> loadImagesBase64(final String sessionToken,
             List<PlateImageReference> imageReferences,
             final IImageRepresentationFormatSelectionCriterion... criteria)
@@ -983,6 +994,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<ImageDatasetMetadata> listImageMetadata(final String sessionToken,
             List<? extends IImageDatasetIdentifier> imageDatasets)
     {
@@ -1003,6 +1015,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<DatasetImageRepresentationFormats> listAvailableImageRepresentationFormats(
             final String sessionToken, List<? extends IDatasetIdentifier> imageDatasets)
     {
@@ -1023,6 +1036,7 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl
     }
 
     @Override
+    @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER)
     public List<String> loadPhysicalThumbnailsBase64(final String sessionToken,
             List<PlateImageReference> imageReferences, final ImageRepresentationFormat format)
     {
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/v1/IScreeningApiServer.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/v1/IScreeningApiServer.java
index 7525da01ff3..906c724fbbb 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/v1/IScreeningApiServer.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/v1/IScreeningApiServer.java
@@ -296,6 +296,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<FeatureVectorDataset> loadFeatures(String sessionToken,
             List<FeatureVectorDatasetReference> featureDatasets, List<String> featureCodes);
 
@@ -307,6 +309,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<FeatureVectorWithDescription> loadFeaturesForDatasetWellReferences(
             String sessionToken, List<FeatureVectorDatasetWellReference> datasetWellReferences,
             List<String> featureCodes);
@@ -319,6 +323,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<String> loadImagesBase64(String sessionToken,
             List<PlateImageReference> imageReferences, boolean convertToPng);
 
@@ -330,6 +336,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<String> loadThumbnailImagesBase64(String sessionToken,
             List<PlateImageReference> imageReferences);
 
@@ -341,6 +349,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<String> loadImagesBase64(String sessionToken,
             List<PlateImageReference> imageReferences, ImageSize size);
 
@@ -352,6 +362,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<String> loadImagesBase64(String sessionToken,
             List<PlateImageReference> imageReferences);
 
@@ -363,6 +375,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<String> loadImagesBase64(String sessionToken,
             List<PlateImageReference> imageReferences, LoadImageConfiguration configuration);
 
@@ -374,6 +388,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<String> loadImagesBase64(String sessionToken,
             List<PlateImageReference> imageReferences, ImageRepresentationFormat format);
 
@@ -385,6 +401,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<String> loadImagesBase64(String sessionToken,
             List<PlateImageReference> imageReferences,
             IImageRepresentationFormatSelectionCriterion... criteria);
@@ -397,6 +415,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<ImageDatasetMetadata> listImageMetadata(String sessionToken,
             List<? extends IImageDatasetIdentifier> imageDatasets);
 
@@ -408,6 +428,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<DatasetImageRepresentationFormats> listAvailableImageRepresentationFormats(
             String sessionToken, List<? extends IDatasetIdentifier> imageDatasets);
 
@@ -419,6 +441,8 @@ public interface IScreeningApiServer extends IRpcService
      * 
      * @since 1.10
      */
+    @Transactional(readOnly = true)
+    @MinimalMinorVersion(10)
     public List<String> loadPhysicalThumbnailsBase64(String sessionToken,
             List<PlateImageReference> imageReferences, ImageRepresentationFormat format);
 
-- 
GitLab