org.jasig.portal.layout.dlm.channels.guide
Class DlmIntroChannel

java.lang.Object
  extended by org.jasig.portal.channels.BaseChannel
      extended by org.jasig.portal.layout.dlm.channels.guide.DlmIntroChannel
All Implemented Interfaces:
ICacheable, IChannel, ICharacterChannel

public class DlmIntroChannel
extends BaseChannel
implements ICacheable, ICharacterChannel

A simple channel for introducing the capabilities of DLM in the portal. This channel gets its content from a file, "dlmIntro.html", included with the channel's source.

Author:
mboyd@sungardsct.com

Field Summary
private  java.util.Map cacheKeys
           
private static java.lang.String CONTENT_FILE
           
private  java.lang.String currentSection
           
private  java.lang.String mediaBase
           
private static java.lang.String STYLESHEET_FILE
           
 
Fields inherited from class org.jasig.portal.channels.BaseChannel
log, runtimeData, staticData
 
Constructor Summary
DlmIntroChannel()
           
 
Method Summary
 ChannelCacheKey generateKey()
          Return our cache key which is a system cache key so all users share the same output and it never changes meaning that it never regenerates.
private  ChannelCacheKey initKey(java.lang.String id)
          Create a globally shared cache key for a section with the validity object being a string of the long value representing the last time that the content file was updated.
 boolean isCacheValid(java.lang.Object validity)
          Always returns true;
 void renderCharacters(java.io.PrintWriter pw)
          Load and return the content of the channel.
 void setRuntimeData(ChannelRuntimeData rd)
          Sets up the base media URL if not done already and determines which section is desired by the user if any.
 
Methods inherited from class org.jasig.portal.channels.BaseChannel
getRuntimeProperties, receiveEvent, renderXML, setStaticData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jasig.portal.IChannel
getRuntimeProperties, receiveEvent, renderXML, setStaticData
 

Field Detail

cacheKeys

private java.util.Map cacheKeys

mediaBase

private java.lang.String mediaBase

CONTENT_FILE

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

STYLESHEET_FILE

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

currentSection

private java.lang.String currentSection
Constructor Detail

DlmIntroChannel

public DlmIntroChannel()
Method Detail

initKey

private ChannelCacheKey initKey(java.lang.String id)
Create a globally shared cache key for a section with the validity object being a string of the long value representing the last time that the content file was updated.

Returns:

generateKey

public ChannelCacheKey generateKey()
Return our cache key which is a system cache key so all users share the same output and it never changes meaning that it never regenerates.

Specified by:
generateKey in interface ICacheable
See Also:
ICacheable.generateKey()

isCacheValid

public boolean isCacheValid(java.lang.Object validity)
Always returns true;

Specified by:
isCacheValid in interface ICacheable
See Also:
ICacheable.isCacheValid(java.lang.Object)

renderCharacters

public void renderCharacters(java.io.PrintWriter pw)
                      throws PortalException
Load and return the content of the channel. This comes from an html file included with the channel's source files.

Specified by:
renderCharacters in interface ICharacterChannel
Parameters:
pw - a PrintWriter value into which the character output should be directed
Throws:
PortalException - if an error occurs
See Also:
ICharacterChannel.renderCharacters(java.io.PrintWriter)

setRuntimeData

public void setRuntimeData(ChannelRuntimeData rd)
                    throws PortalException
Sets up the base media URL if not done already and determines which section is desired by the user if any.

Specified by:
setRuntimeData in interface IChannel
Overrides:
setRuntimeData in class BaseChannel
Parameters:
rd - channel runtime data
Throws:
PortalException
See Also:
IChannel.setRuntimeData(org.jasig.portal.ChannelRuntimeData)