Author: hoang_to
Date: 2009-11-13 03:07:15 -0500 (Fri, 13 Nov 2009)
New Revision: 587
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIAddGroupNavigation.java
Log:
GTNPORTAL-196: Refactor the code in UIAddGroupNavigation
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java 2009-11-13
07:48:27 UTC (rev 586)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java 2009-11-13
08:07:15 UTC (rev 587)
@@ -530,13 +530,13 @@
}
/**
- * Returns the list of group ids that do not have an existing navigation.
+ * Returns the list of group ids having navigation.
*
- * @return the group id with no navigation
+ * @return the group id having navigation
* @throws Exception
* any exception
*/
- public Set<String> findGroupWithoutNavigation() throws Exception
+ public Set<String> findGroupHavingNavigation() throws Exception
{
Query<PageNavigation> query = new
Query<PageNavigation>(PortalConfig.GROUP_TYPE, null, PageNavigation.class);
Set<String> groupIds = new HashSet<String>();
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIAddGroupNavigation.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIAddGroupNavigation.java 2009-11-13
07:48:27 UTC (rev 586)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIAddGroupNavigation.java 2009-11-13
08:07:15 UTC (rev 587)
@@ -108,8 +108,8 @@
}
UserPortalConfigService configService =
getApplicationComponent(UserPortalConfigService.class);
- Set<String> groupIdsWithNotNavigation =
configService.findGroupWithoutNavigation();
- listGroup.removeAll(groupIdsWithNotNavigation);
+ Set<String> groupIdsHavingNavigation =
configService.findGroupHavingNavigation();
+ listGroup.removeAll(groupIdsHavingNavigation);
UIVirtualList virtualList = getChild(UIVirtualList.class);
virtualList.dataBind(new ObjectPageList<String>(listGroup,
listGroup.size()));
Show replies by date