Author: hoang_to
Date: 2010-05-13 03:19:55 -0400 (Thu, 13 May 2010)
New Revision: 3074
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
Log:
Convert the nested class ParentChildPair into top level class, refactor relevant code
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2010-05-13
07:06:06 UTC (rev 3073)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2010-05-13
07:19:55 UTC (rev 3074)
@@ -406,8 +406,8 @@
{
int firstNavPriority = firstNav.getPriority();
int secondNavPriority = secondNav.getPriority();
-
- if(firstNavPriority == secondNavPriority)
+
+ if (firstNavPriority == secondNavPriority)
{
String firstNavId = firstNav.getOwnerId();
String secondNavId = secondNav.getOwnerId();
@@ -415,7 +415,7 @@
}
else
{
- if(firstNavPriority < secondNavPriority)
+ if (firstNavPriority < secondNavPriority)
{
return -1;
}
@@ -425,44 +425,5 @@
}
}
}
- }
-
- /**
- *
- * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang
TO</a>
- * @version $Id$
- *
- */
- public static class ParentChildPair
- {
- private PageNode parentNode;
-
- private PageNode childNode;
-
- public ParentChildPair(PageNode _parentNode, PageNode _childNode)
- {
- this.parentNode = _parentNode;
- this.childNode = _childNode;
- }
-
- public PageNode getParentNode()
- {
- return parentNode;
- }
-
- public PageNode getChildNode()
- {
- return childNode;
- }
-
- public void setParentNode(PageNode _parentNode)
- {
- this.parentNode = _parentNode;
- }
-
- public void setChildNode(PageNode _childNode)
- {
- this.childNode = _childNode;
- }
- }
+ }
}
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-05-13
07:06:06 UTC (rev 3073)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-05-13
07:19:55 UTC (rev 3074)
@@ -26,7 +26,7 @@
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.Visibility;
-import org.exoplatform.portal.webui.navigation.PageNavigationUtils.ParentChildPair;
+import org.exoplatform.portal.webui.navigation.ParentChildPair;
import org.exoplatform.portal.webui.page.UIPage;
import org.exoplatform.portal.webui.page.UIPageNodeForm2;
import org.exoplatform.portal.webui.portal.UIPortalComposer;
Show replies by date