org.jasig.portal
Class ChannelRuntimeProperties

java.lang.Object
  extended by org.jasig.portal.ChannelRuntimeProperties
Direct Known Subclasses:
TitledChannelRuntimeProperties

public class ChannelRuntimeProperties
extends java.lang.Object

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

Version:
$Revision: 1.9.2.1 $ $Date: 2005/09/28 19:36:30 $
Author:
Peter Kharchenko

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

log

protected final org.apache.commons.logging.Log log

bool_willRender

private boolean bool_willRender
Constructor Detail

ChannelRuntimeProperties

public ChannelRuntimeProperties()
Default constructor. willRender property is initialized to true.

Method Detail

setWillRender

public void setWillRender(boolean value)
Set whether the channel will render if asked to do so (if renderXML() is called). Warning: no known code currently accesses this property of ChannelRuntimeProperties and so setting this property will have no effect.

Parameters:
value - a boolean value

willRender

public boolean willRender()
Getter method for willRender property.

Returns:
a boolean value