diff --git a/src/main/java/org/gcube/portlet/user/my_vres/server/MyVREsServiceImpl.java b/src/main/java/org/gcube/portlet/user/my_vres/server/MyVREsServiceImpl.java index 1e9f698..5757c02 100644 --- a/src/main/java/org/gcube/portlet/user/my_vres/server/MyVREsServiceImpl.java +++ b/src/main/java/org/gcube/portlet/user/my_vres/server/MyVREsServiceImpl.java @@ -2,7 +2,6 @@ package org.gcube.portlet.user.my_vres.server; import java.util.ArrayList; import java.util.Collections; -import java.util.Date; import java.util.LinkedHashMap; import java.util.List; @@ -32,6 +31,7 @@ import org.slf4j.LoggerFactory; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.StringBundler; import com.liferay.portal.model.Group; import com.liferay.portal.model.VirtualHost; import com.liferay.portal.security.auth.PrincipalThreadLocal; @@ -42,6 +42,8 @@ import com.liferay.portal.service.GroupLocalServiceUtil; import com.liferay.portal.service.LayoutSetLocalServiceUtil; import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.service.VirtualHostLocalServiceUtil; +import com.liferay.portal.util.PortalUtil; +import com.liferay.portal.webserver.WebServerServletTokenUtil; /** * The server side implementation of the RPC service. @@ -126,7 +128,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer _log.error("Cannot find root organziation, please check gcube-data.properties file in $CATALINA_HOME/conf folder, unless your installing the Bundle"); return toReturn; } - long nowInMillis = new Date().getTime(); + //for each root sub organizations (VO) for (GCubeGroup vOrg : rootGroupVO.getChildren()) { for (GCubeGroup vre : vOrg.getChildren()) { @@ -134,7 +136,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer vreToAdd.setName(vre.getGroupName()); vreToAdd.setGroupName(gm.getInfrastructureScope(vre.getGroupId())); long logoId = vre.getLogoId(); - String logoURL = "/image/layout_set_logo?img_id="+ logoId+"&t="+nowInMillis; + String logoURL = gm.getGroupLogoURL(logoId); vreToAdd.setImageURL(logoURL); String vreUrl = GCubePortalConstants.PREFIX_GROUP_URL+vre.getFriendlyURL(); vreToAdd.setFriendlyURL(vreUrl); @@ -168,7 +170,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer return null; } } - + /** *