summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-02-24 17:37:10 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-02-24 17:37:10 (GMT)
commit79f94dffa929f75c077eadd615b35abffb3f7466 (patch)
treeb198785a2c8a7586e05ac5f9945a93cf3fbc1a7a
parenteb51d67d250f7ec6497578516f43317b80f02f56 (diff)
downloadQCG-Data-79f94dffa929f75c077eadd615b35abffb3f7466.zip
QCG-Data-79f94dffa929f75c077eadd615b35abffb3f7466.tar.gz
QCG-Data-79f94dffa929f75c077eadd615b35abffb3f7466.tar.bz2
fix ref to transfer engine, txfr engine now an interface
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDropSplashWindow.java9
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy1
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy30
-rw-r--r--idrop-web/grails-app/views/browse/collectionInfo.gsp6
-rw-r--r--idrop-web/grails-app/views/browse/dataObjectInfo.gsp4
-rw-r--r--idrop-web/web-app/js/mydrop/home.js67
6 files changed, 74 insertions, 43 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDropSplashWindow.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDropSplashWindow.java
index 972d7ab..555a7e1 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDropSplashWindow.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDropSplashWindow.java
@@ -8,7 +8,7 @@ import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JProgressBar;
-import javax.swing.JWindow;
+import javax.swing.JWindow;
import javax.swing.SwingWorker;
import org.irods.jargon.core.exception.JargonException;
@@ -17,6 +17,7 @@ import org.irods.jargon.idrop.desktop.systraygui.utils.IdropConfig;
import org.irods.jargon.idrop.exceptions.IdropException;
import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
import org.irods.jargon.transferengine.TransferManager;
+import org.irods.jargon.transferengine.TransferManagerImpl;
import org.slf4j.LoggerFactory;
/**
@@ -26,7 +27,7 @@ import org.slf4j.LoggerFactory;
public class IDropSplashWindow extends JWindow implements Runnable {
/**
- *
+ *
*/
private static final long serialVersionUID = 1L;
@@ -168,8 +169,8 @@ public class IDropSplashWindow extends JWindow implements Runnable {
* the status of the queue. This app listens to the TransferManager to receive updates about what the
* queue is doing.
*/
-
- TransferManager transferManager = TransferManager.instanceWithCallbackListenerAndUserLevelDatabase(
+
+ TransferManager transferManager = TransferManagerImpl.instanceWithCallbackListenerAndUserLevelDatabase(
iDrop, iDrop.getiDropCore().getIdropConfig().isLogSuccessfulTransfers(), iDrop.getiDropCore()
.getIdropConfig().getTransferDatabaseName());
iDrop.getiDropCore().setTransferManager(transferManager);
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
index 8be653d..8864511 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
@@ -55,7 +55,6 @@ class BrowseController {
def collectionAndDataObjectListAndSearchAO = irodsAccessObjectFactory.getCollectionAndDataObjectListAndSearchAO(irodsAccount)
def collectionAndDataObjectList = collectionAndDataObjectListAndSearchAO.listDataObjectsAndCollectionsUnderPath(parent)
log.debug("retrieved collectionAndDataObjectList: ${collectionAndDataObjectList}")
- //render(view:"loadTree",model:[collectionAndDataObjectList:collectionAndDataObjectList, parent:parent])
render collectionAndDataObjectList as JSON
}
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy
index d1e13fc..def8612 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy
@@ -5,8 +5,11 @@ import org.irods.jargon.core.exception.JargonRuntimeException
import org.irods.jargon.core.pub.IRODSAccessObjectFactory
import org.irods.jargon.usertagging.TaggingServiceFactory
import org.irods.jargon.usertagging.UserTagCloudService
+import org.irods.jargon.usertagging.FreeTaggingService
import org.irods.jargon.usertagging.domain.UserTagCloudView
import org.springframework.security.core.context.SecurityContextHolder
+import org.irods.jargon.core.exception.*
+
class TagsController {
@@ -31,6 +34,9 @@ class TagsController {
def index = { }
+ /**
+ * Retrieve a tag cloud for the user
+ */
def tagCloud = {
log.info("getting tag cloud for user: ${irodsAccount}")
@@ -41,4 +47,28 @@ class TagsController {
}
+ /**
+ * update the tag for the collection or data object based on a free tag string
+ */
+ def updateTags = {
+ def absPath = params['absPath']
+ def tagString = params['tags']
+
+
+ if (absPath == null || absPath.length == 0) {
+ throw new JargonException("no absPath passed to method")
+ }
+
+ if (tagString == null) {
+ throw new JargonRuntimeException("null tags passed to method")
+ }
+
+ log.info("updating tags for file: ${absPath} for user: ${irodsAccount.userName}")
+
+ FreeTaggingService freeTaggingService = taggingServiceFactory.instanceFreeTaggingService(irodsAccount)
+ freeTaggingService.updateTagsForUserForADataObjectOrCollection(absPath, irodsAccount.userName, tags)
+ log.info("tags updated")
+
+ }
+
}
diff --git a/idrop-web/grails-app/views/browse/collectionInfo.gsp b/idrop-web/grails-app/views/browse/collectionInfo.gsp
index 9656a5c..15f50b0 100644
--- a/idrop-web/grails-app/views/browse/collectionInfo.gsp
+++ b/idrop-web/grails-app/views/browse/collectionInfo.gsp
@@ -12,7 +12,7 @@ Collection:</label> <g:textField name="collectionParentName"
<label for="tags">Tags:</label> <g:textField name="tags"
value="${tags.spaceDelimitedTagsForDomain}" /> <br />
-
-
-
+
+<button type="button" id="updateTags" value="updateTags" onclick="updateTags()")>Update Tags</button>
+
</fieldset> \ No newline at end of file
diff --git a/idrop-web/grails-app/views/browse/dataObjectInfo.gsp b/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
index ad9fa3b..28392b4 100644
--- a/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
+++ b/idrop-web/grails-app/views/browse/dataObjectInfo.gsp
@@ -18,7 +18,7 @@ Collection:</label> <g:textField name="collectionName"
<label for="tags">Tags:</label> <g:textField name="tags"
value="${tags.spaceDelimitedTagsForDomain}" /> <br />
-
-
+
+<button type="button" id="updateTags" value="updateTags" onclick="updateTags()")>Update Tags</button>
</fieldset> \ No newline at end of file
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index 585c4c6..da7f347 100644
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -87,7 +87,6 @@ function nodeTreeRetrievedViaAjax(targetNode, jsonData) {
* @return
*/
// get rid of
-
function buildDataForNodeRequest(n) {
var nodeData = {
"dir" : "/"
@@ -122,25 +121,24 @@ function browserFirstViewRetrieved(data) {
}
}
},
- "types" : {
- "types": {
- "file" : {
- "valid_children" : "none",
- "icon" : {
- "image" : context + "/images/file.png"
- }
- },
- "folder" : {
- "valid_children" : [ "default", "folder", "file" ],
- "icon" : {
- "image" : context + "/images/folder.png"
- }
- }
- }
-
- },
-
-
+ "types" : {
+ "types" : {
+ "file" : {
+ "valid_children" : "none",
+ "icon" : {
+ "image" : context + "/images/file.png"
+ }
+ },
+ "folder" : {
+ "valid_children" : [ "default", "folder", "file" ],
+ "icon" : {
+ "image" : context + "/images/folder.png"
+ }
+ }
+ }
+
+ },
+
"themes" : {
"theme" : "default",
"url" : context + "/css/style.css",
@@ -149,17 +147,16 @@ function browserFirstViewRetrieved(data) {
},
"plugins" : [ "json_data", "types", "ui", "crmm", "themes" ]
});
-
- $("#dataTreeDiv").bind("select_node.jstree", function (e, data) {
- // alert(data.rslt.obj); // this is the object that was clicked
- nodeSelected(e, data.rslt.obj);
- });
-
+ $("#dataTreeDiv").bind("select_node.jstree", function(e, data) {
+ // alert(data.rslt.obj); // this is the object that was clicked
+ nodeSelected(e, data.rslt.obj);
+ });
- /*dataTree.live("click", function(event, data) {
- nodeSelected(event, data)
- });*/
+ /*
+ * dataTree.live("click", function(event, data) { nodeSelected(event, data)
+ * });
+ */
}
@@ -181,10 +178,10 @@ function nodeLoadedCallback() {
*/
function nodeSelected(event, data) {
// given the path, put in the node data
-
+
var id = data[0].id;
- lcSendValueAndCallbackHtmlAfterErrorCheck("/browse/fileInfo?absPath=" + id, "#infoDiv",
- "#infoDiv", null);
+ lcSendValueAndCallbackHtmlAfterErrorCheck("/browse/fileInfo?absPath=" + id,
+ "#infoDiv", "#infoDiv", null);
}
@@ -216,4 +213,8 @@ function isThisNodeLoaded(node) {
return obj == -1 || !obj || obj.is(".jstree-open, .jstree-leaf")
|| obj.children("ul").children("li").size() > 0;
-} \ No newline at end of file
+}
+
+function updateTags() {
+ alert("updating tags");
+}