diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java index 21688e327888fe33345d2aa76d2c4ce13020d13d..044274c428c2ed65c4113cf0a4c0db4d9ae63a3c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java @@ -44,6 +44,7 @@ import ch.systemsx.cisd.openbis.generic.server.business.bo.IEntityTypeBO; import ch.systemsx.cisd.openbis.generic.server.business.bo.IEntityTypePropertyTypeBO; import ch.systemsx.cisd.openbis.generic.server.business.bo.IExperimentBO; import ch.systemsx.cisd.openbis.generic.server.business.bo.IExperimentTable; +import ch.systemsx.cisd.openbis.generic.server.business.bo.IExternalDataBO; import ch.systemsx.cisd.openbis.generic.server.business.bo.IExternalDataTable; import ch.systemsx.cisd.openbis.generic.server.business.bo.IGridCustomFilterOrColumnBO; import ch.systemsx.cisd.openbis.generic.server.business.bo.IGroupBO; @@ -760,6 +761,19 @@ public final class CommonServer extends AbstractCommonServer<ICommonServer> impl } } + public ExternalData getDataSetInfo(final String sessionToken, final TechId datasetId) + { + final Session session = getSession(sessionToken); + final IExternalDataBO datasetBO = businessObjectFactory.createExternalDataBO(session); + datasetBO.loadDataByTechId(datasetId); + datasetBO.enrichWithParentsAndExperiment(); + datasetBO.enrichWithChildren(); + datasetBO.enrichWithProperties(); + final ExternalDataPE dataset = datasetBO.getExternalData(); + return ExternalDataTranslator.translate(dataset, getDataStoreBaseURL(), session + .getBaseIndexURL(), false); + } + public List<ExternalData> listRelatedDataSets(String sessionToken, DataSetRelatedEntities relatedEntities) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServerLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServerLogger.java index 52f80f7ef45de2e1a672285834598a2123fe7c7c..04afc73ec150509110ae9ed0975d4197ab095216 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServerLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServerLogger.java @@ -412,6 +412,12 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + public ExternalData getDataSetInfo(String sessionToken, TechId datasetId) + { + logAccess(sessionToken, "getDataSetInfo", "datasetId(%s)", datasetId.getId()); + return null; + } + public List<ExternalData> listRelatedDataSets(String sessionToken, DataSetRelatedEntities entities) { @@ -814,5 +820,4 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe { logTracking(sessionToken, "delete_materials", "IDS(%s) REASON(%s)", materialIds, reason); } - } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java index a033fd5128072efe6bdb1af7b70090905c60c308..5a6c9484421645dbf52bad353f536dba2dfd1623 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java @@ -508,6 +508,14 @@ public interface ICommonServer extends IServer @ReturnValueFilter(validatorClass = ExternalDataValidator.class) public List<ExternalData> searchForDataSets(String sessionToken, DetailedSearchCriteria criteria); + /** + * For given {@link TechId} returns the corresponding {@link ExternalData}. + */ + @Transactional(readOnly = true) + @RolesAllowed(RoleSet.OBSERVER) + public ExternalData getDataSetInfo(String sessionToken, + @AuthorizationGuard(guardClass = DataSetTechIdPredicate.class) TechId datasetId); + /** * Performs an <i>Hibernate Search</i> based on given parameters. */ diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java index 4f69318cc58214e7b48c9a5412873753161e5748..3dead55e844d257a69e3b929583d6b65e3e9f4be 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java @@ -94,7 +94,7 @@ abstract public class GenericDataSetViewer extends AbstractViewer<ExternalData> viewContext.getService().getDataSetInfo(datasetTechId, asyncCallback); } }; - viewer.reloadData(); + viewer.reloadAllData(); return new DatabaseModificationAwareComponent(viewer, viewer); } @@ -157,7 +157,7 @@ abstract public class GenericDataSetViewer extends AbstractViewer<ExternalData> /** * Load the dataset information. */ - protected void reloadData() + protected void reloadAllData() { loadDatasetInfo(datasetId, new DataSetInfoCallback(viewContext, this)); } @@ -276,7 +276,7 @@ abstract public class GenericDataSetViewer extends AbstractViewer<ExternalData> public void update(Set<DatabaseModificationKind> observedModifications) { - reloadData(); // reloads everything + reloadAllData(); // reloads everything } /** diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java index e9f44ecc77b6ad3c6c78085374c2c7423ad59e23..7a068b6f6b5a5c15a9097f27c9cee6fda9a5069b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java @@ -41,6 +41,7 @@ import ch.systemsx.cisd.openbis.generic.server.business.bo.ISampleBO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory; import ch.systemsx.cisd.openbis.generic.server.plugin.IDataSetTypeSlaveServerPlugin; import ch.systemsx.cisd.openbis.generic.server.plugin.ISampleTypeSlaveServerPlugin; +import ch.systemsx.cisd.openbis.generic.shared.ICommonServer; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AttachmentWithContent; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetUpdateResult; @@ -79,7 +80,6 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleIdentifierFa import ch.systemsx.cisd.openbis.generic.shared.dto.properties.EntityKind; import ch.systemsx.cisd.openbis.generic.shared.translator.AttachmentTranslator; import ch.systemsx.cisd.openbis.generic.shared.translator.ExperimentTranslator; -import ch.systemsx.cisd.openbis.generic.shared.translator.ExternalDataTranslator; import ch.systemsx.cisd.openbis.generic.shared.translator.MaterialTranslator; import ch.systemsx.cisd.openbis.generic.shared.translator.SampleTranslator; import ch.systemsx.cisd.openbis.plugin.generic.shared.IGenericServer; @@ -97,6 +97,9 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen @Resource(name = ResourceNames.GENERIC_BUSINESS_OBJECT_FACTORY) private IGenericBusinessObjectFactory businessObjectFactory; + @Resource(name = ch.systemsx.cisd.openbis.generic.shared.ResourceNames.COMMON_SERVER) + protected ICommonServer commonServer; + public GenericServer() { } @@ -220,15 +223,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen public ExternalData getDataSetInfo(final String sessionToken, final TechId datasetId) { - final Session session = getSession(sessionToken); - final IExternalDataBO datasetBO = businessObjectFactory.createExternalDataBO(session); - datasetBO.loadDataByTechId(datasetId); - datasetBO.enrichWithParentsAndExperiment(); - datasetBO.enrichWithChildren(); - datasetBO.enrichWithProperties(); - final ExternalDataPE dataset = datasetBO.getExternalData(); - return ExternalDataTranslator.translate(dataset, getDataStoreBaseURL(), session - .getBaseIndexURL(), false); + return commonServer.getDataSetInfo(sessionToken, datasetId); } public AttachmentWithContent getExperimentFileAttachment(final String sessionToken, diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/IScreeningClientService.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/IScreeningClientService.java index 254df319c64541febd69e8275cf0278e9ca58ca3..c9ce265d97df5f7a44caca87151e0e3e2eb3b058 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/IScreeningClientService.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/IScreeningClientService.java @@ -26,6 +26,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.dto.IResultSetConfig; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TableExportCriteria; import ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData; 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; @@ -56,6 +57,11 @@ public interface IScreeningClientService extends IClientService */ public Material getMaterialInfo(final TechId materialId) throws UserFailureException; + /** + * For given {@link TechId} returns corresponding {@link ExternalData}. + */ + public ExternalData getDataSetInfo(TechId datasetTechId); + /** * Fetches information about wells on a plate and their content. */ diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/IScreeningClientServiceAsync.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/IScreeningClientServiceAsync.java index a10ad65932aed7815f9080a81732e59ce32b2ae8..0b305f9ddadf9742d4c43f41e48a9e241a5a29f3 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/IScreeningClientServiceAsync.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/IScreeningClientServiceAsync.java @@ -26,6 +26,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.dto.GenericTableResult import ch.systemsx.cisd.openbis.generic.client.web.client.dto.IResultSetConfig; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TableExportCriteria; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData; 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; @@ -50,6 +51,9 @@ public interface IScreeningClientServiceAsync extends IClientServiceAsync /** @see IScreeningClientService#getPlateContent(TechId) */ public void getPlateContent(TechId sampleId, final AsyncCallback<PlateContent> callback); + /** @see IScreeningClientService#getDataSetInfo(TechId) */ + public void getDataSetInfo(TechId datasetTechId, AsyncCallback<ExternalData> callback); + /** * @see IScreeningClientService#getPlateLocations(TechId, * ch.systemsx.cisd.openbis.generic.client.web.client.dto.ExperimentIdentifier) diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/ScreeningConstants.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/ScreeningConstants.java index 8c54af1d7d956e1970f61fbb336b4275d645d989..112ef58e5c94686f5b5650c9d7b47a4d426ef5bf 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/ScreeningConstants.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/ScreeningConstants.java @@ -49,6 +49,8 @@ public class ScreeningConstants // code of the gene material type public static final String GENE_PLUGIN_TYPE_CODE = "GENE"; + public static final String IMAGE_DATASET_PLUGIN_TYPE_CODE = "HCS_IMAGE"; + /** path to the datastore screening servlet able to display images in different channels */ public static final String DATASTORE_SCREENING_SERVLET_URL = "datastore_server_screening"; } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ClientPluginFactory.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ClientPluginFactory.java index e319877f3b1964a4916c1491e11c007862c8fcb9..b58a62a0b94d75487cbb34be1c4435208256f0e3 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ClientPluginFactory.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/ClientPluginFactory.java @@ -39,6 +39,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.dto.ExperimentIdentifi import ch.systemsx.cisd.openbis.generic.shared.basic.ICodeProvider; import ch.systemsx.cisd.openbis.generic.shared.basic.IIdentifiable; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.MaterialType; @@ -46,6 +47,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.IScreeningClientServiceAsync; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.ScreeningConstants; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.GeneMaterialViewer; +import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.PlateDatasetViewer; import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.PlateSampleViewer; /** @@ -89,6 +91,9 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Scree } else if (entityKind == EntityKind.MATERIAL) { types.add(ScreeningConstants.GENE_PLUGIN_TYPE_CODE); + } else if (entityKind == EntityKind.DATA_SET) + { + types.add(ScreeningConstants.IMAGE_DATASET_PLUGIN_TYPE_CODE); } return types; } @@ -106,6 +111,10 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Scree { return (IClientPlugin<T, I>) new SampleClientPlugin(viewContext); } + if (EntityKind.DATA_SET.equals(entityKind)) + { + return (IClientPlugin<T, I>) new DatasetClientPlugin(viewContext); + } throw new UnsupportedOperationException("IClientPlugin for entity kind '" + entityKind + "' not implemented yet."); } @@ -181,6 +190,43 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Scree return createViewerTab(viewer, materialId, Dict.MATERIAL, viewContext); } + private final class DatasetClientPlugin extends DelegatedClientPlugin<DataSetType> + { + private ScreeningViewContext screeningViewContext; + + private DatasetClientPlugin(ScreeningViewContext viewContext) + { + super(viewContext, EntityKind.DATA_SET); + this.screeningViewContext = viewContext; + } + + @Override + public final ITabItemFactory createEntityViewer(final IIdentifiable identifiable) + { + return new ITabItemFactory() + { + public ITabItem create() + { + final DatabaseModificationAwareComponent viewer = + PlateDatasetViewer.create(screeningViewContext, identifiable); + return createViewerTab(viewer, identifiable, Dict.DATA_SET, + screeningViewContext); + } + + public String getId() + { + final TechId sampleId = TechId.create(identifiable); + return PlateDatasetViewer.createId(sampleId); + } + + public HelpPageIdentifier getHelpPageIdentifier() + { + return HelpPageIdentifier.createSpecific("Plate Dataset Viewer"); + } + }; + } + } + private final class SampleClientPlugin extends DelegatedClientPlugin<SampleType> { private ScreeningViewContext screeningViewContext; diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/PlateDatasetViewer.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/PlateDatasetViewer.java new file mode 100644 index 0000000000000000000000000000000000000000..be4325867536984bffa69be64ce76d1e5c34330b --- /dev/null +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/PlateDatasetViewer.java @@ -0,0 +1,70 @@ +/* + * Copyright 2008 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers; + +import java.util.ArrayList; +import java.util.List; + +import com.google.gwt.user.client.rpc.AsyncCallback; + +import ch.systemsx.cisd.openbis.generic.client.web.client.application.SingleSectionPanel; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DatabaseModificationAwareComponent; +import ch.systemsx.cisd.openbis.generic.shared.basic.IIdentifiable; +import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData; +import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.dataset.GenericDataSetViewer; +import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.ScreeningViewContext; + +/** + * The <i>screening</i> plate dataset viewer. + * + * @author Tomasz Pylak + */ +public final class PlateDatasetViewer extends GenericDataSetViewer +{ + public static DatabaseModificationAwareComponent create(final ScreeningViewContext viewContext, + final IIdentifiable identifiable) + { + PlateDatasetViewer viewer = new PlateDatasetViewer(viewContext, identifiable); + viewer.reloadAllData(); + return new DatabaseModificationAwareComponent(viewer, viewer); + } + + private final ScreeningViewContext screeningViewContext; + + public PlateDatasetViewer(final ScreeningViewContext viewContext, + final IIdentifiable identifiable) + { + super(viewContext, identifiable); + this.screeningViewContext = viewContext; + } + + @Override + protected void loadDatasetInfo(TechId datasetTechId, AsyncCallback<ExternalData> asyncCallback) + { + screeningViewContext.getService().getDataSetInfo(datasetTechId, asyncCallback); + } + + @Override + protected List<SingleSectionPanel> createAdditionalSectionPanels() + { + List<SingleSectionPanel> sections = new ArrayList<SingleSectionPanel>(); + // TODO 2010-02-09, Tomasz Pylak: implement me + // sections.add(PlateLayoutSection.createForDataset(screeningViewContext, datasetId)); + return sections; + } +} 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 a83c47486114506464995c6c3edcdd0ce357738f..ab8d5618d833dc41d5111d9ceca58dcc5062c2fc 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 @@ -34,6 +34,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.server.AbstractClientService; import ch.systemsx.cisd.openbis.generic.client.web.server.translator.UserFailureExceptionTranslator; import ch.systemsx.cisd.openbis.generic.shared.IServer; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData; 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; @@ -114,6 +115,17 @@ public final class ScreeningClientService extends AbstractClientService implemen } } + public ExternalData getDataSetInfo(TechId datasetTechId) + { + try + { + return server.getDataSetInfo(getSessionToken(), datasetTechId); + } catch (final ch.systemsx.cisd.common.exceptions.UserFailureException e) + { + throw UserFailureExceptionTranslator.translate(e); + } + } + public PlateContent getPlateContent(TechId plateId) throws UserFailureException { try @@ -160,5 +172,4 @@ public final class ScreeningClientService extends AbstractClientService implemen { return prepareExportEntities(criteria); } - } 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 adc4dc9e6547a267d9a9e520dd5f1d32e85bed4d..0a7ee7b25877fa36b61388b3c799f472a9e6edf3 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 @@ -30,7 +30,9 @@ import ch.systemsx.cisd.openbis.generic.server.business.bo.ISampleBO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory; import ch.systemsx.cisd.openbis.generic.server.plugin.IDataSetTypeSlaveServerPlugin; import ch.systemsx.cisd.openbis.generic.server.plugin.ISampleTypeSlaveServerPlugin; +import ch.systemsx.cisd.openbis.generic.shared.ICommonServer; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData; 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.MaterialPE; @@ -59,6 +61,9 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl @Resource(name = ResourceNames.SCREENING_BUSINESS_OBJECT_FACTORY) private IScreeningBusinessObjectFactory businessObjectFactory; + @Resource(name = ch.systemsx.cisd.openbis.generic.shared.ResourceNames.COMMON_SERVER) + protected ICommonServer commonServer; + public ScreeningServer() { } @@ -124,4 +129,9 @@ public final class ScreeningServer extends AbstractServer<IScreeningServer> impl return GenePlateLocationsLoader.load(session, businessObjectFactory, getDAOFactory(), geneMaterialId, experimentIdentifier); } + + public ExternalData getDataSetInfo(String sessionToken, TechId datasetId) + { + return commonServer.getDataSetInfo(sessionToken, datasetId); + } } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/ScreeningServerLogger.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/ScreeningServerLogger.java index 9a6b44a69160d43f8e64df051fe6c5350cb0c3b3..0fc49e476068d45b3c11b9691bcefa0333391beb 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/ScreeningServerLogger.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/ScreeningServerLogger.java @@ -22,6 +22,7 @@ import java.util.List; import ch.systemsx.cisd.authentication.ISessionManager; import ch.systemsx.cisd.openbis.generic.server.AbstractServerLogger; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Material; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewAttachment; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSample; @@ -79,4 +80,10 @@ final class ScreeningServerLogger extends AbstractServerLogger implements IScree logTracking(sessionToken, "getMaterialInfo", "materialId(%s)", materialId.getId()); return null; } + + public ExternalData getDataSetInfo(String sessionToken, TechId datasetId) + { + logTracking(sessionToken, "getDataSetInfo", "datasetId(%s)", datasetId.getId()); + return null; + } } diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/IScreeningServer.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/IScreeningServer.java index 920a1d79a76baaffc6d914a5f0a8db6b7e974000..1458612628efe9f66dd32491c6d03c013ea6749d 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/IScreeningServer.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/IScreeningServer.java @@ -28,6 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAll import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleTechIdPredicate; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Material; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleParentWithDerived; @@ -77,4 +78,11 @@ public interface IScreeningServer extends IServer @RolesAllowed(RoleSet.OBSERVER) public Material getMaterialInfo(String sessionToken, TechId materialId); + /** + * For given {@link TechId} returns the corresponding {@link ExternalData}. + */ + @Transactional(readOnly = true) + @RolesAllowed(RoleSet.OBSERVER) + public ExternalData getDataSetInfo(String sessionToken, TechId datasetId); + }