summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/services
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2012-12-13 15:41:52 (GMT)
committer mconway <michael.c.conway@gmail.com>2012-12-13 15:41:52 (GMT)
commit76bb97d8c5c5fce35b67516cc6b1a795ad233f7d (patch)
treebf6684a619a6a324d4977dd33646ef36e14a3bfb /idrop-web/grails-app/services
parenta9f78fe1e328652202ceda04da6dd6b187f69a09 (diff)
downloadQCG-Data-76bb97d8c5c5fce35b67516cc6b1a795ad233f7d.zip
QCG-Data-76bb97d8c5c5fce35b67516cc6b1a795ad233f7d.tar.gz
QCG-Data-76bb97d8c5c5fce35b67516cc6b1a795ad233f7d.tar.bz2
[#984] unstar functionality
Diffstat (limited to 'idrop-web/grails-app/services')
-rw-r--r--idrop-web/grails-app/services/org/irods/mydrop/service/StarringService.groovy98
1 files changed, 45 insertions, 53 deletions
diff --git a/idrop-web/grails-app/services/org/irods/mydrop/service/StarringService.groovy b/idrop-web/grails-app/services/org/irods/mydrop/service/StarringService.groovy
index fbc1c20..c6e55d7 100644
--- a/idrop-web/grails-app/services/org/irods/mydrop/service/StarringService.groovy
+++ b/idrop-web/grails-app/services/org/irods/mydrop/service/StarringService.groovy
@@ -13,62 +13,54 @@ import org.irods.jargon.usertagging.starring.IRODSStarringServiceImpl
*
*/
class StarringService {
-
+
static transactional = false
IRODSAccessObjectFactory irodsAccessObjectFactory
- IRODSStarredFileOrCollection findStarred(IRODSAccount irodsAccount, String irodsAbsolutePath) throws FileNotFoundException, JargonException {
-
- if (irodsAccount == null) {
- throw new IllegalArgumentException("null irodsAccount");
+ IRODSStarredFileOrCollection findStarred(IRODSAccount irodsAccount, String irodsAbsolutePath) throws FileNotFoundException, JargonException {
+
+ if (irodsAccount == null) {
+ throw new IllegalArgumentException("null irodsAccount");
+ }
+
+ IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
+ return irodsStarringService.findStarredForAbsolutePath(irodsAbsolutePath)
+ }
+
+ void star(IRODSAccount irodsAccount, String irodsAbsolutePath, String description) throws FileNotFoundException, JargonException {
+ if (irodsAccount == null) {
+ throw new IllegalArgumentException("null irodsAccount");
+ }
+
+ IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
+ irodsStarringService.starFileOrCollection(irodsAbsolutePath, description)
+ }
+
+ void unStar(IRODSAccount irodsAccount, String irodsAbsolutePath) throws FileNotFoundException, JargonException {
+ if (irodsAccount == null) {
+ throw new IllegalArgumentException("null irodsAccount");
}
-
- IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
- return irodsStarringService.findStarredForAbsolutePath(irodsAbsolutePath)
-
- }
-
- void star(IRODSAccount irodsAccount, String irodsAbsolutePath, String description) throws FileNotFoundException, JargonException {
- if (irodsAccount == null) {
- throw new IllegalArgumentException("null irodsAccount");
- }
-
- IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
- irodsStarringService.starFileOrCollection(irodsAbsolutePath, description)
-
- }
-
- void unStar(IRODSAccount irodsAccount, String irodsAbsolutePath) throws FileNotFoundException, JargonException {
- if (irodsAccount == null) {
- throw new IllegalArgumentException("null irodsAccount");
- }
-
- IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
- irodsStarringService.unstarFileOrCollection(irodsAbsolutePath)
-
- }
-
- List<IRODSStarredFileOrCollection> listStarredCollections(IRODSAccount irodsAccount, int pagingOffset) throws JargonException {
- if (irodsAccount == null) {
- throw new IllegalArgumentException("null irodsAccount");
- }
-
- IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
- return irodsStarringService.listStarredCollections(pagingOffset)
- }
-
- List<IRODSStarredFileOrCollection> listStarredDataObjects(IRODSAccount irodsAccount, int pagingOffset) throws JargonException {
- if (irodsAccount == null) {
- throw new IllegalArgumentException("null irodsAccount");
- }
-
- IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
- return irodsStarringService.listStarredDataObjects(pagingOffset)
- }
-
-
-
-
+
+ IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
+ irodsStarringService.unstarFileOrCollection(irodsAbsolutePath)
+ }
+
+ List<IRODSStarredFileOrCollection> listStarredCollections(IRODSAccount irodsAccount, int pagingOffset) throws JargonException {
+ if (irodsAccount == null) {
+ throw new IllegalArgumentException("null irodsAccount");
+ }
+
+ IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
+ return irodsStarringService.listStarredCollections(pagingOffset)
+ }
+
+ List<IRODSStarredFileOrCollection> listStarredDataObjects(IRODSAccount irodsAccount, int pagingOffset) throws JargonException {
+ if (irodsAccount == null) {
+ throw new IllegalArgumentException("null irodsAccount");
+ }
+
+ IRODSStarringService irodsStarringService = new IRODSStarringServiceImpl(irodsAccessObjectFactory, irodsAccount)
+ return irodsStarringService.listStarredDataObjects(pagingOffset)
+ }
}
- \ No newline at end of file