diff --git a/src/main/java/org/gcube/portlets/user/vreyard/VreYard.java b/src/main/java/org/gcube/portlets/user/vreyard/VreYard.java
index b36ca0f..c19ba56 100644
--- a/src/main/java/org/gcube/portlets/user/vreyard/VreYard.java
+++ b/src/main/java/org/gcube/portlets/user/vreyard/VreYard.java
@@ -1,6 +1,8 @@
package org.gcube.portlets.user.vreyard;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
@@ -10,9 +12,19 @@ import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.infrastructure.detachedres.detachedreslibrary.server.DetachedREsClient;
import org.gcube.infrastructure.detachedres.detachedreslibrary.shared.re.DetachedREs;
+import org.gcube.portlets.user.thematicgateways.Gateway;
+import org.gcube.vomanagement.usermanagement.GroupManager;
+import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
+import org.gcube.vomanagement.usermanagement.util.ManagementUtils;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.PrefsPropsUtil;
+import com.liferay.portal.model.Group;
+import com.liferay.portal.model.LayoutSet;
+import com.liferay.portal.model.VirtualHost;
+import com.liferay.portal.service.GroupLocalServiceUtil;
+import com.liferay.portal.service.LayoutSetLocalServiceUtil;
+import com.liferay.portal.service.VirtualHostLocalServiceUtil;
import com.liferay.portal.util.PortalUtil;
import com.liferay.util.bridges.mvc.MVCPortlet;
@@ -26,22 +38,17 @@ public class VreYard extends MVCPortlet {
public static final String DEFAULT_USER_PROPERTY = "d4science.publicportlets.user";
public static final String DEFAULT_CONTEXT_PROPERTY = "d4science.publicportlets.context";
public static final String DEFAULT_TOKEN_PROPERTY = "d4science.publicportlets.token";
-
-
-
- public static final String DEFAULT_SCOPE_PROPERTY = "/d4science.research-infrastructures.eu/";
- public static final String DEFAULT_TOKEN = "8effc529-44ec-4895-b727-ed0dc14ad113-843339462";
-
+
public static final String DEFAULT_ROLE = "OrganizationMember";
-
+
@Override
public void render(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException {
try {
-
+
String context = PrefsPropsUtil.getString(PortalUtil.getCompanyId(renderRequest), DEFAULT_CONTEXT_PROPERTY);
String token = PrefsPropsUtil.getString(PortalUtil.getCompanyId(renderRequest), DEFAULT_TOKEN_PROPERTY);
-
+
ScopeProvider.instance.set(context);
SecurityTokenProvider.instance.set(token);
DetachedREsClient detachedREsClient = new DetachedREsClient();
@@ -52,12 +59,54 @@ public class VreYard extends MVCPortlet {
_log.error(e.getLocalizedMessage(), e);
}
-
-
+
+
//renderRequest.setAttribute("theGateways", theGateways);
super.render(renderRequest, renderResponse);
}
+ /**
+ * @param gatewayName e.g.DESIRA Gateway
+ * @return the url of the gateway that matches the name, or null there is no match
+ * @throws Exception
+ */
+ public static String getGatewayHTTPURLByName(String gatewayName) throws Exception {
+ List We couldn't find the page you were looking
for, perhaps you were interested in one of the following Virtual
- Research Environment, that have been hosted on D4Science in the past.