summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/services
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-02-20 14:13:29 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-02-20 14:13:29 (GMT)
commitaec8225fd964595f15cb29409c5397e6d24addbf (patch)
tree92e3452f0d1afa0a863972248f070249564605b4 /idrop-web/grails-app/services
parente7de93334ae241acab34763f3931d76eecf1c0b8 (diff)
downloadQCG-Data-aec8225fd964595f15cb29409c5397e6d24addbf.zip
QCG-Data-aec8225fd964595f15cb29409c5397e6d24addbf.tar.gz
QCG-Data-aec8225fd964595f15cb29409c5397e6d24addbf.tar.bz2
[#1222] click over from shared folder now broken
Diffstat (limited to 'idrop-web/grails-app/services')
-rw-r--r--idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy22
1 files changed, 20 insertions, 2 deletions
diff --git a/idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy b/idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy
index 228e00e..5e4f754 100644
--- a/idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy
+++ b/idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy
@@ -33,13 +33,14 @@ class ViewStateService {
* @param path
* @return
*/
- public void saveRootPath(String path) {
+ public ViewState saveRootPath(String path) {
if (path == null) {
throw new IllegalArgumentException("null path")
}
ViewState viewState = getViewStateFromSessionAndCreateIfNotThere()
viewState.rootPath = path
+ return viewState
}
@@ -53,6 +54,22 @@ class ViewStateService {
}
/**
+ * Save a path for later retrieval
+ * @param absolutePath
+ */
+ public ViewState saveSelectedPath(String absolutePath) {
+
+
+ if (absolutePath == null) {
+ throw new IllegalArgumentException("null absolutePath")
+ }
+
+ ViewState viewState = getViewStateFromSessionAndCreateIfNotThere()
+ viewState.selectedPath = absolutePath
+ return viewState
+ }
+
+ /**
* Save a path and mode in the view state for later retrieval
* @param viewMode
* @param absolutePath
@@ -73,12 +90,13 @@ class ViewStateService {
return viewState
}
- public void saveViewMode(String viewMode) {
+ public ViewState saveViewMode(String viewMode) {
if (viewMode == null) {
throw new IllegalArgumentException("null viewMode")
}
ViewState viewState = getViewStateFromSessionAndCreateIfNotThere()
viewState.browseView = viewMode
+ return viewState
}