From 5519f2592b442de5ccac3914ac31d06e19d0ea94 Mon Sep 17 00:00:00 2001
From: cramakri <cramakri>
Date: Mon, 20 Aug 2012 10:42:09 +0000
Subject: [PATCH] BIS-149 SP-237 : Added functions to get and set webapp
 settings to openbis.js

SVN: 26397
---
 openbis/source/javascript/openbis.js | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/openbis/source/javascript/openbis.js b/openbis/source/javascript/openbis.js
index 50d3a7c8008..a0a3f819d40 100644
--- a/openbis/source/javascript/openbis.js
+++ b/openbis/source/javascript/openbis.js
@@ -65,6 +65,7 @@ function eraseCookie(name) {
  */
 function openbis(url, dssUrl) {
 	this.generalInfoServiceUrl = url + "/rmi-general-information-v1.json";
+	this.generalInfoChangingServiceUrl = url + "/rmi-general-information-changing-v1.json";
 	this.queryServiceUrl = url + "/rmi-query-v1.json";
 	this.dssUrl = dssUrl + "/rmi-dss-api-v1.json";
 	this.webInfoServiceUrl = url + "/openbis/openbis/rmi-web-information-v1.json"
@@ -328,6 +329,30 @@ openbis.prototype.createReportFromAggregationService = function(dataStoreCode, s
 	});
 }
 
+/**
+ * See ch.systemsx.cisd.openbis.generic.shared.api.v1.IGeneralInformationChangingService.getWebAppSettings(String, String)
+ */
+openbis.prototype.getWebAppSettings = function(webappId, action) {
+	ajaxRequest({
+		url: this.generalInfoChangingServiceUrl,
+		data: { "method" : "getWebAppSettings",
+		params : [ this.sessionToken, webappId ] },
+		success: action
+	});
+}
+
+/**
+ * See ch.systemsx.cisd.openbis.generic.shared.api.v1.IGeneralInformationChangingService.setWebAppSettings(String, WebAppSettings)
+ */
+openbis.prototype.setWebAppSettings = function(webappSettings, action) {
+	ajaxRequest({
+		url: this.generalInfoChangingServiceUrl,
+		data: { "method" : "setWebAppSettings",
+		params : [ this.sessionToken, webappSettings ] },
+		success: action
+	});
+}
+
 /**
  * A utility class for deferring an action until all of some kind of action has completed
  *
-- 
GitLab