Author: julien(a)jboss.com
Date: 2007-04-25 15:50:57 -0400 (Wed, 25 Apr 2007)
New Revision: 7055
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java
Log:
handle Layout on RenderPageCommand the same way that Theme is handled, makes core more
compact and symetric
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java 2007-04-25
19:42:25 UTC (rev 7054)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java 2007-04-25
19:50:57 UTC (rev 7055)
@@ -74,9 +74,6 @@
private Collection windows;
/** . */
- private PortalLayout layout;
-
- /** . */
private boolean personalizable;
public RenderPageCommand(PortalObjectId pageId)
@@ -95,16 +92,6 @@
}
/**
- * Get the layout that was determined for this request (based on portal and page
properties)
- *
- * @return the layout to use for this request
- */
- public PortalLayout getLayout()
- {
- return layout;
- }
-
- /**
* Returns the modifiable list of windows.
*
* @return the windows on the page
@@ -125,10 +112,6 @@
// All windows on the page
windows = new ArrayList(getPage().getChildren(PortalObject.WINDOW_MASK));
-
- //
- LayoutService layoutService =
context.getController().getPageService().getLayoutService();
- layout = getLayout(layoutService, page);
}
public void enforceSecurity(PortalAuthorizationManager pam) throws
ControllerSecurityException, PortalSecurityException
@@ -154,11 +137,15 @@
//
PageService pageService = context.getController().getPageService();
ThemeService themeService = pageService.getThemeService();
+ LayoutService layoutService = pageService.getLayoutService();
+ //
+ PortalLayout layout = getLayout(layoutService, page);
+
// The theme for the page
PortalTheme theme = null;
- //
+ // Determine theme
if (personalizable)
{
ControllerContext controllerCtx = (ControllerContext)getContext();
@@ -186,10 +173,9 @@
}
}
}
-
- // If nothing get it from the object properties
if (theme == null)
{
+ // If nothing get it from the object properties
String themeId = page.getProperty(ThemeConstants.PORTAL_PROP_THEME);
theme = themeService.getThemeById(themeId);
}