#3148 added possibility to postpone VRE expiration time of six months, moved to GWT 2.7.0

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/vre-manager@113722 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-03-25 10:23:44 +00:00
parent 4f5c47ac50
commit a16da6b7d7
1 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,8 @@
package org.gcube.portlets.admin.vredeployment.server;
import static org.gcube.vremanagement.vremodel.cl.plugin.AbstractPlugin.factory;
import static org.gcube.vremanagement.vremodel.cl.plugin.AbstractPlugin.manager;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
@ -29,6 +32,7 @@ import org.gcube.application.framework.vremanagement.vremanagement.impl.VREGener
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portlets.admin.vredeployment.client.VREDeploymentService;
import org.gcube.portlets.admin.vredeployment.shared.VREDefinitionBean;
import org.gcube.vremanagement.vremodel.cl.proxy.Manager;
import org.gcube.vremanagement.vremodel.cl.stubs.types.FunctionalityItem;
import org.gcube.vremanagement.vremodel.cl.stubs.types.Report;
import org.gcube.vremanagement.vremodel.cl.stubs.types.ResourceDescriptionItem;
@ -57,7 +61,7 @@ public class VREDeploymentServiceImpl extends RemoteServiceServlet implements VR
private static final String VRE_GENERATOR_ATTRIBUTE = "VREGenerator";
private static final String VIEW_MODE_ATTRIBUTE = "viewMode";
private static final String HARD_CODED_VO_NAME = "/gcube/devsec";
private static final String HARD_CODED_VO_NAME = "/d4science.research-infrastructures.eu/gCubeApps";
@Override
@ -80,12 +84,13 @@ public class VREDeploymentServiceImpl extends RemoteServiceServlet implements VR
else {
VREDescription vreDetail = null;
try {
vreDetail = new VREGeneratorEvo(aslSession, vre.id()).getVREModel();
} catch (RemoteException e) {
Manager modelPortType = manager().at(factory().build().getEPRbyId(vre.id())).build();
vreDetail = modelPortType.getDescription();
} catch (Exception e) {
e.printStackTrace();
}
Date start = new Date();
Date end = new Date();
Date start = null;
Date end = null;
if (vreDetail != null) {
start = vreDetail.startTime().getTime();
end = vreDetail.endTime().getTime();