Skip to content
Snippets Groups Projects
Commit ae0ee5a9 authored by brinn's avatar brinn
Browse files

[BIS-149/SP-237] Display settings for custom web UIs.

Change interface for web app settings to use WebAppSettings object and add methods getWebAppSettings and setWebAppSettings to IOpenbisServiceFacade.

SVN: 26338
parent 1f551d52
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.NewVocabularyTerm; ...@@ -28,6 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.NewVocabularyTerm;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Sample; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Sample;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SampleFetchOption; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SampleFetchOption;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.WebAppSettings;
import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary;
...@@ -45,6 +46,19 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary; ...@@ -45,6 +46,19 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary;
public interface IOpenbisServiceFacade extends ISimpleOpenbisServiceFacade public interface IOpenbisServiceFacade extends ISimpleOpenbisServiceFacade
{ {
/**
* Returns the persistent settings for a given custom web app.
*
* @param webAppId The id of the custom web app to get the display settings for.
*/
public WebAppSettings getWebAppSettings(String webAppId);
/**
* Sets the persistent settings for a given custom web app.
* @param customDisplaySettings The new display settings
*/
public void setWebAppSettings(WebAppSettings customDisplaySettings);
/** /**
* Return all samples that match the search criteria. * Return all samples that match the search criteria.
* This is a short cut for * This is a short cut for
......
...@@ -55,6 +55,7 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.MatchCl ...@@ -55,6 +55,7 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.MatchCl
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.SearchOperator; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.SearchOperator;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchSubCriteria; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchSubCriteria;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SpaceWithProjectsAndRoleAssignments; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SpaceWithProjectsAndRoleAssignments;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.WebAppSettings;
import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary;
import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifier; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifier;
...@@ -172,16 +173,16 @@ public class OpenbisServiceFacade implements IOpenbisServiceFacade ...@@ -172,16 +173,16 @@ public class OpenbisServiceFacade implements IOpenbisServiceFacade
private final IGeneralInformationChangingService changingService; private final IGeneralInformationChangingService changingService;
private final IDssComponent dssComponent; private final IDssComponent dssComponent;
private final int minorVersionChangingService;
/**
* ctor.
*/
public OpenbisServiceFacade(String sessionToken, IGeneralInformationService service, public OpenbisServiceFacade(String sessionToken, IGeneralInformationService service,
IGeneralInformationChangingService changingService, IDssComponent dssComponent) IGeneralInformationChangingService changingService, IDssComponent dssComponent)
{ {
this.sessionToken = sessionToken; this.sessionToken = sessionToken;
this.service = service; this.service = service;
this.changingService = changingService; this.changingService = changingService;
this.minorVersionChangingService = changingService.getMinorVersion();
this.dssComponent = dssComponent; this.dssComponent = dssComponent;
} }
...@@ -521,6 +522,28 @@ public class OpenbisServiceFacade implements IOpenbisServiceFacade ...@@ -521,6 +522,28 @@ public class OpenbisServiceFacade implements IOpenbisServiceFacade
// //
// IOpenbisServiceFacade // IOpenbisServiceFacade
// //
@Override
public WebAppSettings getWebAppSettings(String webAppId)
{
if (minorVersionChangingService >= 2)
{
return changingService.getWebAppSettings(sessionToken, webAppId);
} else
{
return new WebAppSettings(webAppId, new HashMap<String, String>());
}
}
@Override
public void setWebAppSettings(WebAppSettings customDisplaySettings)
{
if (minorVersionChangingService >= 2)
{
changingService.setWebAppSettings(sessionToken, customDisplaySettings);
}
}
@Override @Override
public List<Sample> searchForSamples(SearchCriteria searchCriteria) public List<Sample> searchForSamples(SearchCriteria searchCriteria)
{ {
......
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