summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/services
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-02-04 17:03:11 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-02-04 17:03:11 (GMT)
commit598f05b8c42301a40beea7d9def478c691698ceb (patch)
tree097ac852b5f1e79a663283063cc4b6328d2a9a94 /idrop-web/grails-app/services
parente67064b6207efb50d6a4727c1f5a12226fb082de (diff)
downloadQCG-Data-598f05b8c42301a40beea7d9def478c691698ceb.zip
QCG-Data-598f05b8c42301a40beea7d9def478c691698ceb.tar.gz
QCG-Data-598f05b8c42301a40beea7d9def478c691698ceb.tar.bz2
[#1181] fix memory in idrop web2 when changing login
Diffstat (limited to 'idrop-web/grails-app/services')
-rw-r--r--idrop-web/grails-app/services/org/irods/mydrop/service/SharingService.groovy26
-rw-r--r--idrop-web/grails-app/services/org/irods/mydrop/service/ViewStateService.groovy9
2 files changed, 34 insertions, 1 deletions
diff --git a/idrop-web/grails-app/services/org/irods/mydrop/service/SharingService.groovy b/idrop-web/grails-app/services/org/irods/mydrop/service/SharingService.groovy
index b59ebb4..b964ab3 100644
--- a/idrop-web/grails-app/services/org/irods/mydrop/service/SharingService.groovy
+++ b/idrop-web/grails-app/services/org/irods/mydrop/service/SharingService.groovy
@@ -123,7 +123,31 @@ class SharingService {
irodsSharingService.createShare(irodsAbsolutePath, shareName);
return irodsSharingService.findShareByAbsolutePath(irodsAbsolutePath)
}
+
+ /**
+ * Update the given share to the new share name
+ * @param irodsAbsolutePath
+ * @param newShareName
+ * @param irodsAccount
+ * @return
+ * @throws JargonException
+ */
+ IRODSSharedFileOrCollection updateShare(String irodsAbsolutePath, String newShareName, IRODSAccount irodsAccount) throws JargonException {
+ if (irodsAbsolutePath == null || irodsAbsolutePath.isEmpty()) {
+ throw new IllegalArgumentException("null or empty irodsAbsolutePath")
+ }
+
+ if (newShareName == null || newShareName.isEmpty()) {
+ throw new IllegalArgumentException("null or empty newShareName")
+ }
-
+ if (irodsAccount == null) {
+ throw new IllegalArgumentException("null irodsAccount");
+ }
+
+ IRODSSharingService irodsSharingService = new IRODSSharingServiceImpl(irodsAccessObjectFactory, irodsAccount)
+ irodsSharingService.updateShareName(irodsAbsolutePath, newShareName)
+ return irodsSharingService.findShareByAbsolutePath(irodsAbsolutePath)
+ }
}
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 db3097b..baabfcb 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
@@ -20,6 +20,15 @@ class ViewStateService {
}
/**
+ * clear the view state
+
+ */
+ public void clearViewState() {
+ getSession().viewState = null
+
+ }
+
+ /**
* Store the root Path
* @param path
* @return