From 95968f729d68c6543d7df5e123231a9f835020a3 Mon Sep 17 00:00:00 2001 From: "massimiliano.assante" Date: Tue, 8 Oct 2013 21:50:40 +0000 Subject: [PATCH] pom fixes git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gcube-loggedin@82737 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 19 ------- .../server/LoggedinServiceImpl.java | 50 ------------------- 2 files changed, 69 deletions(-) diff --git a/pom.xml b/pom.xml index 2371453..a9e0f5e 100644 --- a/pom.xml +++ b/pom.xml @@ -101,25 +101,6 @@ org.slf4j slf4j-api - - junit - junit - 4.7 - provided - - - javax.validation - validation-api - 1.0.0.GA - test - - - javax.validation - validation-api - 1.0.0.GA - sources - test - diff --git a/src/main/java/org/gcube/portlets/user/gcubeloggedin/server/LoggedinServiceImpl.java b/src/main/java/org/gcube/portlets/user/gcubeloggedin/server/LoggedinServiceImpl.java index 5032cf2..b317abb 100644 --- a/src/main/java/org/gcube/portlets/user/gcubeloggedin/server/LoggedinServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/gcubeloggedin/server/LoggedinServiceImpl.java @@ -95,59 +95,9 @@ public class LoggedinServiceImpl extends RemoteServiceServlet implements Loggedi if (currOrg.getComments() != null) desc = currOrg.getComments(); VREClient vre = new VREClient(name, "", desc, logoURL, "", UserBelongingClient.BELONGING); - setVREBelonginApplication(vre); return vre; } - - /** - * recursive method which list the portlets belonging to the current VO/VRE whole layout - * - * @param layouts - * @param themeDisplay - * @param belongingPortletNames - * @throws SystemException - */ - private void findLayoutPortlets(List layouts, ThemeDisplay themeDisplay, List belongingPortletNames ) throws SystemException { - if (layouts == null) - return; - for (Layout curLayout : layouts) { - LayoutTypePortlet layoutTypePortlet = (LayoutTypePortlet)curLayout.getLayoutType(); - List actualPortletList = layoutTypePortlet.getPortletIds(); - for (String portletID : actualPortletList) { - String pname = LanguageUtil.get(themeDisplay.getLocale(), portletID); - //adding the portlet name cutting the not need part e.g. WorkspacePortlet_WAR_WorkspacePortlet - if (pname.indexOf("WAR") > 0) { - pname = pname.substring(0, pname.indexOf("WAR")-1); - } - belongingPortletNames.add(pname); - } - findLayoutPortlets(curLayout.getChildren(), themeDisplay, belongingPortletNames); - } - } - - /** - * TODO: Look which portlets are in the current VRE layout and create a List of names with them - * @param vre - */ - private void setVREBelonginApplication(VREClient vre) { - - List belongingPortletNames = new ArrayList(); - ThemeDisplay themeDisplay = (ThemeDisplay) this.getThreadLocalRequest().getSession().getAttribute(WebKeys.THEME_DISPLAY); - - _log.debug("Reading Layouts..."); - - List layouts = themeDisplay.getLayouts(); - try { - findLayoutPortlets(layouts, themeDisplay, belongingPortletNames); - } catch (SystemException e) { - e.printStackTrace(); - } - Collections.sort(belongingPortletNames); - _log.debug("AvailablePortlets STORE IN SESSION \n" + belongingPortletNames.toString()); - getASLSession().setAttribute("availablePortlets", belongingPortletNames); - } - /** * The Default Community is a community where all portal user belong to * @return the default community URL