Updated support for Storage

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@134563 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-11-22 16:51:26 +00:00
parent 7b18c3abe4
commit d31743f9b0
4 changed files with 14 additions and 15 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/tabular-data-gwt-service-2.13.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/tabular-data-gwt-service-2.14.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/tabular-data-gwt-service-2.13.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/tabular-data-gwt-service-2.14.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -33,5 +33,5 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/tabular-data-gwt-service-2.13.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/tabular-data-gwt-service-2.14.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,4 +1,7 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets-user.tabular-data-gwt-service.2-14-0" date="2016-12-01">
<Change>Updated storage support</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.tabular-data-gwt-service.2-13-0" date="2016-10-01">
<Change>Fixed cast on Replace by External [issue #4883]</Change>
<Change>Updated to Auth 2.0</Change>

View File

@ -14,7 +14,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-gwt-service</artifactId>
<version>2.13.0-SNAPSHOT</version>
<version>2.14.0-SNAPSHOT</version>
<name>tabular-data-gwt-service</name>
<description>tabular-data-gwt-service allows communication between the GUI and services</description>

View File

@ -10,14 +10,10 @@ import java.net.URL;
import java.net.URLConnection;
import org.gcube.common.homelibrary.home.HomeLibrary;
import org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException;
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
import org.gcube.common.homelibrary.home.workspace.Workspace;
import org.gcube.common.homelibrary.home.workspace.WorkspaceFolder;
import org.gcube.common.homelibrary.home.workspace.WorkspaceItem;
import org.gcube.common.homelibrary.home.workspace.WorkspaceSharedFolder;
import org.gcube.common.homelibrary.home.workspace.exceptions.ItemNotFoundException;
import org.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException;
import org.gcube.common.homelibrary.util.WorkspaceUtil;
import org.gcube.contentmanagement.blobstorage.service.IClient;
import org.gcube.contentmanager.storageclient.wrapper.AccessType;
@ -153,7 +149,7 @@ public class FilesStorage {
uc = (URLConnection) url.openConnection();
is = uc.getInputStream();
} catch (Exception e) {
} catch (Throwable e) {
logger.error("Error retrieving file from storage", e);
e.printStackTrace();
throw new TDGWTServiceException(
@ -171,7 +167,7 @@ public class FilesStorage {
bos.write(buffer, 0, readCount);
}
bos.close();
} catch (IOException e) {
} catch (Throwable e) {
logger.error(
"Error trasferring file from storage: "
+ e.getLocalizedMessage(), e);
@ -208,7 +204,7 @@ public class FilesStorage {
uc = (URLConnection) url.openConnection();
is = uc.getInputStream();
} catch (Exception e) {
} catch (Throwable e) {
logger.error("Error retrieving file from storage", e);
e.printStackTrace();
throw new TDGWTServiceException(
@ -244,7 +240,7 @@ public class FilesStorage {
uc = (URLConnection) url.openConnection();
is = uc.getInputStream();
} catch (Exception e) {
} catch (Throwable e) {
logger.error("Error retrieving file from storage", e);
e.printStackTrace();
throw new TDGWTServiceException(
@ -296,7 +292,7 @@ public class FilesStorage {
is.close();
} catch (Exception e) {
} catch (Throwable e) {
logger.error("Error creating item on workspace", e);
e.printStackTrace();
throw new TDGWTServiceException(
@ -334,7 +330,7 @@ public class FilesStorage {
WorkspaceUtil.createExternalFile(folder, uniqueName,
item_description, item_mimetype, storageId);
} catch (Exception e) {
} catch (Throwable e) {
logger.error("Error creating item on workspace", e);
e.printStackTrace();
throw new TDGWTServiceException(
@ -363,7 +359,7 @@ public class FilesStorage {
return null;
}
} catch (Exception e) {
} catch (Throwable e) {
logger.error("Error retrieving VRE folder by scope!", e);
e.printStackTrace();
throw new TDGWTServiceException(