|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectoracle.portal.provider.v2.render.PortletRenderer
oracle.portal.provider.v2.render.RenderManager
public class RenderManager
RenderManager implements a model whereby users can plug
in individual renderers which handle a request for a specific render
mode in a specific content type. Any class that implements the ManagedRenderer interface can be used with RenderManager.
Consult the JPDK documentation for information about the various renderers
supplied with the JPDK.
The individual ManagedRenderers controlled by a
RenderManager are registered by calling the
set<ModeName>Page(Object) methods (e.g. setShowPage(Object)), which associate a renderer with a
specific render mode. If you are using DefaultProviderLoader, these calls are made
automatically when you include the appropriate tags in your provider XML
registry file. For example:
Multiple
<showPage class="oracle.portal.provider.v2.render.http.ResourceRenderer">
<resourcePath>/my/resource/path</resourcePath>
</showPage>
ManagedRenderers can be registered for a single render
mode, provided they all handle different content types (i.e. their ManagedRenderer.getContentType() methods return different values). When
locating the appropriate ManagedRenderer to service a
particular render request, RenderManager will look for the
first ManagedRenderer registered for the requested render mode
whose content type matches the 'preferred content type' of the request. This
allows a RenderManager to be configured so that it supports
'standard' browsers (e.g. with a "text/html" content type) as
well as mobile devices (e.g. with a "text/vnd.oracle.mobilexml"
content type).
RenderManager also supports registration of default
renderers, controlled by setDefaultPage(Object) or the
<defaultPage> tag. If unable to locate a
ManagedRenderer for the requested render mode and content type
and a default renderer has been registered with the appropriate content
type, RenderManager will pass the request on to that
renderer.
RenderManager supports 'short-hand' XML declarations where a
resourcePath is included directly inside a 'page' tag,
e.g. <showPage>/my/resource/path</showPage>. Support for
these 'short-hand' declarations are provided by the
set<ModeName>Page(String) methods (e.g. setShowPage(String)). These declarations result in a new
ResourceRenderer being
initialized with the supplied resourcePath. Consult the
supplied documentation for more detailed instructions and examples.
By default, RenderManager will automatically render portlet
containers for you. To disable the automatic rendering of the container call
setRenderContainer(false). Alternatively, you can set this in
the provider XML registry:
<renderContainer>false</renderContainer>
When renderering a Portlet's container, RenderManager will
render the user's customized title (label), if the Portlet supports
personalization.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
RenderManager()
Null Constructor |
|
| Method Summary | |
|---|---|
void |
addAllowedPath(java.lang.String path)
Adds a resource URL pattern to the list of those allowed to be rendered when using the page parameter functionality. |
ManagedRenderer |
getAboutPage(java.lang.String type)
Gets the ManagedRenderer that renders this portlet's "about" mode with
the given content type. |
boolean |
getAutoInvalidate()
Returns the flag indicating whether or not RenderManager
will attempt automatic invalidation of web cache content for this
portlet upon customization. |
boolean |
getAutoRedirect()
Gets the boolean flag used to determine if RenderManager
should automatically issue a redirect after the portlet has
processed the customization form |
java.lang.String |
getCharSet()
Gets the Default IANA character encoding to be used for pages rendered by ManagedRenderers. |
java.lang.String |
getContentType()
Gets the MIME type to be used as the default content type for all BaseManagedRenderers. |
ManagedRenderer |
getDefaultPage(java.lang.String type)
Gets the ManagedRenderer that renders this portlet's 'default' page with
the given content type. |
ManagedRenderer |
getEditDefaultsPage(java.lang.String type)
Gets the ManagedRenderer that renders this portlet's "editDefault" mode
with the given content type. |
ManagedRenderer |
getEditPage(java.lang.String type)
Gets the ManagedRenderer that renders this portlet's "edit" mode with
the given content type. |
ManagedRenderer |
getHelpPage(java.lang.String type)
Gets the ManagedRenderer that renders this portlet's "help" mode with
the given content type. |
ManagedRenderer |
getLinkPage(java.lang.String type)
Gets the ManagedRenderer that renders this portlet's "link" mode with
the given content type. |
ManagedRenderer |
getManagedRenderer(PortletRenderRequest pr)
Returns the ManagedRenderer object to be used to render this
request. |
int |
getPageExpires()
Gets the default expiration time (in minutes) of a page produced by a BaseManagedRenderer. |
java.lang.String |
getPageParameterName()
Gets the default name of the request parameter that is used to override the name of the page used by a ManagedRenderer. |
PortletDefinition |
getPortletDefinition()
Gets the PortletDefinition instance which this
RenderManager belongs to. |
ManagedRenderer |
getPreviewPage(java.lang.String type)
Gets the ManagedRenderer that renders this portlet's "preview" mode with
the given content type. |
boolean |
getRenderContainer()
Gets the boolean flag used by RenderManager to decide
whether or not it renders the portlet's container. |
boolean |
getRenderCustomize()
Gets the boolean flag used by RenderManager to decide
whether or not it renders the portlet's customize container. |
ManagedRenderer |
getShowDetailsPage(java.lang.String type)
Gets the ManagedRenderer that renders this portlet's "showDetails" mode
with the given content type. |
ManagedRenderer |
getShowPage(java.lang.String type)
Gets the ManagedRenderer that renders this portlet's "show" mode with
the given content type. |
void |
postInitialize()
Performs the extra steps required to initialize and validate a RenderManager once its properties have been set with the
appropriate accessor methods. |
void |
preInitialize(java.lang.Object o)
Performs the steps required to initialize this RenderManager after it has been constructed. |
void |
render(PortletRenderRequest pr)
Renders the requested mode in the requested content type with an appropriate renderer. |
void |
setAboutPage(java.lang.Object renderer)
Registers a ManagedRenderer that renders this portlet's "about" mode. |
void |
setAboutPage(java.lang.String path)
Registers a ResourceRenderer that
renders this portlet's About mode. |
void |
setAutoInvalidate(boolean value)
Sets the flag indicating whether automatic invalidation of webcache content for the portlet upon customization should be performed. |
void |
setAutoInvalidate(java.lang.String value)
Sets the flag indicating whether automatic invalidation of webcache content for the portlet upon customization should be performed. |
void |
setAutoRedirect(boolean value)
Controls whether RenderManager automatically issues a
redirect after the portlet has processed the customization form |
void |
setAutoRedirect(java.lang.String value)
Controls whether RenderManager automatically issues a
redirect after the portlet has processed the customization form |
void |
setCharSet(java.lang.String charSet)
Sets the Default IANA character encoding to be used. |
void |
setContentType(java.lang.String contentType)
Sets the MIME type to be used as the default content type for all BaseManagedRenderers. |
void |
setDefaultPage(java.lang.Object renderer)
Registers a ManagedRenderer that renders this portlet's 'default page'. |
void |
setDefaultPage(java.lang.String path)
Registers a ResourceRenderer that
renders this portlet's Link mode. |
void |
setEditDefaultsPage(java.lang.Object renderer)
Registers a ManagedRenderer that renders this portlet's "editDefault"
mode. |
void |
setEditDefaultsPage(java.lang.String path)
Registers a ResourceRenderer that
renders this portlet's Edit Defaults mode. |
void |
setEditPage(java.lang.Object renderer)
Registers a ManagedRenderer that renders this portlet's "edit" mode. |
void |
setEditPage(java.lang.String path)
Registers a ResourceRenderer that
renders this portlet's Edit mode. |
void |
setHelpPage(java.lang.Object renderer)
Registers a ManagedRenderer that renders this portlet's "help" mode. |
void |
setHelpPage(java.lang.String path)
Registers a ResourceRenderer that
renders this portlet's Help mode. |
void |
setLinkPage(java.lang.Object renderer)
Registers a ManagedRenderer that renders this portlet's "link" mode. |
void |
setLinkPage(java.lang.String path)
Registers a ResourceRenderer that
renders this portlet's Link mode. |
void |
setPageExpires(int expires)
Sets the default expiration time (in minutes) of a page produced by a BaseManagedRenderer. |
void |
setPageExpires(java.lang.String expires)
Sets the default expiration time (in minutes) of a page produced by a BaseManagedRenderer. |
void |
setPageParameterName(java.lang.String name)
Sets the default name of the request parameter that is used to override the name of the page used by a ManagedRenderer. |
void |
setPreviewPage(java.lang.Object renderer)
Registers a ManagedRenderer that renders this portlet's "preview" mode. |
void |
setPreviewPage(java.lang.String path)
Registers a ResourceRenderer that
renders this portlet's Preview mode. |
void |
setRenderContainer(boolean value)
Controls whether RenderManager renders the portlet's
container. |
void |
setRenderContainer(java.lang.String value)
Controls whether RenderManager renders the portlet's
container. |
void |
setRenderCustomize(boolean value)
Controls whether RenderManager renders the portlet's
customize container. |
void |
setRenderCustomize(java.lang.String value)
Controls whether RenderManager renders the portlet's
customize container. |
void |
setShowDetailsPage(java.lang.Object renderer)
Registers a ManagedRenderer that renders this portlet's "showDetails"
mode. |
void |
setShowDetailsPage(java.lang.String path)
Registers a ResourceRenderer that
renders this portlet's Show Details mode. |
void |
setShowPage(java.lang.Object renderer)
Registers a ManagedRenderer that renders this portlet's
"show" mode. |
void |
setShowPage(java.lang.String path)
Registers a ResourceRenderer that
renders this portlet's Show mode. |
void |
validate(java.lang.String context,
ValidationError errors)
Validates the internal state of this RenderManager
instance. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RenderManager()
| Method Detail |
|---|
public void render(PortletRenderRequest pr)
throws PortletException,
AccessControlException
Note: If the JPDK is not rendering the portlet container, then it is the responsibility of the portlet developer to correctly handle the various state in which the portlet can be rendered (eg collapsed, not collapsed)
render in class PortletRendererpr - a PortletRenderRequest
PortletException - if a ManagedRenderer for the requested
render mode and content type could not be located or an error occurs
while rendering
AccessControlException - if the user is not authorized to
access the portlet instance referred to by the requestpublic PortletDefinition getPortletDefinition()
PortletDefinition instance which this
RenderManager belongs to.
This is set up by the framework when a provider is initialised by its parent so there is no equivalent setter in the class (as there is for configurable properties).
PortletDefinition from which this
object was instantiated.public void setRenderContainer(boolean value)
RenderManager renders the portlet's
container.
value - Boolean flag to tell RenderManager to either
render the portlet's container (true) or not
(false). true by default.public void setRenderContainer(java.lang.String value)
RenderManager renders the portlet's
container.
value - String representation of boolean value, indicating whether
RenderManager should render the portlet's container
("true") or not ("false"). "true"
by default.public boolean getRenderContainer()
RenderManager to decide
whether or not it renders the portlet's container.
public void setRenderCustomize(boolean value)
RenderManager renders the portlet's
customize container.
value - Boolean flag to tell RenderManager to either
render the portlet's customize container (true) or not
(false). true by default.public void setRenderCustomize(java.lang.String value)
RenderManager renders the portlet's
customize container.
value - String representation of boolean value, indicating whether
RenderManager should render the portlet's customize
container ("true") or not ("false").
"true" by default.public boolean getRenderCustomize()
RenderManager to decide
whether or not it renders the portlet's customize container.
public void setAutoRedirect(boolean value)
RenderManager automatically issues a
redirect after the portlet has processed the customization form
value - Boolean flag to tell RenderManager to either
automatically issue a redirect (true) or not
(false). false by default.public void setAutoRedirect(java.lang.String value)
RenderManager automatically issues a
redirect after the portlet has processed the customization form
value - String representation of boolean value, indicating whether
RenderManager should automatically issue a redirect
("true") or not ("false").
"false" by default.public boolean getAutoRedirect()
RenderManager
should automatically issue a redirect after the portlet has
processed the customization form
public void setAutoInvalidate(boolean value)
value - true if RenderManager is to
attempt automatic invalidation, false otherwise.public void setAutoInvalidate(java.lang.String value)
value - "true" if RenderManager
is to attempt automatic invalidation, "false"
otherwise.public boolean getAutoInvalidate()
RenderManager
will attempt automatic invalidation of web cache content for this
portlet upon customization.
public void preInitialize(java.lang.Object o)
throws NodeHandlerException
RenderManager after it has been constructed.
preInitialize in interface InitializableXMLObjecto - the object that will become this object's parent
NodeHandlerException - if an error occurs while initializing
this object
public void postInitialize()
throws NodeHandlerException
RenderManager once its properties have been set with the
appropriate accessor methods.
postInitialize in interface InitializableXMLObjectNodeHandlerException - if not all properties have been set
correctlypublic void setContentType(java.lang.String contentType)
BaseManagedRenderers. This parameter will be inherited by any
of this renderer's BaseManagedRenderers for which the
corresponding parameter has not been directly specified.
contentType - MIME type to be used as the default content type for
BaseManagedRenderers.public java.lang.String getContentType()
BaseManagedRenderers.
BaseManagedRenderers.public void setPageExpires(int expires)
BaseManagedRenderer. This parameter will be inherited by any of
this renderer's BaseManagedRenderers for which the
corresponding parameter has not been directly specified.
expires - the default integer number of minutes that the Portal
should cache the output of a BaseManagedRenderer. If zero,
indicates that the output should not be cached by default.public void setPageExpires(java.lang.String expires)
BaseManagedRenderer. This parameter will be inherited by any of
this renderer's BaseManagedRenderers for which the
corresponding parameter has not been directly specified.
expires - String representation of the default integer number of
minutes that the Portal should cache the output of a BaseManagedRenderer. If zero, indicates that the output should not be
cached by default.public int getPageExpires()
BaseManagedRenderer.
BaseManagedRenderer. If non-zero, indicates the number of minutes the
page should be cached by the Portal.public void setCharSet(java.lang.String charSet)
ManagedRenderers
for which the corresponding parameter has not been directly specified.
charSet - default IANA character encoding.public java.lang.String getCharSet()
ManagedRenderers.
public void setPageParameterName(java.lang.String name)
ManagedRenderer. Used to
communicate the "next" page in a portlet that uses multiple pages to
render itself. This parameter will be inherited by any of this
renderer's Pages for which the corresponding parameter has
not been directly specified.
name - the default name of the request parameter that is used to
override the page name.public java.lang.String getPageParameterName()
ManagedRenderer.
public void setShowPage(java.lang.String path)
throws PortletException
ResourceRenderer that
renders this portlet's Show mode.
path - ServletContext relative path to the rendering
resource.
PortletException - if an error occurs while initializing a
ResourceRenderer.
public void setShowPage(java.lang.Object renderer)
throws PortletException
ManagedRenderer that renders this portlet's
"show" mode.
renderer - a ManagedRenderer object.
PortletException - if the given object is not a valid ManagedRenderer object.public ManagedRenderer getShowPage(java.lang.String type)
ManagedRenderer that renders this portlet's "show" mode with
the given content type.
ManagedRenderer that renders this portlet's "show" mode with
the given content type or null if no such renderer exists.
public void setShowDetailsPage(java.lang.String path)
throws PortletException
ResourceRenderer that
renders this portlet's Show Details mode.
path - ServletContext relative path to the rendering
resource.
PortletException - if an error occurs while initializing a
ResourceRenderer.
public void setShowDetailsPage(java.lang.Object renderer)
throws PortletException
ManagedRenderer that renders this portlet's "showDetails"
mode. If not set, the "show" renderer is used by default.
renderer - a ManagedRenderer object.
PortletException - if the given object is not a valid ManagedRenderer object.public ManagedRenderer getShowDetailsPage(java.lang.String type)
ManagedRenderer that renders this portlet's "showDetails" mode
with the given content type.
ManagedRenderer that renders this portlet's "showDetails"
mode with the given content type or null if no such
renderer exists.
public void setEditPage(java.lang.String path)
throws PortletException
ResourceRenderer that
renders this portlet's Edit mode.
path - ServletContext relative path to the rendering
resource.
PortletException - if an error occurs while initializing a
ResourceRenderer.
public void setEditPage(java.lang.Object renderer)
throws PortletException
ManagedRenderer that renders this portlet's "edit" mode. If
not set, the "editDefault" renderer is used by default.
renderer - a ManagedRenderer object.
PortletException - if the given object is not a valid ManagedRenderer object.public ManagedRenderer getEditPage(java.lang.String type)
ManagedRenderer that renders this portlet's "edit" mode with
the given content type.
ManagedRenderer that renders this portlet's "edit" mode with
the given content type or null if no such renderer exists.
public void setEditDefaultsPage(java.lang.String path)
throws PortletException
ResourceRenderer that
renders this portlet's Edit Defaults mode.
path - ServletContext relative path to the rendering
resource.
PortletException - if an error occurs while initializing a
ResourceRenderer.
public void setEditDefaultsPage(java.lang.Object renderer)
throws PortletException
ManagedRenderer that renders this portlet's "editDefault"
mode. If not set, the "edit" renderer is used by default.
renderer - a ManagedRenderer object.
PortletException - if the given object is not a valid ManagedRenderer object.public ManagedRenderer getEditDefaultsPage(java.lang.String type)
ManagedRenderer that renders this portlet's "editDefault" mode
with the given content type.
ManagedRenderer that renders this portlet's "editDefault"
mode with the given content type or null if no such
renderer exists.
public void setPreviewPage(java.lang.String path)
throws PortletException
ResourceRenderer that
renders this portlet's Preview mode.
path - ServletContext relative path to the rendering
resource.
PortletException - if an error occurs while initializing a
ResourceRenderer.
public void setPreviewPage(java.lang.Object renderer)
throws PortletException
ManagedRenderer that renders this portlet's "preview" mode.
renderer - a ManagedRenderer object.
PortletException - if the given object is not a valid ManagedRenderer object.public ManagedRenderer getPreviewPage(java.lang.String type)
ManagedRenderer that renders this portlet's "preview" mode with
the given content type.
ManagedRenderer that renders this portlet's "preview" mode
with the given content type or null if no such renderer
exists.
public void setAboutPage(java.lang.String path)
throws PortletException
ResourceRenderer that
renders this portlet's About mode.
path - ServletContext relative path to the rendering
resource.
PortletException - if an error occurs while initializing a
ResourceRenderer.
public void setAboutPage(java.lang.Object renderer)
throws PortletException
ManagedRenderer that renders this portlet's "about" mode.
renderer - a ManagedRenderer object.
PortletException - if the given object is not a valid ManagedRenderer object.public ManagedRenderer getAboutPage(java.lang.String type)
ManagedRenderer that renders this portlet's "about" mode with
the given content type.
ManagedRenderer that renders this portlet's "about" mode
with the given content type or null if no such renderer
exists.
public void setHelpPage(java.lang.String path)
throws PortletException
ResourceRenderer that
renders this portlet's Help mode.
path - ServletContext relative path to the rendering
resource.
PortletException - if an error occurs while initializing a
ResourceRenderer.
public void setHelpPage(java.lang.Object renderer)
throws PortletException
ManagedRenderer that renders this portlet's "help" mode.
renderer - a ManagedRenderer object.
PortletException - if the given object is not a valid ManagedRenderer object.public ManagedRenderer getHelpPage(java.lang.String type)
ManagedRenderer that renders this portlet's "help" mode with
the given content type.
ManagedRenderer that renders this portlet's "help" mode with
the given content type or null if no such renderer exists.
public void setLinkPage(java.lang.String path)
throws PortletException
ResourceRenderer that
renders this portlet's Link mode.
path - ServletContext relative path to the rendering
resource.
PortletException - if an error occurs while initializing a
ResourceRenderer.
public void setLinkPage(java.lang.Object renderer)
throws PortletException
ManagedRenderer that renders this portlet's "link" mode.
renderer - a ManagedRenderer object.
PortletException - if the given object is not a valid ManagedRenderer object.public ManagedRenderer getLinkPage(java.lang.String type)
ManagedRenderer that renders this portlet's "link" mode with
the given content type.
ManagedRenderer that renders this portlet's "link" mode with
the given content type or null if no such renderer exists.
public void setDefaultPage(java.lang.String path)
throws PortletException
ResourceRenderer that
renders this portlet's Link mode.
path - ServletContext relative path to the rendering
resource.
PortletException - if an error occurs while initializing a
ResourceRenderer.
public void setDefaultPage(java.lang.Object renderer)
throws PortletException
ManagedRenderer that renders this portlet's 'default page'.
This renderer is used when no ManagedRenderer has been specified for the
specific mode of the render request.
renderer - a ManagedRenderer object.
PortletException - if the given object is not a valid ManagedRenderer object.public ManagedRenderer getDefaultPage(java.lang.String type)
ManagedRenderer that renders this portlet's 'default' page with
the given content type. This renderer is used when no ManagedRenderer
has been specified for the specific mode of the render request.
ManagedRenderer that renders this 'default' page with the
given content type or null if no such renderer exists.
public void addAllowedPath(java.lang.String path)
throws PortletException
pageParameterName provider definition tag
is used.
The rules for the pattern matching are as follows:
path - another pattern
PortletException - if an invalid path is added
public ManagedRenderer getManagedRenderer(PortletRenderRequest pr)
throws PortletException
ManagedRenderer object to be used to render this
request. The method looks for a ManagedRenderer registered
for the appropriate mode whose content type matches the preferred
content type of the render request. If no such
ManagedRenderer exists, the method returns the
ManagedRenderer registered as the 'default' for that
content type, if one exists.
pr - the current render request.
ManagedRenderer to be used to render this request.
PortletException - if no suitable ManagedRenderer
has been registered.
public void validate(java.lang.String context,
ValidationError errors)
RenderManager
instance. Errors found are reported using the supplied ValidationError instance.
validate in interface Validateablecontext - The context of the calling instance.errors - The current list of errors.
|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||