Released due to exceptions thrown by SHUB

Updated pom version at 0.5.0

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/storagehub-client-wrapper@178953 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2019-04-09 10:34:36 +00:00
parent 528b20a8e4
commit a34fa96a9a
10 changed files with 38 additions and 24 deletions

View File

@ -15,11 +15,13 @@
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">

View File

@ -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.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=1.8

View File

@ -1,10 +1,17 @@
<ReleaseNotes> <ReleaseNotes>
<Changeset component="org.gcube.common.storagehubwrapper.0-4-0" <Changeset
component="org.gcube.common.storagehubwrapper.0-5-0"
date="${buildDate}">
<Change>Released due to exceptions thrown by SHUB</Change>
</Changeset>
<Changeset
component="org.gcube.common.storagehubwrapper.0-4-0"
date="${buildDate}"> date="${buildDate}">
<Change>Updated to new SHub interface</Change> <Change>Updated to new SHub interface</Change>
<Change>Added method getMetadata</Change> <Change>Added method getMetadata</Change>
</Changeset> </Changeset>
<Changeset component="org.gcube.common.storagehubwrapper.0-3-0" <Changeset
component="org.gcube.common.storagehubwrapper.0-3-0"
date="${buildDate}"> date="${buildDate}">
<Change>[Task #12059] added delete item</Change> <Change>[Task #12059] added delete item</Change>
<Change>[Task #12533] added trash operations</Change> <Change>[Task #12533] added trash operations</Change>
@ -20,12 +27,12 @@
<Change>[Task #12720] added Image Preview to StorageHub <Change>[Task #12720] added Image Preview to StorageHub
</Change> </Change>
</Changeset> </Changeset>
<Changeset component="org.gcube.common.storagehubwrapper.0-2-0" <Changeset
date="2018-06-20"> component="org.gcube.common.storagehubwrapper.0-2-0" date="2018-06-20">
<Change>minor fixes</Change> <Change>minor fixes</Change>
</Changeset> </Changeset>
<Changeset component="org.gcube.common.storagehubwrapper.0-1-0" <Changeset
date="2018-06-20"> component="org.gcube.common.storagehubwrapper.0-1-0" date="2018-06-20">
<Change>[Task #12059] first release</Change> <Change>[Task #12059] first release</Change>
</Changeset> </Changeset>
</ReleaseNotes> </ReleaseNotes>

View File

@ -10,7 +10,7 @@
</parent> </parent>
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
<artifactId>storagehub-client-wrapper</artifactId> <artifactId>storagehub-client-wrapper</artifactId>
<version>0.4.0-SNAPSHOT</version> <version>0.5.0-SNAPSHOT</version>
<name>storagehub-client-wrapper</name> <name>storagehub-client-wrapper</name>
<description>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</description> <description>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</description>
<scm> <scm>

View File

@ -110,8 +110,9 @@ public class StorageHubClientService {
* @param withAccounting the with accounting * @param withAccounting the with accounting
* @param withMapProperties the with map properties * @param withMapProperties the with map properties
* @return the children * @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); setContextProviders(scope, authorizationToken);
logger.trace("Requesting getChildren for id: "+id+" [withAccounting: "+withAccounting+", withMapProperties: "+withMapProperties+"]"); logger.trace("Requesting getChildren for id: "+id+" [withAccounting: "+withAccounting+", withMapProperties: "+withMapProperties+"]");
ListResolverTyped resolverTyped = shcClient.open(id).asFolder().list(); ListResolverTyped resolverTyped = shcClient.open(id).asFolder().list();
@ -135,8 +136,9 @@ public class StorageHubClientService {
* @param withAccounting the with accounting * @param withAccounting the with accounting
* @param withMapProperties the with map properties * @param withMapProperties the with map properties
* @return the filtered children * @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); setContextProviders(scope, authorizationToken);
ListResolver resolverTyped = shcClient.open(id).asFolder().list().ofType(aType); ListResolver resolverTyped = shcClient.open(id).asFolder().list().ofType(aType);
@ -243,8 +245,9 @@ public class StorageHubClientService {
* *
* @param itemId the item id * @param itemId the item id
* @return the parents * @return the parents
* @throws Exception
*/ */
public List<? extends Item> getParents(String itemId) { public List<? extends Item> getParents(String itemId) throws Exception {
setContextProviders(scope, authorizationToken); setContextProviders(scope, authorizationToken);
ListResolver toReturn = shcClient.open(itemId).asItem().getAnchestors(); ListResolver toReturn = shcClient.open(itemId).asItem().getAnchestors();
if(toReturn==null || toReturn.getItems()==null){ if(toReturn==null || toReturn.getItems()==null){
@ -404,8 +407,9 @@ public class StorageHubClientService {
* *
* @param itemId the item id * @param itemId the item id
* @return the item children count * @return the item children count
* @throws Exception
*/ */
public int getItemChildrenCount(String itemId) { public int getItemChildrenCount(String itemId) throws Exception {
setContextProviders(scope, authorizationToken); setContextProviders(scope, authorizationToken);
ItemManagerClient client = AbstractPlugin.item().build(); ItemManagerClient client = AbstractPlugin.item().build();

View File

@ -3,14 +3,14 @@
*/ */
package org.gcube.common.storagehubwrapper.shared.tohl.impl; 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.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import org.gcube.common.storagehubwrapper.shared.tohl.items.FileItemType;
import org.gcube.common.storagehubwrapper.shared.tohl.items.WorkspaceVersion;
/** /**

View File

@ -5,14 +5,14 @@ package org.gcube.common.storagehubwrapper.shared.tohl.impl;
import java.io.InputStream; import java.io.InputStream;
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InternalErrorException;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; import lombok.ToString;
import org.gcube.common.storagehubwrapper.shared.tohl.exceptions.InternalErrorException;
/** /**
* *

View File

@ -6,13 +6,13 @@ package org.gcube.common.storagehubwrapper.shared.tohl.impl;
import java.io.InputStream; import java.io.InputStream;
import java.io.Serializable; import java.io.Serializable;
import org.gcube.common.storagehubwrapper.shared.tohl.items.ItemStreamDescriptor;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import org.gcube.common.storagehubwrapper.shared.tohl.items.ItemStreamDescriptor;
/** /**
* Instantiates a new stream descriptor. * Instantiates a new stream descriptor.

View File

@ -6,14 +6,14 @@ package org.gcube.common.storagehubwrapper.shared.tohl.impl;
import java.util.Calendar; import java.util.Calendar;
import org.gcube.common.storagehubwrapper.shared.tohl.TrashedItem;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; import lombok.ToString;
import org.gcube.common.storagehubwrapper.shared.tohl.TrashedItem;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor

View File

@ -8,16 +8,16 @@ import java.io.Serializable;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; 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.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; 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. * The Class WorkspaceItemImpl.
* *