summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy')
-rwxr-xr-xidrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy19
1 files changed, 17 insertions, 2 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 1fee905..235a682 100755
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/BrowseController.groovy
@@ -14,12 +14,14 @@ import org.irods.jargon.datautils.image.MediaHandlingUtils
import org.irods.jargon.datautils.pagination.PagingActions
import org.irods.jargon.datautils.pagination.PagingAnalyser
import org.irods.jargon.datautils.sharing.*
+import org.irods.jargon.ruleservice.composition.Rule
import org.irods.jargon.ticket.TicketDistributionContext
import org.irods.jargon.usertagging.domain.IRODSStarredFileOrCollection
import org.irods.jargon.usertagging.tags.FreeTaggingService
import org.irods.jargon.usertagging.tags.IRODSTaggingService
import org.irods.jargon.usertagging.tags.TaggingServiceFactory
import org.irods.mydrop.config.ViewState
+import org.irods.mydrop.service.RuleProcessingService
import org.irods.mydrop.service.StarringService
import org.irods.mydrop.service.ViewStateService
@@ -34,6 +36,7 @@ class BrowseController {
TaggingServiceFactory taggingServiceFactory
StarringService starringService
ViewStateService viewStateService
+ RuleProcessingService ruleProcessingService
IRODSAccount irodsAccount
def grailsApplication
@@ -769,9 +772,21 @@ class BrowseController {
if (commentTag) {
comment = commentTag.getTagData()
}
-
+
+
+ Rule rule = null
+ if (ruleProcessingService.isRule(absPath)) {
+ log.info("is a .r file, see if a rule")
+ try {
+
+ rule = ruleProcessingService.loadRuleFromIrodsFile(irodsAccount, absPath)
+ } catch (JargonException je) {
+ log.error("exception attempting to load rule, do not show tab")
+ }
+ }
+
mav.view = "dataObjectInfo"
- mav.model = [dataObject:retObj,tags:freeTags,comment:comment,getThumbnail:getThumbnail,renderMedia:renderMedia,isDataObject:isDataObject,irodsStarredFileOrCollection:irodsStarredFileOrCollection,showLite:collectionAndDataObjectListAndSearchAO.getIRODSServerProperties().isTheIrodsServerAtLeastAtTheGivenReleaseVersion("rods3.0")]
+ mav.model = [dataObject:retObj,tags:freeTags,comment:comment,getThumbnail:getThumbnail,renderMedia:renderMedia,isDataObject:isDataObject,irodsStarredFileOrCollection:irodsStarredFileOrCollection,showLite:collectionAndDataObjectListAndSearchAO.getIRODSServerProperties().isTheIrodsServerAtLeastAtTheGivenReleaseVersion("rods3.0"), rule:rule]
return mav
} else {
log.info("getting free tags for collection")