|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.ChannelRuntimeProperties
public class ChannelRuntimeProperties
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 cannot communicate with the framework, write back to these Data objects, etc. 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
Field Summary | |
---|---|
private boolean |
bool_willRender
|
protected org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
ChannelRuntimeProperties()
Default constructor. |
Method Summary | |
---|---|
void |
setWillRender(boolean value)
Set whether the channel will render if asked to do so (if renderXML() is called). |
boolean |
willRender()
Getter method for willRender property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log log
private boolean bool_willRender
Constructor Detail |
---|
public ChannelRuntimeProperties()
true
.
Method Detail |
---|
public void setWillRender(boolean value)
value
- a boolean
valuepublic boolean willRender()
boolean
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |