From 91ad8e8b6cb1c086a2385e4e424824c929c66176 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Tue, 22 Nov 2016 14:55:52 +0000 Subject: [PATCH] Updated support for Storage git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@134535 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 6 ++-- distro/changelog.xml | 3 ++ pom.xml | 2 +- .../server/storage/FilesStorage.java | 29 +++++-------------- 4 files changed, 15 insertions(+), 25 deletions(-) diff --git a/.classpath b/.classpath index 893959b..474166f 100644 --- a/.classpath +++ b/.classpath @@ -1,12 +1,12 @@ - + - + @@ -45,5 +45,5 @@ - + diff --git a/distro/changelog.xml b/distro/changelog.xml index e623569..bc9cb48 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,7 @@ + + Updated Storage support + SAI enhancements [Ticket #4896] Updated to Auth 2.0 diff --git a/pom.xml b/pom.xml index 95cd28c..a00962f 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 4.0.0 org.gcube.portlets.user statistical-algorithms-importer - 1.3.0-SNAPSHOT + 1.4.0-SNAPSHOT war diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/FilesStorage.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/FilesStorage.java index d3f0cff..4e7bb2b 100644 --- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/FilesStorage.java +++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/server/storage/FilesStorage.java @@ -74,8 +74,7 @@ public class FilesStorage { "Attention no public link for this item!"); } - } catch (WorkspaceFolderNotFoundException | InternalErrorException - | HomeNotFoundException | ItemNotFoundException e) { + } catch (Throwable e) { e.printStackTrace(); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); @@ -284,9 +283,7 @@ public class FilesStorage { return ws.find(name, parentId); - } catch (WorkspaceFolderNotFoundException | InternalErrorException - | HomeNotFoundException | ItemNotFoundException - | WrongItemTypeException e) { + } catch (Throwable e) { e.printStackTrace(); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); @@ -465,9 +462,7 @@ public class FilesStorage { return retrieveImputStream(user, projectItem); - } catch (WorkspaceFolderNotFoundException | InternalErrorException - | HomeNotFoundException | ItemNotFoundException - | WrongItemTypeException e) { + } catch (Throwable e) { e.printStackTrace(); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -501,9 +496,7 @@ public class FilesStorage { return true; } - } catch (WorkspaceFolderNotFoundException | InternalErrorException - | HomeNotFoundException | ItemNotFoundException - | WrongItemTypeException e) { + } catch (Throwable e) { e.printStackTrace(); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -525,8 +518,7 @@ public class FilesStorage { WorkspaceItem workSpaceItem = ws.getItem(itemId); return workSpaceItem; - } catch (WorkspaceFolderNotFoundException | InternalErrorException - | HomeNotFoundException | ItemNotFoundException e) { + } catch (Throwable e) { e.printStackTrace(); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -555,8 +547,7 @@ public class FilesStorage { return retrieveImputStream(user, workSpaceItem); - } catch (WorkspaceFolderNotFoundException | InternalErrorException - | HomeNotFoundException | ItemNotFoundException e) { + } catch (Throwable e) { e.printStackTrace(); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -684,9 +675,7 @@ public class FilesStorage { return fileZip; - } catch (IOException | InternalErrorException - | WorkspaceFolderNotFoundException | HomeNotFoundException - | ItemNotFoundException e) { + } catch (Throwable e) { e.printStackTrace(); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); } @@ -711,9 +700,7 @@ public class FilesStorage { return fileZip; - } catch (IOException | InternalErrorException - | WorkspaceFolderNotFoundException | HomeNotFoundException - | ItemNotFoundException e) { + } catch (Throwable e) { e.printStackTrace(); throw new StatAlgoImporterServiceException(e.getLocalizedMessage()); }