Updated support for Storage

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/accounting-manager@134536 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-11-22 15:06:25 +00:00
parent 153ff75e35
commit f635ae3871
4 changed files with 16 additions and 25 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/accounting-manager-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/accounting-manager-1.5.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/accounting-manager-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/accounting-manager-1.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -45,5 +45,5 @@
</classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="output" path="target/accounting-manager-1.4.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/accounting-manager-1.5.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,4 +1,9 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-5-0"
date="2016-12-01">
<Change>Added Context Chart</Change>
<Change>Added Cache</Change>
</Changeset>
<Changeset component="org.gcube.portlets.admin.accounting-manager.1-4-0"
date="2016-10-01">
<Change>Updated to AUTH2.0</Change>

View File

@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.admin</groupId>
<artifactId>accounting-manager</artifactId>
<version>1.4.0-SNAPSHOT</version>
<version>1.5.0-SNAPSHOT</version>
<packaging>war</packaging>

View File

@ -4,15 +4,8 @@ import java.io.InputStream;
import org.apache.log4j.Logger;
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.WorkspaceItem;
import org.gcube.common.homelibrary.home.workspace.exceptions.InsufficientPrivilegesException;
import org.gcube.common.homelibrary.home.workspace.exceptions.ItemAlreadyExistException;
import org.gcube.common.homelibrary.home.workspace.exceptions.ItemNotFoundException;
import org.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException;
import org.gcube.common.homelibrary.home.workspace.exceptions.WrongDestinationException;
import org.gcube.common.homelibrary.home.workspace.folder.FolderItem;
import org.gcube.common.homelibrary.home.workspace.folder.items.ExternalFile;
import org.gcube.portlets.admin.accountingmanager.shared.exception.ServiceException;
@ -56,8 +49,9 @@ public class StorageUtil {
"Attention no public link for this item!");
}
} catch (Exception e) {
e.printStackTrace();
} catch (Throwable e) {
logger.error("getPublicLink: "
+ e.getLocalizedMessage(),e);
throw new ServiceException(e.getLocalizedMessage());
}
@ -85,13 +79,9 @@ public class StorageUtil {
}
return workspaceItem.getId();
} catch (WorkspaceFolderNotFoundException | InternalErrorException
| HomeNotFoundException | InsufficientPrivilegesException
| ItemAlreadyExistException | WrongDestinationException
| ItemNotFoundException e) {
} catch (Throwable e) {
logger.error("CreateAccountingFolderOnWorkspace: "
+ e.getLocalizedMessage());
e.printStackTrace();
+ e.getLocalizedMessage(),e);
throw new ServiceException(e.getLocalizedMessage(), e);
}
@ -130,12 +120,8 @@ public class StorageUtil {
throw new ServiceException("Invalid destination folder!");
}
} catch (WorkspaceFolderNotFoundException | InternalErrorException
| HomeNotFoundException | InsufficientPrivilegesException
| ItemAlreadyExistException | WrongDestinationException
| ItemNotFoundException e) {
logger.error("SaveOnWorkspace: " + e.getLocalizedMessage());
e.printStackTrace();
} catch (Throwable e) {
logger.error("SaveOnWorkspace: " + e.getLocalizedMessage(), e);
throw new ServiceException(e.getLocalizedMessage(), e);
}