Added efficient method to retireve VRE logo URLs
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/join-vre@131975 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2f132cd0f0
commit
6764557280
|
@ -44,6 +44,7 @@ import com.liferay.portal.kernel.exception.PortalException;
|
|||
import com.liferay.portal.kernel.exception.SystemException;
|
||||
import com.liferay.portal.kernel.log.Log;
|
||||
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||||
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;
|
||||
|
@ -55,6 +56,7 @@ 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;
|
||||
|
||||
/**
|
||||
* @author Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it
|
||||
|
@ -157,6 +159,7 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
|||
_log.trace("RETURNING VRECustomAttributes:\n" + toReturn.toString());
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the Virtual groups with their VREs in the order estabilished in the LR Control Panel
|
||||
|
@ -191,7 +194,7 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
|||
GCubeUser currUser = new LiferayUserManager().getUserByUsername(session.getUsername());
|
||||
currUserGroups = gm.listGroupsByUser(currUser.getUserId());
|
||||
}
|
||||
long nowInMillis = new Date().getTime();
|
||||
|
||||
//for each root sub organizations (VO)
|
||||
for (GCubeGroup vOrg : rootGroupVO.getChildren()) {
|
||||
for (GCubeGroup vreOrganization : vOrg.getChildren()) {
|
||||
|
@ -200,7 +203,7 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
|||
String vreDescription = vreOrganization.getDescription();
|
||||
|
||||
long logoId = vreOrganization.getLogoId();
|
||||
String vreLogoURL = "/image/layout_set_logo?img_id="+ logoId+"&t="+nowInMillis;;
|
||||
String vreLogoURL = gm.getGroupLogoURL(logoId);
|
||||
String groupName = gm.getInfrastructureScope(vreOrganization.getGroupId());
|
||||
String friendlyURL = GCubePortalConstants.PREFIX_GROUP_URL+vreOrganization.getFriendlyURL();
|
||||
|
||||
|
@ -318,9 +321,9 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
|||
String vreName = selectedVRE.getGroupName();
|
||||
String vreDescription = selectedVRE.getDescription();
|
||||
|
||||
long nowInMillis = new Date().getTime();
|
||||
|
||||
long logoId = selectedVRE.getLogoId();
|
||||
String vreLogoURL = "/image/layout_set_logo?img_id="+ logoId+"&t="+nowInMillis;;
|
||||
String vreLogoURL = gm.getGroupLogoURL(logoId);
|
||||
String infraScope = gm.getInfrastructureScope(selectedVRE.getGroupId());
|
||||
String friendlyURL = GCubePortalConstants.PREFIX_GROUP_URL+selectedVRE.getFriendlyURL();
|
||||
VRECustomAttributes attrs = getVRECustomAttr(selectedVRE);
|
||||
|
|
Loading…
Reference in New Issue