org.jasig.portal.channels
Class CImage

java.lang.Object
  extended by org.jasig.portal.channels.BaseMultithreadedChannel
      extended by org.jasig.portal.channels.CImage
All Implemented Interfaces:
IMultithreadedCacheable, IMultithreadedChannel

public class CImage
extends BaseMultithreadedChannel
implements IMultithreadedCacheable

A simple channel which renders an image along with an optional caption and subcaption.

Channel parameters:

NameDescriptionExampleRequired
img-uriThe URI of the image to displayhttp://webcam.its.hawaii.edu/uhmwebcam/image01.jpgyes
img-widthThe width of the image to display320no
img-heightThe height of the image to display240no
img-borderThe border of the image to display0no
img-linkA URI to be used as an href for the imagehttp://www.hawaii.edu/visitor/#webcamsno
captionA caption of the image to displayAlmost Live Shot of Hamilton Library Front Entranceno
subcaptionThe subcaption of the image to displayUpdated Once per Minute During Daylight Hoursno

Version:
$Revision: 1.23 $
Author:
Ken Weiner, kweiner@unicon.net

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jasig.portal.channels.BaseMultithreadedChannel
BaseMultithreadedChannel.ChannelState
 
Field Summary
private static java.lang.String sslLocation
           
 
Fields inherited from class org.jasig.portal.channels.BaseMultithreadedChannel
channelStateMap, log
 
Constructor Summary
CImage()
           
 
Method Summary
private static boolean exists(java.lang.String s)
           
 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.
private  java.lang.String getKey(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 renderXML(org.xml.sax.ContentHandler out, java.lang.String uid)
          Output channel content to the portal
 
Methods inherited from class org.jasig.portal.channels.BaseMultithreadedChannel
getRuntimeProperties, receiveEvent, setRuntimeData, setStaticData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sslLocation

private static final java.lang.String sslLocation
See Also:
Constant Field Values
Constructor Detail

CImage

public CImage()
Method Detail

renderXML

public void renderXML(org.xml.sax.ContentHandler out,
                      java.lang.String uid)
               throws PortalException
Output channel content to the portal

Specified by:
renderXML in interface IMultithreadedChannel
Overrides:
renderXML in class BaseMultithreadedChannel
Parameters:
out - a sax content handler
uid - a unique ID used to identify the state of the channel
Throws:
PortalException

exists

private static boolean exists(java.lang.String s)

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

getKey

private java.lang.String getKey(java.lang.String uid)