"datastore_server/git@sissource.ethz.ch:sispub/openbis.git" did not exist on "57792209e3773d534af0932c24969937027e4d75"
Newer
Older
define([ 'jquery', 'util/Json', 'as/dto/datastore/search/DataStoreSearchCriteria', 'as/dto/datastore/fetchoptions/DataStoreFetchOptions',
'as/dto/common/search/SearchResult'], function(jquery,
stjsUtil, DataStoreSearchCriteria, DataStoreFetchOptions, SearchResult) {
jquery.noConflict();
var __private = function() {
this.ajaxRequest = function(settings) {
var thisPrivate = this;
settings.type = "POST";
settings.processData = false;
settings.dataType = "json";
var returnType = settings.returnType;
if (returnType) {
delete settings.returnType;
}
var data = settings.data;
data["id"] = "1";
data["jsonrpc"] = "2.0";
// decycle each parameter separately (jackson does not recognize
// object ids across different parameters)
if (data.params && data.params.length > 0) {
var newParams = [];
data.params.forEach(function(param) {
var newParam = stjsUtil.decycle(param);
newParams.push(newParam);
});
data.params = newParams;
}
settings.data = JSON.stringify(data);
var originalSuccess = settings.success || function() {
};
var originalError = settings.error || function() {
};
var dfd = jquery.Deferred();
function success(response) {
if (response.error) {
thisPrivate.log("Request failed - data: " + JSON.stringify(settings.data) + ", error: " + JSON.stringify(response.error));
originalError(response.error);
dfd.reject(response.error);
} else {
thisPrivate.log("Request succeeded - data: " + JSON.stringify(settings.data));
stjsUtil.fromJson(returnType, response.result).done(function(dtos) {
originalSuccess(dtos);
dfd.resolve(dtos);
}).fail(function() {
originalError(arguments);
dfd.reject(arguments);
});
}
}
function error(xhr, status, error) {
thisPrivate.log("Request failed - data: " + JSON.stringify(settings.data) + ", error: " + JSON.stringify(error));
originalError(error);
dfd.reject(error);
}
jquery.ajax(settings).done(success).fail(error);
return dfd.promise();
pkupczyk
committed
this.loginCommon = function(user, isAnonymousUser, response) {
var dfd = jquery.Deferred();
response.done(function(sessionToken) {
pkupczyk
committed
if (sessionToken && (isAnonymousUser || sessionToken.indexOf(user) > -1)) {
dfd.resolve(sessionToken);
} else {
dfd.reject();
}
}).fail(function() {
dfd.reject();
});
return dfd.promise();
if (console) {
console.log(msg);
}
}
}
var dataStoreFacade = function(facade, dataStoreCodes) {
felmer
committed
this._getDataStores = function() {
if (this._dataStores) {
var dfd = jquery.Deferred();
felmer
committed
dfd.resolve(this._dataStores);
return dfd.promise();
} else {
var thisFacade = this;
var criteria = new DataStoreSearchCriteria();
criteria.withOrOperator();
for (var i = 0; i < dataStoreCodes.length; i++) {
criteria.withCode().thatEquals(dataStoreCodes[i]);
}
return facade.searchDataStores(criteria, new DataStoreFetchOptions()).then(function(results) {
var dataStores = results.getObjects();
var dfd = jquery.Deferred();
if (dataStores && dataStores.length > 0) {
felmer
committed
thisFacade._dataStores = dataStores;
dfd.resolve(dataStores);
} else {
if (dataStoreCodes.length > 0) {
dfd.reject("No data stores found for codes: " + dataStoreCodes);
} else {
dfd.reject("No data stores found");
}
}
return dfd.promise();
});
}
}
piotr.kupczyk@id.ethz.ch
committed
function createUrlWithParameters(dataStore, servlet, parameters) {
return dataStore.downloadUrl + "/datastore_server/" + servlet + parameters;
}
function createUrl(dataStore) {
felmer
committed
return dataStore.downloadUrl + "/datastore_server/rmi-data-store-server-v3.json";
}
this.searchFiles = function(criteria, fetchOptions) {
felmer
committed
var thisFacade = this;
return this._getDataStores().then(function(dataStores) {
var promises = dataStores.map(function(dataStore) {
return facade._private.ajaxRequest({
url : createUrl(dataStore),
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
data : {
"method" : "searchFiles",
"params" : [ facade._private.sessionToken, criteria, fetchOptions ]
},
returnType : "SearchResult"
});
});
return jquery.when.apply(jquery, promises).then(function() {
var objects = [];
var totalCount = 0;
for (var i = 0; i < arguments.length; i++) {
var result = arguments[i];
if (result.getObjects()) {
Array.prototype.push.apply(objects, result.getObjects());
}
if (result.getTotalCount()) {
totalCount += result.getTotalCount();
}
}
var combinedResult = new SearchResult();
combinedResult.setObjects(objects);
combinedResult.setTotalCount(totalCount);
return combinedResult;
});
});
}
piotr.kupczyk@id.ethz.ch
committed
felmer
committed
this.createDataSets = function(creations) {
var thisFacade = this;
var creationsByStore = {};
for (var i = 0; i < creations.length; i++) {
var creation = creations[i];
var dataStoreCode = creation.getMetadataCreation().getDataStoreId().toString();
if (dataStoreCode in creationsByStore) {
creationsByStore[dataStoreCode].append(creation);
} else {
piotr.kupczyk@id.ethz.ch
committed
creationsByStore[dataStoreCode] = [ creation ];
felmer
committed
}
}
return this._getDataStores().then(function(dataStores) {
var promises = [];
for (var i = 0; i < dataStores.length; i++) {
var dataStore = dataStores[i];
var dsCode = dataStore.getCode();
if (dsCode in creationsByStore) {
promises.push(facade._private.ajaxRequest({
url : createUrl(dataStore),
felmer
committed
data : {
"method" : "createDataSets",
"params" : [ facade._private.sessionToken, creationsByStore[dsCode] ]
},
returnType : {
name : "List",
arguments : [ "DataSetPermId" ]
}
}));
}
}
return jquery.when.apply(jquery, promises).then(function() {
var dataSetIds = [];
for (var i = 0; i < arguments.length; i++) {
dataSetIds = jquery.merge(dataSetIds, arguments[i]);
}
return dataSetIds;
});
});
}
piotr.kupczyk@id.ethz.ch
committed
this.createDataSetUpload = function(dataSetType) {
var pad = function(value, length) {
var result = "" + value;
while (result.length < length) {
result = "0" + result;
}
return result;
}
return this._getDataStores().then(
function(dataStores) {
var dfd = jquery.Deferred();
if (dataStores.length > 1) {
dfd.reject("Please specify exactly one data store");
} else {
piotr.kupczyk@id.ethz.ch
committed
var dataStore = dataStores[0];
piotr.kupczyk@id.ethz.ch
committed
var now = new Date();
var id = "upload-" + now.getFullYear() + pad(now.getMonth() + 1, 2) + pad(now.getDate(), 2) + pad(now.getHours(), 2) + pad(now.getMinutes(), 2) + pad(now.getSeconds(), 2)
+ "-" + pad(Math.round(Math.random() * 100000), 5);
dfd.resolve({
piotr.kupczyk@id.ethz.ch
committed
"getId" : function() {
return id;
},
"getUrl" : function(folderPath, ignoreFilePath) {
var params = {
"sessionID" : facade._private.sessionToken,
"uploadID" : id,
"dataSetType" : dataSetType
};
if (folderPath != null) {
params["folderPath"] = folderPath;
}
if (ignoreFilePath != null) {
params["ignoreFilePath"] = ignoreFilePath;
}
return dataStore.downloadUrl + "/datastore_server/store_share_file_upload?" + jquery.param(params);
},
"getDataSetType" : function() {
return dataSetType;
}
piotr.kupczyk@id.ethz.ch
committed
});
}
return dfd.promise();
});
}
this.createUploadedDataSet = function(creation) {
var dfd = jquery.Deferred();
this._getDataStores().done(function(dataStores) {
if (dataStores.length === 1) {
facade._private.ajaxRequest({
url: createUrl(dataStores[0]),
data: {
"method": "createUploadedDataSet",
"params": [facade._private.sessionToken, creation]
},
returnType: {
name: "DataSetPermId"
}
}).done(function (response) {
dfd.resolve(response);
}).fail(function (error) {
dfd.reject(error);
});
} else {
piotr.kupczyk@id.ethz.ch
committed
dfd.reject("Please specify exactly one data store");
}
});
return dfd.promise();
}
function getUUID() {
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
);
}
this.uploadFilesWorkspaceDSS = function(files) {
var thisFacade = this;
var uploadId = getUUID();
var dfd = jquery.Deferred();
this._uploadFileWorkspaceDSSEmptyDir(uploadId).then(function() {
thisFacade._uploadFilesWorkspaceDSS(files, uploadId).then(function(result) {
dfd.resolve(result);
}).catch(function(error) {
dfd.reject(error);
});
}).catch(function(error) {
dfd.reject(error);
});
return dfd;
this._uploadFilesWorkspaceDSS = async function(files, parentId) {
var createdDirectories = new Set();
var filesCount = files.length;
for (var i = 0; i < filesCount; i++) {
var relativePath = files[i].webkitRelativePath;
var directoryRelativePath = relativePath.substring(0, relativePath.lastIndexOf("/") + 1);
if (directoryRelativePath && !createdDirectories.has(directoryRelativePath)) {
await this._uploadFileWorkspaceDSSEmptyDir(parentId + "/" + directoryRelativePath);
createdDirectories.add(directoryRelativePath);
await this._uploadFileWorkspaceDSSFile(files[i], parentId);
}
this._uploadFileWorkspaceDSSEmptyDir = function(pathToDir) {
var thisFacade = this;
var sessionID = facade._private.sessionToken;
var filename = encodeURIComponent(pathToDir);
return new Promise(function(resolve, reject) {
thisFacade._getDataStores().done(function(dataStores) {
if (dataStores.length === 1) {
fetch(createUrlWithParameters(dataStores[0], "session_workspace_file_upload",
"?sessionID=" + sessionID +
"&filename=" + filename +
"&id=1&startByte=0&endByte=0&size=0&emptyFolder=true"), {
method: "POST",
headers: {
"Content-Type": "multipart/form-data"
}
}).then(function (response) {
resolve(response);
}).catch(function (error) {
reject(error);
});
} else {
reject("Please specify exactly one data store");
}
}).fail(function(error) {
reject(error);
});
});
}
this._uploadFileWorkspaceDSSFile = function(file, parentId) {
var thisFacade = this;
return new Promise(function(resolve, reject) {
thisFacade._getDataStores().done(function(dataStores) {
uploadBlob(dataStores[0], parentId, facade._private.sessionToken, file, 0, 1048576)
.then(function (value) {
resolve(value);
})
.catch(function (reason) {
reject(reason);
});
}).fail(function(error) {
reject(error);
});
piotr.kupczyk@id.ethz.ch
committed
});
}
async function uploadBlob(dataStore, parentId, sessionID, file, startByte, chunkSize) {
var fileSize = file.size;
for (var byte = startByte; byte < fileSize; byte += chunkSize) {
await fetch(createUrlWithParameters(dataStore, "session_workspace_file_upload",
"?sessionID=" + sessionID +
"&filename=" + encodeURIComponent(parentId + "/" +
(file.webkitRelativePath ? file.webkitRelativePath : file.name)) +
"&id=1&startByte=" + byte +
"&endByte=" + (byte + chunkSize) +
"&size=" + fileSize +
"&emptyFolder=false"), {
method: "POST",
headers: {
"Content-Type": "multipart/form-data"
},
body: makeChunk(file, byte, Math.min(byte + chunkSize, fileSize))
}
}
function makeChunk(file, startByte, endByte) {
var blob = undefined;
if (file.slice) {
blob = file.slice(startByte, endByte);
} else if (file.webkitSlice) {
blob = file.webkitSlice(startByte, endByte);
} else if (file.mozSlice) {
blob = file.mozSlice(startByte, endByte);
}
return blob;
}
}
pkupczyk
committed
var facade = function(openbisUrl) {
if (!openbisUrl) {
openbisUrl = "/openbis/openbis/rmi-application-server-v3.json";
}
this.login = function(user, password) {
pkupczyk
committed
return thisFacade._private.loginCommon(user, false, thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "login",
"params" : [ user, password ]
}
}));
}
this.loginAs = function(user, password, asUserId) {
pkupczyk
committed
return thisFacade._private.loginCommon(asUserId, false, thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "loginAs",
"params" : [ user, password, asUserId ]
}
}));
}
this.loginAsAnonymousUser = function() {
pkupczyk
committed
return thisFacade._private.loginCommon(null, true, thisFacade._private.ajaxRequest({
"method" : "loginAsAnonymousUser",
pkupczyk
committed
"params" : []
this.loginFromContext = function() {
this._private.sessionToken = this.getWebAppContext().getSessionId();
}
this.logout = function() {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "logout",
"params" : [ thisFacade._private.sessionToken ]
}
}).done(function() {
});
}
this.getSessionInformation = function() {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "getSessionInformation",
"params" : [ thisFacade._private.sessionToken ]
},
returnType : "SessionInformation"
});
}
this.createSpaces = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createSpaces",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "SpacePermId" ]
}
});
}
this.createProjects = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createProjects",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "ProjectPermId" ]
}
});
}
this.createExperiments = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createExperiments",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "ExperimentPermId" ]
}
});
}
this.createExperimentTypes = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createExperimentTypes",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "EntityTypePermId" ]
}
});
}
this.createExternalDms = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createExternalDataManagementSystems",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "ExternalDmsPermId" ]
}
});
this.createSamples = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createSamples",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "SamplePermId" ]
}
});
}
this.createSampleTypes = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createSampleTypes",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "EntityTypePermId" ]
}
});
}
this.createDataSetTypes = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createDataSetTypes",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "EntityTypePermId" ]
}
});
}
this.createDataSets = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createDataSets",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "DataSetPermId" ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.createMaterials = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createMaterials",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "MaterialPermId" ]
}
});
}
this.createMaterialTypes = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createMaterialTypes",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "EntityTypePermId" ]
}
});
}
this.createPropertyTypes = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createPropertyTypes",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "PropertyTypePermId" ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.createPlugins = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createPlugins",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "PluginPermId" ]
}
});
}
this.createVocabularies = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createVocabularies",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "VocabularyPermId" ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
pkupczyk
committed
this.createVocabularyTerms = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createVocabularyTerms",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "VocabularyTermPermId" ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.createTags = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createTags",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "TagPermId" ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.createAuthorizationGroups = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createAuthorizationGroups",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "AuthorizationGroupPermId" ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.createRoleAssignments = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createRoleAssignments",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "RoleAssignmentTechId" ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
felmer
committed
this.createPersons = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createPersons",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "PersonPermId" ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.createSemanticAnnotations = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createSemanticAnnotations",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "SemanticAnnotationPermId" ]
}
});
}
this.createQueries = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createQueries",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "QueryTechId" ]
}
});
}
this.createPersonalAccessTokens = function(creations) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "createPersonalAccessTokens",
"params" : [ thisFacade._private.sessionToken, creations ]
},
returnType : {
name : "List",
arguments : [ "PersonalAccessTokenPermId" ]
}
});
}
this.updateSpaces = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateSpaces",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
this.updateProjects = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateProjects",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
this.updateExperiments = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateExperiments",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
felmer
committed
this.updateExperimentTypes = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateExperimentTypes",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.updateSamples = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateSamples",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
felmer
committed
this.updateSampleTypes = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateSampleTypes",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.updateDataSets = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateDataSets",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
felmer
committed
this.updateDataSetTypes = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateDataSetTypes",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.updateMaterials = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateMaterials",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
felmer
committed
this.updateMaterialTypes = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateMaterialTypes",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
felmer
committed
this.updateExternalDataManagementSystems = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateExternalDataManagementSystems",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.updatePropertyTypes = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updatePropertyTypes",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
this.updatePlugins = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updatePlugins",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.updateVocabularies = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateVocabularies",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
pkupczyk
committed
this.updateVocabularyTerms = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateVocabularyTerms",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
pkupczyk
committed
this.updateTags = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateTags",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}
piotr.kupczyk@id.ethz.ch
committed
this.updateAuthorizationGroups = function(updates) {
var thisFacade = this;
return thisFacade._private.ajaxRequest({
url : openbisUrl,
data : {
"method" : "updateAuthorizationGroups",
"params" : [ thisFacade._private.sessionToken, updates ]
}
});
}