diff --git a/.classpath b/.classpath
index f3318e4..a206f89 100644
--- a/.classpath
+++ b/.classpath
@@ -8,9 +8,9 @@
+
-
@@ -24,5 +24,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index 4e4a3ad..26aef1a 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -3,7 +3,10 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
+org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
diff --git a/changelog.xml b/changelog.xml
index 59ada4e..636200c 100644
--- a/changelog.xml
+++ b/changelog.xml
@@ -1,7 +1,13 @@
+
+ [Task #19087] provide a getItem (without getRoot inside) for Workspace-Explorer-App
+
+
- [Feature #18174] Moved to new search facility provided by SHUB
+ [Feature #18174] Moved to new search facility provided by SHUB
+
diff --git a/pom.xml b/pom.xml
index 2421fe8..97db143 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
org.gcube.common
storagehub-client-wrapper
- 0.6.2
+ 0.7.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 by another inteface java beans as defined in (the old) HL interfaces
diff --git a/src/main/java/org/gcube/common/storagehubwrapper/server/WorkspaceStorageHubClientService.java b/src/main/java/org/gcube/common/storagehubwrapper/server/WorkspaceStorageHubClientService.java
index 1977305..0c6e893 100644
--- a/src/main/java/org/gcube/common/storagehubwrapper/server/WorkspaceStorageHubClientService.java
+++ b/src/main/java/org/gcube/common/storagehubwrapper/server/WorkspaceStorageHubClientService.java
@@ -496,6 +496,42 @@ public final class WorkspaceStorageHubClientService implements Workspace{
setIsRoot((org.gcube.common.storagehubwrapper.shared.tohl.impl.WorkspaceItem) workspaceItem);
return workspaceItem;
}
+
+ /**
+ * Gets the item. This call is the same of {@link WorkspaceStorageHubClientService#getItem(String, boolean, boolean, boolean)}
+ * without loading the root (to check if an item is root or not)
+ *
+ * @param itemId the item id
+ * @param withAccounting the with accounting
+ * @param withFileDetails the with file details
+ * @param withMapProperties the with map properties
+ * @return the item
+ * @throws ItemNotFoundException the item not found exception
+ * @throws InternalErrorException the internal error exception
+ * @throws Exception the exception
+ */
+ /* (non-Javadoc)
+ * @see org.gcube.portal.storagehubwrapper.server.tohl.Workspace#getItem(java.lang.String, boolean, boolean, boolean)
+ */
+ @Override
+ public WorkspaceItem getItemForExplorer(
+ String itemId, boolean withAccounting, boolean withFileDetails,
+ boolean withMapProperties)
+ throws ItemNotFoundException, InternalErrorException, Exception {
+
+ LOGGER.debug("called get Item");
+ Validate.notNull(itemId,"The input itemId is null");
+ Item item;
+ try {
+ item = storageHubClientService.getItem(itemId, withAccounting, withMapProperties);
+ }
+ catch (Exception e) {
+ LOGGER.error("Error during get item with id: "+itemId,e);
+ throw new InternalErrorException(e.getMessage());
+ }
+ WorkspaceItem workspaceItem = HLMapper.toWorkspaceItem(item, withAccounting, withFileDetails, withMapProperties);
+ return workspaceItem;
+ }
/**
diff --git a/src/main/java/org/gcube/common/storagehubwrapper/server/tohl/Workspace.java b/src/main/java/org/gcube/common/storagehubwrapper/server/tohl/Workspace.java
index a530a54..3f1308a 100644
--- a/src/main/java/org/gcube/common/storagehubwrapper/server/tohl/Workspace.java
+++ b/src/main/java/org/gcube/common/storagehubwrapper/server/tohl/Workspace.java
@@ -513,6 +513,21 @@ public interface Workspace{
*/
List search(String text, String folderId)
throws InternalErrorException, ItemNotFoundException, WrongItemTypeException;
+
+ /**
+ * Gets the item.
+ *
+ * @param itemId the item id
+ * @param withAccounting the with accounting
+ * @param withFileDetails the with file details
+ * @param withMapProperties the with map properties
+ * @return the item
+ * @throws ItemNotFoundException the item not found exception
+ * @throws InternalErrorException the internal error exception
+ * @throws Exception the exception
+ */
+ WorkspaceItem getItemForExplorer(String itemId, boolean withAccounting, boolean withFileDetails,
+ boolean withMapProperties) throws ItemNotFoundException, InternalErrorException, Exception;
/*
*
@@ -808,8 +823,4 @@ public interface Workspace{
throws Exception;
-
-
-
-
}