Author: hoang_to
Date: 2011-05-26 22:16:32 -0400 (Thu, 26 May 2011)
New Revision: 6570
Modified:
portal/branches/stax-integration/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
Log:
GTNPORTAL-1905: Integrate Stax for PageNavigation object
Modified:
portal/branches/stax-integration/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
===================================================================
---
portal/branches/stax-integration/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-05-26
20:54:46 UTC (rev 6569)
+++
portal/branches/stax-integration/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-05-27
02:16:32 UTC (rev 6570)
@@ -32,6 +32,7 @@
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.Page.PageSet;
+import org.exoplatform.portal.config.stax.PageNavigationStAXParser;
import org.exoplatform.portal.config.stax.PageSetStAXParser;
import org.exoplatform.portal.config.stax.PageStAXParser;
import org.exoplatform.portal.config.stax.StAXElement;
@@ -416,11 +417,24 @@
public void createPageNavigation(NewPortalConfig config, String owner) throws
Exception
{
- PageNavigation navigation = getConfig(config, owner, "navigation",
PageNavigation.class);
- if (navigation == null)
+ //PageNavigation navigation = getConfig(config, owner, "navigation",
PageNavigation.class);
+ StaxNavigator<StAXElement> staxNavigator = buildStAXNavigator(config, owner,
"navigation.xml");
+ if (staxNavigator == null)
{
return;
}
+
+ PageNavigation navigation = new
PageNavigationStAXParser(staxNavigator).parseXML();
+ if(navigation.getOwnerType() == null)
+ {
+ navigation.setOwnerType(config.getOwnerType());
+ }
+
+ if(navigation.getOwnerId() == null)
+ {
+ navigation.setOwnerId(owner);
+ }
+
PageNavigation currentNavigation =
dataStorage_.getPageNavigation(navigation.getOwner());
if (currentNavigation == null)
{
Show replies by date