diff --git a/.classpath b/.classpath
index 24204ae..99306f3 100644
--- a/.classpath
+++ b/.classpath
@@ -15,11 +15,13 @@
+
+
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index 6e80039..4e4a3ad 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -5,4 +5,5 @@ org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 5c99f7a..6396ca1 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -1,10 +1,17 @@
-
+ Released due to exceptions thrown by SHUB
+
+
Updated to new SHub interface
Added method getMetadata
-
[Task #12059] added delete item
[Task #12533] added trash operations
@@ -20,12 +27,12 @@
[Task #12720] added Image Preview to StorageHub
-
+
minor fixes
-
+
[Task #12059] first release
diff --git a/pom.xml b/pom.xml
index 1e14ae5..d82006a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
org.gcube.common
storagehub-client-wrapper
- 0.4.0-SNAPSHOT
+ 0.5.0-SNAPSHOT
storagehub-client-wrapper
This is a wrapper of storagehub-client library. It allows to interact with storagehub in a simplified way by exposing several utilities. Moreover, It exposes object as defined in (the old) HL interfaces
diff --git a/src/main/java/org/gcube/common/storagehubwrapper/server/StorageHubClientService.java b/src/main/java/org/gcube/common/storagehubwrapper/server/StorageHubClientService.java
index 077520a..90fe0c7 100644
--- a/src/main/java/org/gcube/common/storagehubwrapper/server/StorageHubClientService.java
+++ b/src/main/java/org/gcube/common/storagehubwrapper/server/StorageHubClientService.java
@@ -110,8 +110,9 @@ public class StorageHubClientService {
* @param withAccounting the with accounting
* @param withMapProperties the with map properties
* @return the children
+ * @throws Exception
*/
- public List extends Item> getChildren(String id, boolean withAccounting, boolean withMapProperties){
+ public List extends Item> getChildren(String id, boolean withAccounting, boolean withMapProperties) throws Exception{
setContextProviders(scope, authorizationToken);
logger.trace("Requesting getChildren for id: "+id+" [withAccounting: "+withAccounting+", withMapProperties: "+withMapProperties+"]");
ListResolverTyped resolverTyped = shcClient.open(id).asFolder().list();
@@ -135,8 +136,9 @@ public class StorageHubClientService {
* @param withAccounting the with accounting
* @param withMapProperties the with map properties
* @return the filtered children
+ * @throws Exception
*/
- public List extends Item> getFilteredChildren(String id, Class extends Item> aType, boolean withAccounting, boolean withMapProperties){
+ public List extends Item> getFilteredChildren(String id, Class extends Item> aType, boolean withAccounting, boolean withMapProperties) throws Exception{
setContextProviders(scope, authorizationToken);
ListResolver resolverTyped = shcClient.open(id).asFolder().list().ofType(aType);
@@ -243,8 +245,9 @@ public class StorageHubClientService {
*
* @param itemId the item id
* @return the parents
+ * @throws Exception
*/
- public List extends Item> getParents(String itemId) {
+ public List extends Item> getParents(String itemId) throws Exception {
setContextProviders(scope, authorizationToken);
ListResolver toReturn = shcClient.open(itemId).asItem().getAnchestors();
if(toReturn==null || toReturn.getItems()==null){
@@ -404,8 +407,9 @@ public class StorageHubClientService {
*
* @param itemId the item id
* @return the item children count
+ * @throws Exception
*/
- public int getItemChildrenCount(String itemId) {
+ public int getItemChildrenCount(String itemId) throws Exception {
setContextProviders(scope, authorizationToken);
ItemManagerClient client = AbstractPlugin.item().build();
diff --git a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/FileItem.java b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/FileItem.java
index 338cafd..097dfd2 100644
--- a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/FileItem.java
+++ b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/FileItem.java
@@ -3,14 +3,14 @@
*/
package org.gcube.common.storagehubwrapper.shared.tohl.impl;
+import org.gcube.common.storagehubwrapper.shared.tohl.items.FileItemType;
+import org.gcube.common.storagehubwrapper.shared.tohl.items.WorkspaceVersion;
+
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-import org.gcube.common.storagehubwrapper.shared.tohl.items.FileItemType;
-import org.gcube.common.storagehubwrapper.shared.tohl.items.WorkspaceVersion;
-
/**
diff --git a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/ImageFile.java b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/ImageFile.java
index 7a094b9..10b252c 100644
--- a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/ImageFile.java
+++ b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/ImageFile.java
@@ -5,14 +5,14 @@ package org.gcube.common.storagehubwrapper.shared.tohl.impl;
import java.io.InputStream;
+import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InternalErrorException;
+
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
-import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InternalErrorException;
-
/**
*
diff --git a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/StreamDescriptor.java b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/StreamDescriptor.java
index 646a336..7d0cc0c 100644
--- a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/StreamDescriptor.java
+++ b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/StreamDescriptor.java
@@ -6,13 +6,13 @@ package org.gcube.common.storagehubwrapper.shared.tohl.impl;
import java.io.InputStream;
import java.io.Serializable;
+import org.gcube.common.storagehubwrapper.shared.tohl.items.ItemStreamDescriptor;
+
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-import org.gcube.common.storagehubwrapper.shared.tohl.items.ItemStreamDescriptor;
-
/**
* Instantiates a new stream descriptor.
diff --git a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/TrashItem.java b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/TrashItem.java
index 42a6c9c..179ab67 100644
--- a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/TrashItem.java
+++ b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/TrashItem.java
@@ -6,14 +6,14 @@ package org.gcube.common.storagehubwrapper.shared.tohl.impl;
import java.util.Calendar;
+import org.gcube.common.storagehubwrapper.shared.tohl.TrashedItem;
+
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
-import org.gcube.common.storagehubwrapper.shared.tohl.TrashedItem;
-
@NoArgsConstructor
@AllArgsConstructor
diff --git a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/WorkspaceItem.java b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/WorkspaceItem.java
index 4030f39..484cde0 100644
--- a/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/WorkspaceItem.java
+++ b/src/main/java/org/gcube/common/storagehubwrapper/shared/tohl/impl/WorkspaceItem.java
@@ -8,16 +8,16 @@ import java.io.Serializable;
import java.util.Calendar;
import java.util.List;
+import org.gcube.common.storagehubwrapper.shared.tohl.AccountingEntry;
+import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItemType;
+import org.gcube.common.storagehubwrapper.shared.tohl.items.PropertyMap;
+
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
-import org.gcube.common.storagehubwrapper.shared.tohl.AccountingEntry;
-import org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItemType;
-import org.gcube.common.storagehubwrapper.shared.tohl.items.PropertyMap;
-
/**
* The Class WorkspaceItemImpl.
*