| Conveys runtime properties from channel to framework.
In general, the IChannel API contract consists of one-way calls.
The framework instantiates the channel and provisions it with state via
setStaticData() and setRuntimeData(); these are one-way calls from framework
to channel. The channel can fail with an exception, but otherwise the method has
no return value. (As of uPortal 2.6, channels can persist parameters back to the
StaticChannelData object).
Then there's the renderXML() call, by which the channel writes back to
a content handler to produce output.
The getRuntimeProperties() IChannel method, and this ChannelRuntimeProperties
object, provides a way for the channel to communicate back to the framework
data other than the content it desires to write out to the end user.
ChannelRuntimeProperties was originally envisioned as a mechanism whereby
an IChannel would convey whether it wishes to render at all, and it was
envisioned that its place in the sequence of IChannel calls would be after
setRuntimeData() but before renderXML(). However, this was not implemented.
Through uPortal 2.5.0, no framework code called getRuntimeProperties() on
IChannels.
For uPortal 2.5.1, ChannelRuntimeProperties were recruited for use in
implementing dynamic channel titles. Channels returning ChannelRuntimeProperties
which implement the optional interface IChannelTitle convey a desired dynamic title
for rendering by the framework in place of the title defined at channel
publication. In support of this change, the channel rendering framework
was modified to actually get the ChannelRuntimeProperties from channels for
inspection as to whether it implements this interface. This method call was
added after renderXML() , not before as originally envisioned. This
order was selected because many channels are not prepared to know their dynamic
title until after they have rendered - particularly CPortletAdapter, as the
JSR-168 mechanism for portlets to set their titles is part of their
configuration of the RenderResponse.
Note that this does not foreclose the possibility of using
ChannelRuntimeProperties to allow a channel to convey that it does not wish
to be rendered at all at this time. Such a channel could write no content
to the contentHandler, and return a ChannelRuntimeProperties conveying its
wish not to be rendered at all. Similarly to the way dynamic channel titles
are supported, dropping the channel from the output entirely could be supported.
Warning: The willRender() feature of ChannelRuntimeProperties is not
implemented. No framework code will currently check for this property.
Setting willRender one way or the other currently doesn't have any effect.
Current version gathers the following information
- willRender - a boolean flag signaling if the channel will render at all in the current state.
This flag could be checked after the ChannelRuntimeData has been passed to a channel,
but prior to the renderXML() call.
However, no framework code currently checks the willRender property of ChannelRuntimeData.
version: $Revision: 36690 $ $Date: 2006-08-25 14:03:25 -0700 (Fri, 25 Aug 2006) $ author: Peter Kharchenko pkharchenko@interactivebusiness.com" |