uPortal 2.4.1
API Documentation

org.jasig.portal.channels
Class CGenericXSLT

java.lang.Object
  extended byorg.jasig.portal.channels.CGenericXSLT
All Implemented Interfaces:
IMultithreadedCacheable, IMultithreadedChannel

public class CGenericXSLT
extends java.lang.Object
implements IMultithreadedChannel, IMultithreadedCacheable

A channel which transforms XML for rendering in the portal.

Static channel parameters to be supplied: 1) "xmlUri" - a URI representing the source XML document 2) "sslUri" - a URI representing the corresponding .ssl (stylesheet list) file 3) "xslTitle" - a title representing the stylesheet (optional) If no title parameter is specified, a default stylesheet will be chosen according to the media 4) "xslUri" - a URI representing the stylesheet to use If xslUri is supplied, sslUri and xslTitle will be ignored. 5) "cacheTimeout" - the amount of time (in seconds) that the contents of the channel should be cached (optional). If this parameter is left out, a default timeout value will be used. 6) "upc_localConnContext" - The class name of the ILocalConnectionContext implementation. Use when local data needs to be sent with the request for the URL.

The static parameters above can be overridden by including parameters of the same name (xmlUri, sslUri, xslTitle and/or xslUri in the HttpRequest string.

This channel can be used for all XML formats including RSS. Any other parameters passed to this channel via HttpRequest will get passed in turn to the XSLT stylesheet as stylesheet parameters. They can be read in the stylesheet as follows: <xsl:param name="yourParamName">aDefaultValue</xsl:param>

CGenericXSLT is also useful for channels that have no dynamic data. In these types of channels, all the markup comes from the XSLT stylesheets. An empty XML document can be used and is included with CGenericXSLT. Just set the xml parameter to this empty document.

Version:
$Revision: 1.58 $
Author:
Steve Toth, stoth@interactivebusiness.com, Ken Weiner, kweiner@unicon.net, Peter Kharchenko pkharchenko@interactivebusiness.com (multithreading,caching)

Constructor Summary
CGenericXSLT()
           
 
Method Summary
 ChannelCacheKey generateKey(java.lang.String uid)
          Requests the channel to generate a key uniqly describing it's current state, and a description of key usage.
 ChannelRuntimeProperties getRuntimeProperties(java.lang.String uid)
           
 boolean isCacheValid(java.lang.Object validity, java.lang.String uid)
          Requests the channel to verify validity of the retreived cache based on the validator object.
 void receiveEvent(PortalEvent ev, java.lang.String uid)
           
 void renderXML(org.xml.sax.ContentHandler out, java.lang.String uid)
           
 void setRuntimeData(ChannelRuntimeData rd, java.lang.String uid)
           
 void setStaticData(ChannelStaticData sd, java.lang.String uid)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CGenericXSLT

public CGenericXSLT()
Method Detail

setStaticData

public void setStaticData(ChannelStaticData sd,
                          java.lang.String uid)
                   throws ResourceMissingException
Specified by:
setStaticData in interface IMultithreadedChannel
Parameters:
uid - a string uniqly identifying a channel "instance" in the system. For example, a combination of session id and channel instance id would fit the bill.
Throws:
ResourceMissingException

setRuntimeData

public void setRuntimeData(ChannelRuntimeData rd,
                           java.lang.String uid)
Specified by:
setRuntimeData in interface IMultithreadedChannel

receiveEvent

public void receiveEvent(PortalEvent ev,
                         java.lang.String uid)
Specified by:
receiveEvent in interface IMultithreadedChannel

getRuntimeProperties

public ChannelRuntimeProperties getRuntimeProperties(java.lang.String uid)
Specified by:
getRuntimeProperties in interface IMultithreadedChannel

renderXML

public void renderXML(org.xml.sax.ContentHandler out,
                      java.lang.String uid)
               throws PortalException
Specified by:
renderXML in interface IMultithreadedChannel
Throws:
PortalException

generateKey

public ChannelCacheKey generateKey(java.lang.String uid)
Description copied from interface: IMultithreadedCacheable
Requests the channel to generate a key uniqly describing it's current state, and a description of key usage.

Specified by:
generateKey in interface IMultithreadedCacheable

isCacheValid

public boolean isCacheValid(java.lang.Object validity,
                            java.lang.String uid)
Description copied from interface: IMultithreadedCacheable
Requests the channel to verify validity of the retreived cache based on the validator object.

Specified by:
isCacheValid in interface IMultithreadedCacheable

uPortal 2.4.1
API Documentation