Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

oracle.portal.provider.v2.render
Class RenderContext

java.lang.Object
  extended by oracle.portal.provider.v2.render.RenderContext

public class RenderContext
extends java.lang.Object

A RenderContext is used to describe to a PortletInstance the context in which it is to be renderered. As well as possessing a set of 'bean-like' properties, it has a table of attributes (returned by getAttributes) that can be used to pass environment-specific parameters into the portlet instance. For example, in a servlet environment, the attribute table might store the servlet request and response.


Constructor Summary
RenderContext(int renderMode, java.lang.String pageURL, java.lang.String designURL, java.lang.String backURL, java.lang.String loginURL, java.lang.String portletRefreshURL, boolean hasTitle, boolean hasBorder, boolean showDetails, boolean showEdit, boolean showHelp, boolean showAbout, boolean showRemove, boolean showCollapse, boolean showRefresh, boolean isRefreshEnabled, boolean isCollapsed, boolean isRewriteUrls, java.lang.String portletTemplate, DeviceInfo deviceInfo, PortalConfig portalConfig, java.util.Map attributes, int WCMaxExpiryTime, java.lang.String portletPageReference, java.lang.String eventURL, PerfMonitor perfMonitor, int height, boolean isResourceProxyAvailable, java.lang.String resourceServletUrl)
           
 
Method Summary
 java.util.Map getAttributes()
          Gets a Map of 'environment specific' attributes related to this request.
 java.lang.String getBackURL()
          Gets the URL of the page that caused this page to display.
 java.lang.String getDesignURL()
          Gets a URL that returns one to the portal page that invoked this portlet.
 DeviceInfo getDeviceInfo()
          Gets the device information for this request.
 java.lang.String getEventURL()
          Gets the URL that can be used to target portlet events.
 int getHeight()
          Gets the requested height of the portlet contents, in pixels.
 java.lang.String getLoginServerURL()
          Gets the login URL.
 int getMode()
          Gets an integer representing the render mode.
 java.lang.String getPageURL()
          Gets the URL of the page that invoked this portlet.
 PerfMonitor getPerfMonitor()
          Gets a performance monitor object that will be used to record performance stats.
 PortalConfig getPortalConfig()
          Gets an object containing information pertinent to the portlet about how the portal is currently configured.
 java.lang.String getPortletPageReference()
          Gets an opaque identifier which uniquely distinguishes the occurence of this portlet on a page.
 java.lang.String getPortletRefreshURL()
          Gets the base url which should be used to build links for refreshing a portlet's markup.
 java.lang.String getPortletTemplate()
          Gets the Portlet Template for the rendering of this portlet.
 java.lang.String getResourceServletUrl()
          Returns the name of the resource servlet.
 int getWCMaxExpiryTime()
          Gets the Maximum Expiry time which needs to be used by the portlets which are using invalidation based caching.
 boolean hasBorder()
          Gets an indicator of whether this portlet should draw its border or not.
 boolean hasTitle()
          Gets an indicator of whether this portlet should draw a title or not.
 boolean isCollapsed()
          Gets an indicator of whether this portlet is collapsed or not.
 boolean isRefreshEnabled()
          Returns whether portlet refresh fucntionality is enabled.
 boolean isResourceProxyAvailable()
          Returns flag to indicate whether the host portal provides a resource proxy.
 boolean isRewriteUrls()
          Gets an indicator of whether this portlet should use rewrite Urls or not.
 boolean showAbout()
          Gets an indicator of whether this portlet should draw its about link or not.
 boolean showCollapse()
          Gets an indicator of whether this portlet should draw its collapse/restore link or not.
 boolean showDetails()
          Gets an indicator of whether this portlet should draw its details link or not.
 boolean showEdit()
          Gets an indicator of whether this portlet should draw its edit link or not.
 boolean showHelp()
          Gets an indicator of whether this portlet should draw its help link or not.
 boolean showRefresh()
          Gets an indicator of whether this portlet should draw its refresh link or not.
 boolean showRemove()
          Gets an indicator of whether this portlet should draw its remove link or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderContext

public RenderContext(int renderMode,
                     java.lang.String pageURL,
                     java.lang.String designURL,
                     java.lang.String backURL,
                     java.lang.String loginURL,
                     java.lang.String portletRefreshURL,
                     boolean hasTitle,
                     boolean hasBorder,
                     boolean showDetails,
                     boolean showEdit,
                     boolean showHelp,
                     boolean showAbout,
                     boolean showRemove,
                     boolean showCollapse,
                     boolean showRefresh,
                     boolean isRefreshEnabled,
                     boolean isCollapsed,
                     boolean isRewriteUrls,
                     java.lang.String portletTemplate,
                     DeviceInfo deviceInfo,
                     PortalConfig portalConfig,
                     java.util.Map attributes,
                     int WCMaxExpiryTime,
                     java.lang.String portletPageReference,
                     java.lang.String eventURL,
                     PerfMonitor perfMonitor,
                     int height,
                     boolean isResourceProxyAvailable,
                     java.lang.String resourceServletUrl)
Method Detail

getMode

public int getMode()
Gets an integer representing the render mode. Constants for each of the render modes are defined in the PortletRenderer class.

Returns:
an integer representing the render mode.

getDesignURL

public java.lang.String getDesignURL()
                              throws java.lang.IllegalStateException
Gets a URL that returns one to the portal page that invoked this portlet. Note: Query string is included if applicable.

Returns:
a URL that returns one to the portal page that invoked this portlet.
Throws:
java.lang.IllegalStateException

getPageURL

public java.lang.String getPageURL()
                            throws java.lang.IllegalStateException
Gets the URL of the page that invoked this portlet. Portlets use this to (re)write URLs in their response that should redisplay the portlet in this page. Note: Query string is included if applicable.

Returns:
the URL of the page that invoked this portlet.
Throws:
java.lang.IllegalStateException

getEventURL

public java.lang.String getEventURL()
Gets the URL that can be used to target portlet events. Portlets should use this to write URLs in their response that will raise an event they have declared. This should be used in conjuction with methods from PortletRendererUtil.

Returns:
the URL that can be used to target portlet events.

getBackURL

public java.lang.String getBackURL()
Gets the URL of the page that caused this page to display.

Returns:
the URL of the page that caused this page to display.

getLoginServerURL

public java.lang.String getLoginServerURL()
                                   throws java.lang.IllegalStateException
Gets the login URL.

Returns:
the login URL.
Throws:
java.lang.IllegalStateException

isRefreshEnabled

public boolean isRefreshEnabled()
Returns whether portlet refresh fucntionality is enabled.

Returns:
An indicator as to whether portlet refresh functionality is enabled on the calling portal.

getPortletRefreshURL

public java.lang.String getPortletRefreshURL()
                                      throws java.lang.IllegalStateException
Gets the base url which should be used to build links for refreshing a portlet's markup.

Returns:
the portlet refresh URL.
Throws:
java.lang.IllegalStateException

hasTitle

public boolean hasTitle()
Gets an indicator of whether this portlet should draw a title or not.

Returns:
an indicator of whether this portlet should draw a title or not.

hasBorder

public boolean hasBorder()
Gets an indicator of whether this portlet should draw its border or not.

Returns:
an indicator of whether this portlet should draw its border or not.

showDetails

public boolean showDetails()
Gets an indicator of whether this portlet should draw its details link or not.

Returns:
an indicator of whether this portlet should draw its details link or not.

showEdit

public boolean showEdit()
Gets an indicator of whether this portlet should draw its edit link or not.

Returns:
an indicator of whether this portlet should draw its edit link or not.

showHelp

public boolean showHelp()
Gets an indicator of whether this portlet should draw its help link or not.

Returns:
an indicator of whether this portlet should draw its help link or not.

showAbout

public boolean showAbout()
Gets an indicator of whether this portlet should draw its about link or not.

Returns:
an indicator of whether this portlet should draw its about link or not.

showRefresh

public boolean showRefresh()
Gets an indicator of whether this portlet should draw its refresh link or not.

Returns:
an indicator of whether this portlet should draw its refresh link or not.

showRemove

public boolean showRemove()
Gets an indicator of whether this portlet should draw its remove link or not.

Returns:
an indicator of whether this portlet should draw its remove link or not.

showCollapse

public boolean showCollapse()
Gets an indicator of whether this portlet should draw its collapse/restore link or not.

Returns:
an indicator of whether this portlet should draw its collapse/restore link or not.

isCollapsed

public boolean isCollapsed()
Gets an indicator of whether this portlet is collapsed or not.

Returns:
an indicator of whether this portlet is collapsed or not.

isRewriteUrls

public boolean isRewriteUrls()
Gets an indicator of whether this portlet should use rewrite Urls or not.

Returns:
an indicator of whether this portlet should use rewrite Urls or not.

getPortletTemplate

public java.lang.String getPortletTemplate()
Gets the Portlet Template for the rendering of this portlet.

Returns:
the Portlet Template for the rendering of this portlet.

getDeviceInfo

public DeviceInfo getDeviceInfo()
Gets the device information for this request.

Returns:
the device information for this request.

getPortalConfig

public PortalConfig getPortalConfig()
Gets an object containing information pertinent to the portlet about how the portal is currently configured. Portlets may use this information to add customization fields to its screens or help information that pertain to mobile.

Returns:
an object containing information about how the portal is currently configured.

getAttributes

public java.util.Map getAttributes()
Gets a Map of 'environment specific' attributes related to this request.

Returns:
a Map of 'environment specific' attributes related to this request.

getWCMaxExpiryTime

public int getWCMaxExpiryTime()
Gets the Maximum Expiry time which needs to be used by the portlets which are using invalidation based caching.

Returns:
the Maximum Expiry time which needs to be used by the portlets which are using invalidation based caching.

getPortletPageReference

public java.lang.String getPortletPageReference()
Gets an opaque identifier which uniquely distinguishes the occurence of this portlet on a page. It is used to scope portlet private parameters so that no collisions occur on the URL. See PortletRendererUtil This should not be confused with the PortletReference class which is used to identify an instance of the portlet in the Portal repository for the purposes of customization.

Returns:
an opaque identifier which uniquely distinguishes the occurence of this portlet on a page.

getPerfMonitor

public PerfMonitor getPerfMonitor()
Gets a performance monitor object that will be used to record performance stats.


getHeight

public int getHeight()
Gets the requested height of the portlet contents, in pixels.

Returns:
the requested height of the portlet contents, in pixels.

isResourceProxyAvailable

public boolean isResourceProxyAvailable()
Returns flag to indicate whether the host portal provides a resource proxy.

Returns:
true if a resource proxy is available, false otherwise

getResourceServletUrl

public java.lang.String getResourceServletUrl()
Returns the name of the resource servlet.

Returns:
the name of the resource servlet

Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.