org.jasig.portal.channels.iccdemo
Class CViewer

java.lang.Object
  extended by org.jasig.portal.channels.BaseChannel
      extended by org.jasig.portal.channels.iccdemo.CViewer
All Implemented Interfaces:
IChannel

public class CViewer
extends BaseChannel

This is a modified version of the CInlineFrame channel that uses inter-channel communications.

Version:
$Revision: 1.12 $
Author:
Peter Kharchenko, Susan Bramhall

Field Summary
private  java.lang.String currentURL
           
private static java.lang.String historyFname
           
private static org.apache.commons.logging.Log log
           
private static java.lang.String sslLocation
           
 
Fields inherited from class org.jasig.portal.channels.BaseChannel
runtimeData, staticData
 
Constructor Summary
CViewer()
           
 
Method Summary
private  void addHistoryURL(java.lang.String url)
          An internal method to report new URL to the history's channel registry
(package private)  void changeURL(java.lang.String newURL)
          Change URL that's being shown
private  java.lang.Object getBoundObject(java.lang.String channelSubscribeId)
          A utility method to determine an object bound to the "chan-obj" branch for a particular channel id.
private  java.lang.String getChannelId(java.lang.String fname)
          A utility method for obtaining a channelSubscribeId given a channel fname
private  java.lang.String getStylesheetTitle(java.lang.String userAgent)
          Uses the user agent string to determine which stylesheet title to use.
private  void registerHistory()
          A utility method to register history channel as both listener and instructor.
 void renderXML(org.xml.sax.ContentHandler out)
          Ask channel to render its content.
 void setStaticData(ChannelStaticData sd)
          Passes ChannelStaticData to the channel.
 
Methods inherited from class org.jasig.portal.channels.BaseChannel
getRuntimeProperties, receiveEvent, setRuntimeData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

sslLocation

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

historyFname

private static final java.lang.String historyFname
See Also:
Constant Field Values

currentURL

private java.lang.String currentURL
Constructor Detail

CViewer

public CViewer()
Method Detail

setStaticData

public void setStaticData(ChannelStaticData sd)
                   throws PortalException
Description copied from interface: IChannel
Passes ChannelStaticData to the channel. This is done during channel instantiation time. see org.jasig.portal.ChannelStaticData

Specified by:
setStaticData in interface IChannel
Overrides:
setStaticData in class BaseChannel
Parameters:
sd - channel static data
Throws:
PortalException
See Also:
ChannelStaticData

registerHistory

private void registerHistory()
A utility method to register history channel as both listener and instructor.


changeURL

void changeURL(java.lang.String newURL)
Change URL that's being shown

Parameters:
newURL - a String value

addHistoryURL

private void addHistoryURL(java.lang.String url)
An internal method to report new URL to the history's channel registry

Parameters:
url - a String value

renderXML

public void renderXML(org.xml.sax.ContentHandler out)
               throws PortalException
Description copied from interface: IChannel
Ask channel to render its content.

Specified by:
renderXML in interface IChannel
Overrides:
renderXML in class BaseChannel
Parameters:
out - the SAX ContentHandler to output content to
Throws:
PortalException

getStylesheetTitle

private java.lang.String getStylesheetTitle(java.lang.String userAgent)
Uses the user agent string to determine which stylesheet title to use. We wouldn't need this method if stylesheet sets could distinguish between browser versions

Parameters:
userAgent - the user agent string
Returns:
ssTitle the stylesheet title

getChannelId

private java.lang.String getChannelId(java.lang.String fname)
A utility method for obtaining a channelSubscribeId given a channel fname

Parameters:
fname - a String value
Returns:
channel's subscribe id, or null if no channel with given fname was found

getBoundObject

private java.lang.Object getBoundObject(java.lang.String channelSubscribeId)
A utility method to determine an object bound to the "chan-obj" branch for a particular channel id.

Parameters:
channelSubscribeId - a String value of the channel who's object we're looking for
Returns:
an Object value bound to that jndi location (or null if channel didn't bind anything)