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

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

Keep WebAppSettings out of the DisplaySettings to fix GWT compilation.

SVN: 26340
parent 61139532
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,8 @@ public class GeneralInformationChangingService extends
public WebAppSettings getWebAppSettings(String sessionToken, String webAppId)
{
final Session session = getSession(sessionToken);
return session.getPerson().getDisplaySettings().getCustomWebAppSettings(webAppId);
return new WebAppSettings(webAppId, session.getPerson().getDisplaySettings()
.getCustomWebAppSettings(webAppId));
}
@Override
......@@ -123,7 +124,8 @@ public class GeneralInformationChangingService extends
{
final Session session = getSession(sessionToken);
final DisplaySettings displaySettings = session.getPerson().getDisplaySettings();
displaySettings.setCustomWebAppSettings(webAppSettings);
displaySettings.setCustomWebAppSettings(webAppSettings.getWebAppId(),
webAppSettings.getSettings());
saveDisplaySettings(session.getSessionToken(), null, -1);
}
......
......@@ -22,8 +22,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.WebAppSettings;
/**
* Class storing personalized display settings. This class implements {@link Serializable} not only
* for transferring it's content remotely but also to store it in the database. Thus, CHANGES IN
......@@ -313,7 +311,7 @@ public class DisplaySettings implements Serializable
* @deprecated Don't use in generic web client - will be overwritten.
*/
@Deprecated
public synchronized WebAppSettings getCustomWebAppSettings(String webAppId)
public synchronized Map<String, String> getCustomWebAppSettings(String webAppId)
{
if (customWebAppDisplaySettings == null)
{
......@@ -325,20 +323,20 @@ public class DisplaySettings implements Serializable
settings = new HashMap<String, String>();
customWebAppDisplaySettings.put(webAppId, settings);
}
return new WebAppSettings(webAppId, settings);
return settings;
}
/**
* @deprecated Don't use in generic web client - will be overwritten.
*/
@Deprecated
public synchronized void setCustomWebAppSettings(WebAppSettings settings)
public synchronized void setCustomWebAppSettings(String webAppId, Map<String, String> settings)
{
if (customWebAppDisplaySettings == null)
{
customWebAppDisplaySettings = new HashMap<String, Map<String, String>>();
}
customWebAppDisplaySettings.put(settings.getWebAppId(), settings.getSettings());
customWebAppDisplaySettings.put(webAppId, settings);
}
/**
......
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