Skip to content
Snippets Groups Projects
Commit 86ef0b42 authored by kaloyane's avatar kaloyane
Browse files

[LMS-2138] FEATURE_VECTOR_SUMMARY working in embedded/simple mode

SVN: 22206
parent 3e8503d6
No related branches found
No related tags found
No related merge requests found
......@@ -72,10 +72,12 @@ public class ExperimentAnalysisSummaryGrid extends TypedTableGrid<MaterialFeatur
public static IDisposableComponent create(
IViewContext<IScreeningClientServiceAsync> viewContext,
IEntityInformationHolderWithIdentifier experiment,
boolean restrictGlobalScopeLinkToProject)
boolean restrictGlobalScopeLinkToProject,
AnalysisProcedureCriteria initialAnalysisProcedureOrNull)
{
return new ExperimentAnalysisSummaryGrid(viewContext, experiment,
restrictGlobalScopeLinkToProject).asDisposableWithoutToolbar();
restrictGlobalScopeLinkToProject, initialAnalysisProcedureOrNull)
.asDisposableWithoutToolbar();
}
private ICellListenerAndLinkGenerator<MaterialFeatureVectorSummary> createMaterialReplicaSummaryLinkGenerator()
......@@ -117,13 +119,16 @@ public class ExperimentAnalysisSummaryGrid extends TypedTableGrid<MaterialFeatur
ExperimentAnalysisSummaryGrid(IViewContext<IScreeningClientServiceAsync> viewContext,
final IEntityInformationHolderWithIdentifier experiment,
boolean restrictGlobalScopeLinkToProject)
boolean restrictGlobalScopeLinkToProject,
AnalysisProcedureCriteria initialAnalysisProcedureOrNull)
{
super(viewContext.getCommonViewContext(), BROWSER_ID, false,
super(viewContext.getCommonViewContext(), BROWSER_ID,
initialAnalysisProcedureOrNull != null,
DisplayTypeIDGenerator.EXPERIMENT_FEATURE_VECTOR_SUMMARY_SECTION);
this.screeningViewContext = viewContext;
this.experiment = experiment;
this.restrictGlobalScopeLinkToProject = restrictGlobalScopeLinkToProject;
this.analysisProcedureCriteria = initialAnalysisProcedureOrNull;
ICellListenerAndLinkGenerator<MaterialFeatureVectorSummary> linkGenerator =
createMaterialReplicaSummaryLinkGenerator();
......
......@@ -36,7 +36,7 @@ public class ExperimentAnalysisSummarySection extends DisposableTabContent
setIds(DisplayTypeIDGenerator.EXPERIMENT_FEATURE_VECTOR_SUMMARY_SECTION);
analysisGridDisposableComponent =
ExperimentAnalysisSummaryGrid.create(screeningViewContext, experiment, false);
ExperimentAnalysisSummaryGrid.create(screeningViewContext, experiment, false, null);
}
@Override
......
......@@ -34,6 +34,7 @@ import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.D
import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.ScreeningModule;
import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.utils.MaterialComponentUtils;
import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.ui.columns.specific.ScreeningLinkExtractor;
import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.AnalysisProcedureCriteria;
/**
* A grid showing feature vector summary for an experiment.
......@@ -46,7 +47,7 @@ public class ExperimentAnalysisSummaryViewer
public static void openTab(
final IViewContext<IScreeningClientServiceAsync> screeningViewContext,
String experimentPermId, final boolean restrictGlobalScopeLinkToProject,
final String analysisProcedureOrNull)
final AnalysisProcedureCriteria analysisProcedureCriteria)
{
screeningViewContext.getCommonService().getEntityInformationHolder(EntityKind.EXPERIMENT,
experimentPermId,
......@@ -57,7 +58,7 @@ public class ExperimentAnalysisSummaryViewer
{
TechId experimentId = new TechId(experiment);
openTab(screeningViewContext, experimentId,
restrictGlobalScopeLinkToProject, analysisProcedureOrNull);
restrictGlobalScopeLinkToProject, analysisProcedureCriteria);
}
});
}
......@@ -65,7 +66,7 @@ public class ExperimentAnalysisSummaryViewer
public static void openTab(
final IViewContext<IScreeningClientServiceAsync> screeningViewContext,
TechId experimentId, final boolean restrictGlobalScopeLinkToProject,
final String analysisProcedureOrNull)
final AnalysisProcedureCriteria analysisProcedureCriteria)
{
screeningViewContext.getCommonService().getExperimentInfo(experimentId,
new AbstractAsyncCallback<Experiment>(screeningViewContext)
......@@ -76,7 +77,7 @@ public class ExperimentAnalysisSummaryViewer
AbstractTabItemFactory factory =
createTabFactory(screeningViewContext, result,
restrictGlobalScopeLinkToProject,
analysisProcedureOrNull);
analysisProcedureCriteria);
DispatcherHelper.dispatchNaviEvent(factory);
}
});
......@@ -85,7 +86,8 @@ public class ExperimentAnalysisSummaryViewer
private static AbstractTabItemFactory createTabFactory(
final IViewContext<IScreeningClientServiceAsync> viewContext,
final IEntityInformationHolderWithProperties experiment,
final boolean restrictGlobalScopeLinkToProject, final String analysisProcedureOrNull)
final boolean restrictGlobalScopeLinkToProject,
final AnalysisProcedureCriteria analysisProcedureCriteria)
{
return new AbstractTabItemFactory()
{
......@@ -103,7 +105,7 @@ public class ExperimentAnalysisSummaryViewer
{
IDisposableComponent tabComponent =
createViewer(viewContext, experiment, restrictGlobalScopeLinkToProject,
analysisProcedureOrNull);
analysisProcedureCriteria);
return DefaultTabItem.create(getTabTitle(), tabComponent, viewContext);
}
......@@ -112,7 +114,7 @@ public class ExperimentAnalysisSummaryViewer
{
return ScreeningLinkExtractor.createExperimentAnalysisSummaryBrowserLink(
experiment.getPermId(), restrictGlobalScopeLinkToProject,
analysisProcedureOrNull);
analysisProcedureCriteria.tryGetAnalysisProcedureCode());
}
@Override
......@@ -133,12 +135,13 @@ public class ExperimentAnalysisSummaryViewer
private static IDisposableComponent createViewer(
IViewContext<IScreeningClientServiceAsync> viewContext,
IEntityInformationHolderWithProperties experiment,
boolean restrictGlobalScopeLinkToProject, String analysisProcedureOrNull)
boolean restrictGlobalScopeLinkToProject,
AnalysisProcedureCriteria analysisProcedureCriteria)
{
String headingText = viewContext.getMessage(Dict.ASSAY_HEADER, experiment.getCode());
final IDisposableComponent gridComponent =
ExperimentAnalysisSummaryGrid.create(viewContext, experiment,
restrictGlobalScopeLinkToProject);
restrictGlobalScopeLinkToProject, analysisProcedureCriteria);
return MaterialComponentUtils.createExperimentViewer(viewContext, experiment, headingText,
gridComponent);
......
package ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.locator;
import ch.systemsx.cisd.common.shared.basic.utils.StringUtils;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.AbstractViewLocatorResolver;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.locator.ViewLocator;
......@@ -7,6 +8,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureE
import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.IScreeningClientServiceAsync;
import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.detailviewers.ExperimentAnalysisSummaryViewer;
import ch.systemsx.cisd.openbis.plugin.screening.client.web.client.application.ui.columns.specific.ScreeningLinkExtractor;
import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellSearchCriteria.AnalysisProcedureCriteria;
/**
* Locator resolver for experiment analysis summary view.
......@@ -33,10 +35,22 @@ public class ExperimentAnalysisSummaryResolver extends AbstractViewLocatorResolv
getOptionalBooleanParameter(locator,
ScreeningLinkExtractor.RESTRICT_GLOBAL_SEARCH_TO_PROJECT, false);
String analysisProcedureOrNull =
getOptionalParameter(locator, ScreeningLinkExtractor.ANALYSIS_PROCEDURE_KEY);
AnalysisProcedureCriteria analysisProcedureCriteria =
extractAnalysisProcedureCriteria(locator);
ExperimentAnalysisSummaryViewer.openTab(viewContext, experimentPermId,
restrictGlobalScopeLinkToProject, analysisProcedureOrNull);
restrictGlobalScopeLinkToProject, analysisProcedureCriteria);
}
private AnalysisProcedureCriteria extractAnalysisProcedureCriteria(ViewLocator locator)
{
String analysisProcedureCode =
getOptionalParameter(locator, ScreeningLinkExtractor.ANALYSIS_PROCEDURE_KEY);
return StringUtils.isBlank(analysisProcedureCode) ? AnalysisProcedureCriteria
.createAllProcedures() : AnalysisProcedureCriteria
.createFromCode(analysisProcedureCode);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment