diff options
author | Mike 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) |
commit | 79f94dffa929f75c077eadd615b35abffb3f7466 (patch) | |
tree | b198785a2c8a7586e05ac5f9945a93cf3fbc1a7a /idrop-web/grails-app | |
parent | eb51d67d250f7ec6497578516f43317b80f02f56 (diff) | |
download | QCG-Data-79f94dffa929f75c077eadd615b35abffb3f7466.zip QCG-Data-79f94dffa929f75c077eadd615b35abffb3f7466.tar.gz QCG-Data-79f94dffa929f75c077eadd615b35abffb3f7466.tar.bz2 |
fix ref to transfer engine, txfr engine now an interface
Diffstat (limited to 'idrop-web/grails-app')
4 files changed, 35 insertions, 6 deletions
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 |