Novell exteNd
Director 5.2 API

com.novell.afw.portal.api
Interface EbiPortalAggregationController

All Known Implementing Classes:
EboPortalAggregationController

public interface EbiPortalAggregationController

interface to define the contract of a Portal Controller (responsible for rendering a response to a portal request)

Since:
v.5.0

Field Summary
static String AGGREGATION_CONTROLLER
          well known key to access the implementation class of this interface in the Portal Service's service.xml
static String DEFAULT_REQUEST_TIMEOUT
          well known key to access the default request timeout (this timeout can be overwritten by portlet definitions) in the Portal Service's config.xml
static String FORCE_RENDER_TIMEOUT
          well known key to access the config file to find out if aggregation controller should enforce return from a portlet render call.
static String FORCE_SERIAL_SYNCH_RENDER
          well known key to access the config file to find out if agregation controller should enforce serial rendering synchronous portlets.
static String MAX_REQUEST_TIMEOUT
          well known key to access the max request timeout (no request is allowed to take longer) in the Portal Service's config.xml
static String PARALLEL_RENDERING_ENABLED
          well known key to access the config file to find out if parallel rendering of asynchronous portlets should be enabled.
static String REDIRECT_AFTER_REQUEST
          well known key to access the config file to find out if the request should be redirected after a render and/or action request; the redirect will remove the query string from the URL and force a GET for the next browser request (no accidental double posting) in the Portal Service's config.xml
 
Method Summary
 void assimilatePortletResponse(EbiPortalContext portalContext, com.novell.afw.portal.api.EbiPortletInfoBean portletInfo, Object portletDataReceiver, HashMap styleMap, EbiMarkupResponse markupResponse)
          Assimilate the portal markup fragment into the response.
 long getDefaultRequestTimeout()
          get the default timeout for a request (independent of any portlet that will be rendered)
 boolean getForceRenderTimeout()
          Returns true if aggregation controller should enforce return from a portlet render call.
 boolean getForceSerialSynchRender()
          Returns true if synchronous portlets should be rendered serially(sequentially) before asynchronous portlet rendering can be started.
 long getMaxRequestTimeout()
          get the max timeout for a request (independent of any portlet that will be rendered)
 boolean getParallelRenderEnabled()
          Returns true if aparallel rendering of asynchronous portlets is enabled.
 String getTimeoutResponse(com.novell.afw.portal.api.EbiPortletInfoBean portlet, Locale locale)
          get the default content (markup fragment) for a portlet in case the request is timing out and we need to provide some default content
 void init(Map params)
          initialization hook
 void renderPortalPIDResponse(EbiPortalContext portalContext, EbiPortalPID portalPID)
          Render a particular portal PID page object
 void renderPortalPIDResponse(EbiPortalContext portalContext, String pid)
          Render a particular portal PID page (from the resource set)
 void renderPortalResponse(EbiPortalContext portalContext)
          render a portal response based on a request to the current portal state (the current container and shared/user page) This is the main entry point (for each portal request) to render a response defined by the current container page, user or shared page and the portlets defined on those pages
 void renderPortalResponse(EbiPortalContext portalContext, String portletName)
          Render a particular portlet (only that portlet) in a dynamically created default page Note that whenever there is a default page used to embed portlets, only default preferences can be applied since there is no page specific instance id of the portlet
 void renderPortalResponse(EbiPortalContext portalContext, String[] portlets)
          Render a given list of portlets (they don't have to be defined in a page) on a default page Note that whenever there is a default page used to embed portlets, only default preferences can be applied
 void renderPortalResponse(EbiPortalContext portalContext, String pageName, boolean wrapContainer)
          Render only the specified page (user or shared) in side the current (or default) container if wrapContainer is true otherwise render the page without the container wrapping it
 void renderPortalResponse(EbiPortalContext portalContext, String containerName, String pageName)
          Render the portal response with a specified container page, and optionally a specified user or shared page
 void setDefaultRequestTimeout(long timeout)
          set the default timeout for a request (independent of any portlet that will be rendered)
 void setForceRenderTimeout(boolean force)
          Sets flag which defines render call timeout configuration.
 void setForceSerialSynchRender(boolean flag)
          Sets flag to render synchronous portlets serially before asynchronous portlet rendering can be started.
 void setMaxRequestTimeout(long timeout)
          set the maximum timeout for a request (independent of any portlet that will be rendered)
 void setParallelRenderEnabled(boolean enable)
          if asynchronous portlets should be called in a separate thread always (so that the calling thread won't have a chance to block indefinitely) set this to false As a result, all asynchronous portlets will be called in a pooled thread
 void shutdown()
          shutdown hook time for clean up if need be
 void stylePortalResponse(EbiPortalContext portalContext, com.novell.afw.portal.api.Node responseRoot, Map styleMap)
          a render request has finished and the response is available in form of an xml document; now go and style the response by applying the xsl style sheet for the container page, the user or shared page, and the individual styles for the portlets (if not yet applied after each portlets render individually) Note: by default, all portlets will be styled individually after each of the render methods returs; only if the request attribute EboPortalAggregationConstants.PARAM_STYLE_ONCE is present will the content of each portlet be present as XML in the document and the style sheet URL in the #styleMap the styleMap contains the portlet's style sheet URLs, keyed by com.novell.afw.portal.api.EboPortletInfoBean; it also contains the style sheet URLs for the container and user (or shared) page if the page has an associated style; these two map entries are keyed by a String EboPortalAggregationConstants.ATTR_CONTAINER_STYLE_ID and EboPortalAggregationConstants.ATTR_PAGE_STYLE_ID This method is expected to handle writing the response to the browser
 

Field Detail

AGGREGATION_CONTROLLER

public static final String AGGREGATION_CONTROLLER
well known key to access the implementation class of this interface in the Portal Service's service.xml
Since:
v.5.0

DEFAULT_REQUEST_TIMEOUT

public static final String DEFAULT_REQUEST_TIMEOUT
well known key to access the default request timeout (this timeout can be overwritten by portlet definitions) in the Portal Service's config.xml
Since:
v.5.0

MAX_REQUEST_TIMEOUT

public static final String MAX_REQUEST_TIMEOUT
well known key to access the max request timeout (no request is allowed to take longer) in the Portal Service's config.xml
Since:
v.5.0

PARALLEL_RENDERING_ENABLED

public static final String PARALLEL_RENDERING_ENABLED
well known key to access the config file to find out if parallel rendering of asynchronous portlets should be enabled. If not specified defaults to false, renders all asynchronous portlets sequentially.
Since:
v.5.2

FORCE_SERIAL_SYNCH_RENDER

public static final String FORCE_SERIAL_SYNCH_RENDER
well known key to access the config file to find out if agregation controller should enforce serial rendering synchronous portlets. If not specified defaults to false, renders all synchronous portlets sequentially at the same time as asynchronous portlets.
Since:
v.5.2

FORCE_RENDER_TIMEOUT

public static final String FORCE_RENDER_TIMEOUT
well known key to access the config file to find out if aggregation controller should enforce return from a portlet render call. When set to true : - parallel rendering of asynchronous portlets always in a separate thread - rendering of a synchronous portlets sequentially in a separate thread Defaults to false, when undefined: - renders synchronous portlets in the main request thread sequentially, - attempts to render asynchronous portlets in a separate thread, if no thread is available process render request in a main request thread
Since:
v.5.2

REDIRECT_AFTER_REQUEST

public static final String REDIRECT_AFTER_REQUEST
well known key to access the config file to find out if the request should be redirected after a render and/or action request; the redirect will remove the query string from the URL and force a GET for the next browser request (no accidental double posting) in the Portal Service's config.xml
Since:
v.5.0
Method Detail

getDefaultRequestTimeout

public long getDefaultRequestTimeout()
get the default timeout for a request (independent of any portlet that will be rendered)
Returns:
the timeout for the request in ms
Since:
v.5.0

setDefaultRequestTimeout

public void setDefaultRequestTimeout(long timeout)
set the default timeout for a request (independent of any portlet that will be rendered)
Parameters:
timeout - the timeout value in ms
Since:
v.5.0

getMaxRequestTimeout

public long getMaxRequestTimeout()
get the max timeout for a request (independent of any portlet that will be rendered)
Returns:
the maximum timeout for the request in ms
Since:
v.5.0

setMaxRequestTimeout

public void setMaxRequestTimeout(long timeout)
set the maximum timeout for a request (independent of any portlet that will be rendered)
Parameters:
timeout - the timeout value in ms
Since:
v.5.0

getTimeoutResponse

public String getTimeoutResponse(com.novell.afw.portal.api.EbiPortletInfoBean portlet,
                                 Locale locale)
get the default content (markup fragment) for a portlet in case the request is timing out and we need to provide some default content
Parameters:
portlet - a EboPortletInfoBean (or null) to decide what response to return (this bean is created during the render process and allows access to portlet name , instance id, etc. (); if this bean is provided, a timeout message specific to this portlet can be returned.
locale - the locale based on the current request to allow for localized timeout messages
Returns:
the default response as type 'Object'
Since:
v.5.0
See Also:
EbiPortletInfoBean

getForceRenderTimeout

public boolean getForceRenderTimeout()
Returns true if aggregation controller should enforce return from a portlet render call. True means: - parallel rendering of asynchronous portlets always in a separate thread - rendering of a synchronous portlets sequentially in a separate thread Defaults to false, when undefined: - renders synchronous portlets in the main request thread sequentially, - attempts to render asynchronous portlets in a separate thread, if no thread is available process render request in a main request thread
Since:
v.5.1

setForceRenderTimeout

public void setForceRenderTimeout(boolean force)
Sets flag which defines render call timeout configuration. True means: - parallel rendering of asynchronous portlets always in a separate thread - rendering of a synchronous portlets sequentially in a separate thread Defaults to false, when undefined: - renders synchronous portlets in the main request thread sequentially, - attempts to render asynchronous portlets in a separate thread, if no thread is available process render request in a main request thread
Since:
v.5.1

getForceSerialSynchRender

public boolean getForceSerialSynchRender()
Returns true if synchronous portlets should be rendered serially(sequentially) before asynchronous portlet rendering can be started.
Since:
v.5.1

setForceSerialSynchRender

public void setForceSerialSynchRender(boolean flag)
Sets flag to render synchronous portlets serially before asynchronous portlet rendering can be started.
Since:
v.5.1

getParallelRenderEnabled

public boolean getParallelRenderEnabled()
Returns true if aparallel rendering of asynchronous portlets is enabled.
Since:
v.5.1

setParallelRenderEnabled

public void setParallelRenderEnabled(boolean enable)
if asynchronous portlets should be called in a separate thread always (so that the calling thread won't have a chance to block indefinitely) set this to false As a result, all asynchronous portlets will be called in a pooled thread
Parameters:
enable - true if asynchronous portlets should be rendered in parallel
Since:
v.5.1

renderPortalResponse

public void renderPortalResponse(EbiPortalContext portalContext)
                          throws EboPortletActionException
render a portal response based on a request to the current portal state (the current container and shared/user page) This is the main entry point (for each portal request) to render a response defined by the current container page, user or shared page and the portlets defined on those pages
Parameters:
portalContext - the EbiPortalContext that contains the information to get access to the portal, the request, the response, ...
Since:
v.5.0

renderPortalResponse

public void renderPortalResponse(EbiPortalContext portalContext,
                                 String portletName)
                          throws EboPortletActionException
Render a particular portlet (only that portlet) in a dynamically created default page Note that whenever there is a default page used to embed portlets, only default preferences can be applied since there is no page specific instance id of the portlet
Parameters:
portalContext - the EbiPortalContext that contains the information to get to the portal, the request, the response, ...
portletName - the name of the single portlet that has to be rendered
Since:
v.5.0

renderPortalResponse

public void renderPortalResponse(EbiPortalContext portalContext,
                                 String containerName,
                                 String pageName)
                          throws EboPortletActionException
Render the portal response with a specified container page, and optionally a specified user or shared page
Parameters:
portalContext - the EbiPortalContext that contains the information to get access to the portal, the request, the response, ...
containerName - the name of the container page
pageName - the name of the shared or user page , or null
Since:
v.5.0

renderPortalResponse

public void renderPortalResponse(EbiPortalContext portalContext,
                                 String pageName,
                                 boolean wrapContainer)
                          throws EboPortletActionException
Render only the specified page (user or shared) in side the current (or default) container if wrapContainer is true otherwise render the page without the container wrapping it
Parameters:
portalContext - the EbiPortalContext that contains the information to get access to the portal, the request, the response, ...
pageName - the name of the page to render
wrapContainer - true if the page should be wrapped with the current (or default) container, false if the page should not be wrapped
Since:
v.5.0

renderPortalResponse

public void renderPortalResponse(EbiPortalContext portalContext,
                                 String[] portlets)
                          throws EboPortletActionException
Render a given list of portlets (they don't have to be defined in a page) on a default page Note that whenever there is a default page used to embed portlets, only default preferences can be applied
Parameters:
portalContext - the EbiPortalContext that contains the information to get access to the portal, the request, the response, ...
portlets - the list of portlet names to render (as a string array)
Since:
v.5.0

renderPortalPIDResponse

public void renderPortalPIDResponse(EbiPortalContext portalContext,
                                    String pid)
                             throws EboPortletActionException
Render a particular portal PID page (from the resource set)
Parameters:
portalContext - the EbiPortalContext that contains the information to get to the portal, the request, the response, ...
pid - the name of the portal PID page from the resource set (e.g. DirectorHome.html)
Since:
v.5.0

renderPortalPIDResponse

public void renderPortalPIDResponse(EbiPortalContext portalContext,
                                    EbiPortalPID portalPID)
                             throws EboPortletActionException
Render a particular portal PID page object
Parameters:
portalContext - the EbiPortalContext that contains the information to get to the portal, the request, the response, ...
portalPID - the parsed portal PID page in the form of a EbiPortalPID object
Since:
v.5.0
See Also:
com.sssw.portal.api.EbiPageManager.getPID(EbiPortalContext, String)

assimilatePortletResponse

public void assimilatePortletResponse(EbiPortalContext portalContext,
                                      com.novell.afw.portal.api.EbiPortletInfoBean portletInfo,
                                      Object portletDataReceiver,
                                      HashMap styleMap,
                                      EbiMarkupResponse markupResponse)
Assimilate the portal markup fragment into the response. This is called when a worker thread (or the main thread) has finished working on a portal response. Now take the rendered result and add it into the response content (under the designated portletDataReceiver object)
Parameters:
portalContext - the EbiPortalContext that contains the information to get to the portal, the request, the response, ...
portletInfo - the EbiPortletInfoBean that identifies the portlet that has been rendered
portletDataReceiver - the object that serves as a place holder for the resulting content (in the default implementation this is the node object in the result document that will hold the markup fragment as a CDATA child node)
styleMap - a Map keyed by PortletInfoBeans that allows access to the style sheet URL for that portlet; this map is being filled during each portlets render process
markupResponse - the rendered content created by the portlet
Since:
v.5.0

shutdown

public void shutdown()
shutdown hook time for clean up if need be
Since:
v.5.0

init

public void init(Map params)
initialization hook
Parameters:
params - your params as a Map
Since:
v.5.0

stylePortalResponse

public void stylePortalResponse(EbiPortalContext portalContext,
                                com.novell.afw.portal.api.Node responseRoot,
                                Map styleMap)
                         throws com.novell.afw.portal.api.IOException
a render request has finished and the response is available in form of an xml document; now go and style the response by applying the xsl style sheet for the container page, the user or shared page, and the individual styles for the portlets (if not yet applied after each portlets render individually) Note: by default, all portlets will be styled individually after each of the render methods returs; only if the request attribute EboPortalAggregationConstants.PARAM_STYLE_ONCE is present will the content of each portlet be present as XML in the document and the style sheet URL in the #styleMap the styleMap contains the portlet's style sheet URLs, keyed by com.novell.afw.portal.api.EboPortletInfoBean; it also contains the style sheet URLs for the container and user (or shared) page if the page has an associated style; these two map entries are keyed by a String EboPortalAggregationConstants.ATTR_CONTAINER_STYLE_ID and EboPortalAggregationConstants.ATTR_PAGE_STYLE_ID This method is expected to handle writing the response to the browser
Parameters:
portalContext - the EbiPortalContext to gain access to the request and response etc.
responseRoot - the root node of the response content document that was assembled during the render process
styleMap - a map containing the URLs for the styles keyed by EboPortletInfoBean's (and optionally String for the page styles)
Throws:
com.novell.afw.portal.api.IOException -  
Since:
v.5.2

Novell exteNd
Director 5.2 API