org.jboss.portal.core.model.portal.command.render
Class RenderPageCommand

java.lang.Object
  extended by org.jboss.portal.common.invocation.Invocation
      extended by org.jboss.portal.core.controller.ControllerCommand
          extended by org.jboss.portal.core.model.portal.command.PortalObjectCommand
              extended by org.jboss.portal.core.model.portal.command.PortalCommand
                  extended by org.jboss.portal.core.model.portal.command.PageCommand
                      extended by org.jboss.portal.core.model.portal.command.render.RenderPageCommand

public final class RenderPageCommand
extends PageCommand

Render a full page.

Version:
$Revision: 6942 $
Author:
Julien Viet

Field Summary
 
Fields inherited from class org.jboss.portal.core.model.portal.command.PageCommand
page
 
Fields inherited from class org.jboss.portal.core.model.portal.command.PortalCommand
portal
 
Fields inherited from class org.jboss.portal.core.model.portal.command.PortalObjectCommand
dashboard, target, targetId
 
Fields inherited from class org.jboss.portal.core.controller.ControllerCommand
context, log, NAVIGATIONAL_STATE_SCOPE, PRINCIPAL_SCOPE, REQUEST_SCOPE, SESSION_SCOPE
 
Fields inherited from class org.jboss.portal.common.invocation.Invocation
EMPTY_STACK
 
Constructor Summary
RenderPageCommand(PortalObjectId pageId)
           
 
Method Summary
 void acquireResources()
           
 void enforceSecurity(PortalAuthorizationManager pam)
          Enforce the security on this command using the provided portal authorization manager.
 ControllerResponse execute()
          execute the command
 CommandInfo getInfo()
          Get the command info (runtime info about the command)
static PortalLayout getLayout(LayoutService layoutService, Page page)
          Get the portal layout to use for the provided page.
 java.util.Collection getWindows()
          Returns the modifiable list of windows.
protected  Page initPage()
           
 
Methods inherited from class org.jboss.portal.core.model.portal.command.PageCommand
getPage, initPortal
 
Methods inherited from class org.jboss.portal.core.model.portal.command.PortalCommand
getPortal
 
Methods inherited from class org.jboss.portal.core.model.portal.command.PortalObjectCommand
getTarget, getTargetId, isDashboard
 
Methods inherited from class org.jboss.portal.core.controller.ControllerCommand
create, createContext, destroy, destroyContext, getContext, getControllerContext, releaseResources, rethrow
 
Methods inherited from class org.jboss.portal.common.invocation.Invocation
getAttribute, getHandler, invoke, invokeNext, removeAttribute, setAttribute, setHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderPageCommand

public RenderPageCommand(PortalObjectId pageId)
Method Detail

getInfo

public CommandInfo getInfo()
Get the command info (runtime info about the command)

Specified by:
getInfo in class ControllerCommand
Returns:
info about the command

getWindows

public java.util.Collection getWindows()
Returns the modifiable list of windows.

Returns:
the windows on the page

acquireResources

public void acquireResources()
                      throws NoSuchResourceException
Overrides:
acquireResources in class PortalCommand
Throws:
NoSuchResourceException

initPage

protected Page initPage()
Specified by:
initPage in class PageCommand

enforceSecurity

public void enforceSecurity(PortalAuthorizationManager pam)
                     throws SecurityException
Description copied from class: PortalObjectCommand
Enforce the security on this command using the provided portal authorization manager.

Overrides:
enforceSecurity in class PortalObjectCommand
Parameters:
pam - the portal authorization manager
Throws:
SecurityException

execute

public ControllerResponse execute()
                           throws ControllerException,
                                  InvocationException
execute the command

Specified by:
execute in class ControllerCommand
Throws:
InvocationException
ControllerException

getLayout

public static PortalLayout getLayout(LayoutService layoutService,
                                     Page page)
Get the portal layout to use for the provided page.

The name of the layout to use can be defined as a property in the portal, or the individual page. The page property overwrites the portal property. If no property was set, a default layout with the name "nodesk" is assumed.

Parameters:
layoutService - the layout service that allows access to the layout
page - the page that hosts the markup container to render (the page, region, window,...)
Returns:
a PortalLayout for the defined layout name