diff --git a/.classpath b/.classpath
index 802912f..2a8c446 100644
--- a/.classpath
+++ b/.classpath
@@ -1,6 +1,6 @@
-
+
@@ -31,5 +31,5 @@
-
+
diff --git a/.settings/org.eclipse.jst.jsp.core.prefs b/.settings/org.eclipse.jst.jsp.core.prefs
new file mode 100644
index 0000000..3a5c98d
--- /dev/null
+++ b/.settings/org.eclipse.jst.jsp.core.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+validateFragments=false
+validation.use-project-settings=true
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index c882136..ed06e30 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -1,8 +1,11 @@
-
+
+
+ uses
+
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
index 4045d87..b3a52d7 100644
--- a/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -4,4 +4,5 @@
+
diff --git a/pom.xml b/pom.xml
index 2314ac2..32b84a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
org.gcube.portlets.admin
vre-deploy
war
- 3.3.0-SNAPSHOT
+ 3.4.0-SNAPSHOT
gCube VRE Deploy Wizard Portlet
gCube VRE Deploy Wizard Portlet.
@@ -49,6 +49,7 @@
com.google.gwt
gwt-user
+ ${gwtVersion}
provided
diff --git a/src/main/java/org/gcube/portlets/admin/vredeployer/client/model/Model.java b/src/main/java/org/gcube/portlets/admin/vredeployer/client/model/Model.java
index 3da4d96..cbcafd3 100644
--- a/src/main/java/org/gcube/portlets/admin/vredeployer/client/model/Model.java
+++ b/src/main/java/org/gcube/portlets/admin/vredeployer/client/model/Model.java
@@ -1,12 +1,16 @@
package org.gcube.portlets.admin.vredeployer.client.model;
+import java.util.LinkedList;
import java.util.List;
import org.gcube.portlets.admin.vredeployer.client.VredeployerService;
import org.gcube.portlets.admin.vredeployer.client.VredeployerServiceAsync;
import org.gcube.portlets.admin.vredeployer.client.view.panels.MainContainer;
import org.gcube.portlets.admin.vredeployer.shared.GHNBean;
+import org.gcube.portlets.admin.vredeployer.shared.GHNMemory;
import org.gcube.portlets.admin.vredeployer.shared.GHNProfile;
+import org.gcube.portlets.admin.vredeployer.shared.GHNSite;
+import org.gcube.portlets.admin.vredeployer.shared.RunningInstance;
import org.gcube.portlets.admin.vredeployer.shared.VREDeployerStatusType;
import org.gcube.portlets.admin.vredeployer.shared.VREDescrBean;
@@ -122,6 +126,14 @@ public class Model {
}
public void onSuccess(List result) {
+ GHNMemory mem = new GHNMemory("9900000000", "990000000");
+ GHNSite site = new GHNSite("Lucca", "Italy", "d4science.org");
+ List run = new LinkedList();
+ List libs = new LinkedList();
+ GHNProfile dummy = new GHNProfile(
+ "13ea2882-97f7-4961-bae1-872fa2ff7157", "node-dummy",
+ run, false, mem, site, libs, false);
+ result.add(dummy);
mainContainer.getCenterPanel().showGHNList(result);
mainContainer.getCenterPanel().layout();
if (! isCloudSelected)
diff --git a/src/main/java/org/gcube/portlets/admin/vredeployer/server/VREDeployerServiceImpl.java b/src/main/java/org/gcube/portlets/admin/vredeployer/server/VREDeployerServiceImpl.java
index a4cff27..0c2480a 100644
--- a/src/main/java/org/gcube/portlets/admin/vredeployer/server/VREDeployerServiceImpl.java
+++ b/src/main/java/org/gcube/portlets/admin/vredeployer/server/VREDeployerServiceImpl.java
@@ -139,7 +139,7 @@ import com.liferay.portal.theme.ThemeDisplay;
*/
@SuppressWarnings("serial")
public class VREDeployerServiceImpl extends RemoteServiceServlet implements VredeployerService {
-
+
private static final Logger log = LoggerFactory.getLogger(VREDeployerServiceImpl.class);
/**
@@ -147,7 +147,7 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
*/
private static final String CALENDAR_APPID = "org.gcube.portal.calendarwrapper.GCubeCalendarHandler";
private static final String NEWS_FEED_APPID = "org.gcube.portlets.user.newsfeed.server.NewsServiceImpl";
-
+
protected static final String ORGANIZATION_DEFAULT_LOGO = "/org/gcube/portal/custom/communitymanager/resources/default_logo.png";
protected static final String ORGANIZATION_DEFAULT_LOGO_URL = "http://ftp.d4science.org/apps/profiles/d4slogo.png";
@@ -729,20 +729,35 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
Organization vreCreated = createCommunityAndLayout(name);
if (vreCreated != null) {
try {
-
+
log.info("--- CREATED LAYOUTS AND COMMUNITY OK, updating Calendar Application Profile.");
String vreScope = getScopeByOrganizationId(""+vreCreated.getOrganizationId());
String vreUrl = "/group/"+vreCreated.getName().toLowerCase();
- updateApplicationProfile(CALENDAR_APPID, vreScope, vreUrl+"/calendar");
- updateApplicationProfile(NEWS_FEED_APPID, vreScope, vreUrl); //assumes it is deployed in the home of the VRE
+ boolean calandarAppProfileUpdated = false;
+ try {
+ calandarAppProfileUpdated = updateApplicationProfile(CALENDAR_APPID, vreScope, vreUrl+"/calendar");
+ }
+ catch (Exception e) {
+ log.error("Something wrong in updateApplicationProfile for " + CALENDAR_APPID);
+ }
+ boolean newsFeedAppProfileUpdated = false;
+ try {
+ newsFeedAppProfileUpdated = updateApplicationProfile(NEWS_FEED_APPID, vreScope, vreUrl); //assumes it is deployed in the home of the VRE
+ }
+ catch (Exception e) {
+ log.error("Something wrong in updateApplicationProfile for " + NEWS_FEED_APPID);
+ }
+ log.info("updateApplicationProfile for " + CALENDAR_APPID + "="+calandarAppProfileUpdated);
+ log.info("updateApplicationProfile for " + NEWS_FEED_APPID + "="+newsFeedAppProfileUpdated);
- log.info("--- creating VRE Group Folder");
+
+ log.info("Trying to create VRE Group Folder through HomeLibrary ...");
createVRESharedGroupFolder(vreCreated, designer, manager, description);
-
+
log.info("--- createVRESharedGroupFolder OK, sending Message to designer.");
-
-
-
+
+
+
UserManager um = new LiferayUserManager();
UserModel userDesigner = um.getUserByScreenName(designer);
UserModel userManager = um.getUserByScreenName(manager);
@@ -758,9 +773,9 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
if (nnm.notifyMessageReceived(designer, subject))
log.trace("Sending Definition create notification: " + subject + " OK");
} catch (Exception e) {
-
+ e.printStackTrace();
}
- log.info("--- Trying to share a news for this VRE");
+ //log.info("--- Trying to share a news for this VRE");
//shareCreatedVRENews(designer, manager, name, description);
@@ -786,7 +801,7 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
* @param vreScope the scope to add
* @param vreURL the absolute URL of the portlet
*/
- private void updateApplicationProfile(String appId, String vreScope, String vreURL) {
+ private boolean updateApplicationProfile(String appId, String vreScope, String vreURL) {
String currScope = ScopeProvider.instance.get();
String scopeToQuery = PortalContext.getConfiguration().getInfrastructureName();
@@ -799,10 +814,10 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
query.addCondition("$resource/Profile/Body/AppId/text() eq '" + appId + "'");
DiscoveryClient client = clientFor(GenericResource.class);
- //
+
List list = client.submit(query);
if (list == null || list.isEmpty()) {
- log.warn("Cannot retrieve the ApplicationProfile from IS for generic resource havin = " + appId);
+ log.warn("Cannot retrieve the ApplicationProfile from IS for generic resource having = " + appId);
log.info("Triggering Creation of ApplicationProfile for " + appId);
GenericResource toCreate = new GenericResource();
toCreate.newProfile().name("Application Profile for " + appId);
@@ -812,9 +827,9 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
RegistryPublisher rp=RegistryPublisherFactory.create();
rp.create(toCreate);
log.info("Creation of ApplicationProfile for " + appId + " OK!");
- return;
+ return false;
}
-
+
GenericResource gr = list.get(0);
log.debug("updating ApplicationProfile for " + gr.profile().name());
@@ -827,12 +842,12 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
elem.appendChild(fragmentNode);
} catch (Exception e) {
//in case no xml is entered, just text
- log.error("errore");
+ log.error("error");
}
RegistryPublisher rp=RegistryPublisherFactory.create();
rp.update(gr);
ScopeProvider.instance.set(currScope);
-
+ return true;
}
@@ -1213,7 +1228,7 @@ public class VREDeployerServiceImpl extends RemoteServiceServlet implements Vre
//however the VRE-Designer and the VRE-Manager persons of the VRE could be different and need to be created too
UserManager uman = new LiferayUserManager();
-
+
//if the manager is not the one who triggered the creation
if (manager.compareTo(getASLSession().getUsername()) != 0) {
diff --git a/src/main/resources/org/gcube/portlets/admin/vredeployer/Vredeployer.gwt.xml b/src/main/resources/org/gcube/portlets/admin/vredeployer/Vredeployer.gwt.xml
index e09ab60..56bdca4 100644
--- a/src/main/resources/org/gcube/portlets/admin/vredeployer/Vredeployer.gwt.xml
+++ b/src/main/resources/org/gcube/portlets/admin/vredeployer/Vredeployer.gwt.xml
@@ -10,12 +10,9 @@
-
-
-
-
+
+
+