站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

RenderPageCommand - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.core.controller.command
Class RenderPageCommand

java.lang.Object
  extended byorg.jboss.portal.common.invocation.Invocation
      extended byorg.jboss.portal.core.controller.ControllerCommand
          extended byorg.jboss.portal.core.controller.command.PortalObjectCommand
              extended byorg.jboss.portal.core.controller.command.PageCommand
                  extended byorg.jboss.portal.core.controller.command.RenderPageCommand

public final class RenderPageCommand
extends PageCommand

Render a full page.

Version:
$Revision: 5477 $
Author:
Julien Viet

Field Summary
private static java.lang.String HIDE
          .
private static CommandInfo info
          .
private  PortalLayout layout
          .
private  boolean personalizable
          .
private static java.lang.String SHOW
          .
private static java.lang.String WINDOW_ACCESS_DENIED
          .
private static java.lang.String WINDOW_ERROR
          .
private static java.lang.String WINDOW_INTERNAL_ERROR
          .
private static java.lang.String WINDOW_NOT_FOUND
          .
private static java.lang.String WINDOW_UNAVAILABLE
          .
private  java.util.Collection windows
          The windows to render.
 
Fields inherited from class org.jboss.portal.core.controller.command.PageCommand
page, portal
 
Fields inherited from class org.jboss.portal.core.controller.command.PortalObjectCommand
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(java.lang.String pageId)
           
 
Method Summary
private  void addModeActions(Window window, java.util.Map actionMap, Mode currentMode, java.util.List supportedModes)
          Create the action URLs for the allowed portlet modes of the rendered portlet window and add them to the provided actionMap.
private  void addStateActions(Window window, java.util.Map actionMap, WindowState currentWindowState, java.util.List supportedWindowStates)
          Create the action URLs for the allowed window states of the rendered portlet window and add them to the provided actionMap.
 void create()
          initialize the command
 java.lang.String createUpdateNavigationalStateURL(Window window, Mode mode, WindowState windowState)
           
 void enforceSecurity(PortalAuthorizationManager pam)
          Enforce the security on this command using the provided portal authorization manager.
 java.lang.Object execute()
          execute the command
 CommandInfo getInfo()
          Get the command info (runtime info about the command)
 PortalLayout getLayout()
          Get the layout that was determined for this request (based on portal and page properties)
static PortalLayout getLayout(LayoutService layoutService, Page page)
          Get the portal layout to use for the provided page.
private  PortalTheme getTheme(java.lang.String themeIdString)
           
 java.util.Collection getWindows()
          Returns the modifiable list of windows.
private static java.lang.String[] parseID(java.lang.String layoutIDString)
          parse the provided String for '.' as a separator.
private  ModifiablePageResult renderFragments(ServerConfig cfg, AttributeResolver navCtx)
          Call the component invocation(s) to create the markup fragment(s) for this request Call the component / portlet invocation for each window on the page, and create a markup result with the resulting markup fragments in it
protected  MarkupResult renderPortletWindow(ServerConfig cfg, Window window)
          Call the component container to render the markup fragment of a window
 
Methods inherited from class org.jboss.portal.core.controller.command.PageCommand
getPage
 
Methods inherited from class org.jboss.portal.core.controller.command.PortalObjectCommand
getTarget, getTargetId, isDashboard
 
Methods inherited from class org.jboss.portal.core.controller.ControllerCommand
createContext, destroy, destroyContext, getContext, getControllerContext, 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
 

Field Detail

WINDOW_ACCESS_DENIED

private static java.lang.String WINDOW_ACCESS_DENIED
.


WINDOW_UNAVAILABLE

private static java.lang.String WINDOW_UNAVAILABLE
.


WINDOW_ERROR

private static java.lang.String WINDOW_ERROR
.


WINDOW_INTERNAL_ERROR

private static java.lang.String WINDOW_INTERNAL_ERROR
.


WINDOW_NOT_FOUND

private static java.lang.String WINDOW_NOT_FOUND
.


HIDE

private static java.lang.String HIDE
.


SHOW

private static java.lang.String SHOW
.


info

private static final CommandInfo info
.


windows

private java.util.Collection windows
The windows to render.


layout

private PortalLayout layout
.


personalizable

private boolean personalizable
.

Constructor Detail

RenderPageCommand

public RenderPageCommand(java.lang.String 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

getLayout

public PortalLayout getLayout()
Get the layout that was determined for this request (based on portal and page properties)

Returns:
the layout to use for this request

getWindows

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

Returns:
the windows on the page

create

public void create()
            throws ControllerException
initialize the command

Overrides:
create in class PageCommand
Throws:
InvocationException
ControllerException

enforceSecurity

public void enforceSecurity(PortalAuthorizationManager pam)
                     throws ControllerSecurityException,
                            PortalSecurityException
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:
ControllerSecurityException - if the access is not granted
PortalSecurityException

execute

public java.lang.Object execute()
                         throws ControllerException,
                                InvocationException
execute the command

Specified by:
execute in class ControllerCommand
Throws:
InvocationException
ControllerException

renderFragments

private ModifiablePageResult renderFragments(ServerConfig cfg,
                                             AttributeResolver navCtx)
                                      throws ControllerException
Call the component invocation(s) to create the markup fragment(s) for this request Call the component / portlet invocation for each window on the page, and create a markup result with the resulting markup fragments in it

Parameters:
cfg - the server configuration to get access to customizable error behaviour
navCtx - the navigational state context to access page and window navigational state
Returns:
a modifiable page result containing the markup fragments from the individual portlets on this page
Throws:
InvocationException
ControllerException

getTheme

private PortalTheme getTheme(java.lang.String themeIdString)

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

renderPortletWindow

protected MarkupResult renderPortletWindow(ServerConfig cfg,
                                           Window window)
                                    throws ControllerException
Call the component container to render the markup fragment of a window

Parameters:
cfg - the server config to get information about the error behaviour
window - the window to render
Returns:
a result containing markup, or other result information (redirect url, etc.)
Throws:
InvocationException
ControllerException

parseID

private static java.lang.String[] parseID(java.lang.String layoutIDString)
parse the provided String for '.' as a separator. For each token, add an entry to a String[] that will be returned as the result

Parameters:
layoutIDString - the string to be examined
Returns:
an array of Strings

addStateActions

private void addStateActions(Window window,
                             java.util.Map actionMap,
                             WindowState currentWindowState,
                             java.util.List supportedWindowStates)
Create the action URLs for the allowed window states of the rendered portlet window and add them to the provided actionMap.


addModeActions

private void addModeActions(Window window,
                            java.util.Map actionMap,
                            Mode currentMode,
                            java.util.List supportedModes)
Create the action URLs for the allowed portlet modes of the rendered portlet window and add them to the provided actionMap.


createUpdateNavigationalStateURL

public java.lang.String createUpdateNavigationalStateURL(Window window,
                                                         Mode mode,
                                                         WindowState windowState)