From eb2e2e3741b18cc0bbf41faf94a15adc427c0669 Mon Sep 17 00:00:00 2001
From: pkupczyk <pkupczyk>
Date: Mon, 13 Aug 2012 09:14:49 +0000
Subject: [PATCH] SP-224 / BIS-143: Expose session workspace to Custom Web UI:
 - added some comments

SVN: 26349
---
 .../openbis/public/resources/js/openbis.js    | 26 ++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js
index 20fb78f0e8a..aba4b178f1e 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js
@@ -317,6 +317,11 @@ openbis.prototype.executeQuery = function(queryId, parameterBindings, action) {
 	});
 }
 
+/**
+ * Creates a session workspace file uploader inside the specified uploaderContainer element.
+ * 
+ * @method
+ */
 openbis.prototype.createSessionWorkspaceUploader = function(uploaderContainer){
 	var uploaderSupported = window.File && window.FileReader && window.XMLHttpRequest;
 
@@ -342,14 +347,29 @@ openbis.prototype.createSessionWorkspaceUploader = function(uploaderContainer){
 	});	
 }
 
+/**
+ * Creates a session workspace download url for a file with the specified filePath.
+ * 
+ * @method
+ */
 openbis.prototype.createSessionWorkspaceDownloadUrl = function(filePath){
 	return this.dssUrl + "/session_workspace_file_download?sessionID=" + this.sessionToken + "&filePath=" + filePath; 
 }
 
+/**
+ * Create a session workspace download link for a file with the specified filePath.
+ * 
+ * @method
+ */
 openbis.prototype.createSessionWorkspaceDownloadLink = function(filePath, linkText){
 	return $("<a href='" + this.createSessionWorkspaceDownloadUrl(filePath) + "'>" + (linkText ? linkText : filePath) + "</a>"); 
 }
 
+/**
+ * Downloads a session workspace file with the specified filePath.
+ * 
+ * @method
+ */
 openbis.prototype.downloadSessionWorkspaceFile = function(filePath, action) {
 	$.ajax({
 		type: "GET",
@@ -358,6 +378,11 @@ openbis.prototype.downloadSessionWorkspaceFile = function(filePath, action) {
 	});
 }
 
+/**
+ * Deletes a session workspace file with the specified filePath.
+ * 
+ * @method
+ */
 openbis.prototype.deleteSessionWorkspaceFile = function(filePath, action) {
 	ajaxRequest({
 			url: this.dssApiUrl,
@@ -368,7 +393,6 @@ openbis.prototype.deleteSessionWorkspaceFile = function(filePath, action) {
 	});
 }
 
-
 /**
  * A utility class for deferring an action until all of some kind of action has completed
  *
-- 
GitLab