org.jasig.portal.channels
Class CSnoop

java.lang.Object
  extended by org.jasig.portal.channels.CSnoop
All Implemented Interfaces:
IChannel, IPrivileged, IPrivilegedChannel

public class CSnoop
extends java.lang.Object
implements IPrivilegedChannel

A channel which displays HTTP request and HTML header info. This channel implements IPrivilegedChannel rather than IChannel because it needs access to the HttpServletRequest object.

This channel was partially developed at Columbia University as an exercise.

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

Field Summary
private static java.lang.String bundleLocation
           
private  PortalControlStructures pcs
           
private  ChannelRuntimeData runtimeData
           
private static java.lang.String sslLocation
           
 
Constructor Summary
CSnoop()
          No-argument constructor for CSnoop.
 
Method Summary
private  void addInfo(org.w3c.dom.Element parentElement, java.lang.String name, java.lang.String value)
          Adds a text node with the given name and value.
 ChannelRuntimeProperties getRuntimeProperties()
          Returns channel runtime properties.
 void receiveEvent(PortalEvent ev)
          Processes layout-level events coming from the portal
 void renderXML(org.xml.sax.ContentHandler out)
          Output channel content to the portal
 void setPortalControlStructures(PortalControlStructures pcs)
          Sends portal control structures to the portal, i.e.
 void setRuntimeData(ChannelRuntimeData rd)
          Receives channel runtime data from the portal and processes actions passed to it.
 void setStaticData(ChannelStaticData sd)
          Receive static channel data from the portal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pcs

private PortalControlStructures pcs

runtimeData

private ChannelRuntimeData runtimeData

sslLocation

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

bundleLocation

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

CSnoop

public CSnoop()
No-argument constructor for CSnoop.

Method Detail

setPortalControlStructures

public void setPortalControlStructures(PortalControlStructures pcs)
Sends portal control structures to the portal, i.e. HttpServletRequest, HttpServletResponse, UserPreferencesManager, etc.

Specified by:
setPortalControlStructures in interface IPrivileged
Parameters:
pcs - the portal control structures
See Also:
PortalControlStructures

getRuntimeProperties

public ChannelRuntimeProperties getRuntimeProperties()
Returns channel runtime properties.

Specified by:
getRuntimeProperties in interface IChannel
Returns:
handle to runtime properties
See Also:
ChannelRuntimeProperties

receiveEvent

public void receiveEvent(PortalEvent ev)
Processes layout-level events coming from the portal

Specified by:
receiveEvent in interface IChannel
Parameters:
ev - a portal layout event
See Also:
PortalEvent

setStaticData

public void setStaticData(ChannelStaticData sd)
Receive static channel data from the portal

Specified by:
setStaticData in interface IChannel
Parameters:
sd - static channel data
See Also:
ChannelStaticData

setRuntimeData

public void setRuntimeData(ChannelRuntimeData rd)
Receives channel runtime data from the portal and processes actions passed to it. The names of these parameters are entirely up to the channel.

Specified by:
setRuntimeData in interface IChannel
Parameters:
rd - handle to channel runtime data
See Also:
ChannelRuntimeData

renderXML

public void renderXML(org.xml.sax.ContentHandler out)
               throws PortalException
Output channel content to the portal

Specified by:
renderXML in interface IChannel
Parameters:
out - a sax document handler
Throws:
PortalException

addInfo

private void addInfo(org.w3c.dom.Element parentElement,
                     java.lang.String name,
                     java.lang.String value)
Adds a text node with the given name and value. If the value is null then no text node is added to the new node, but the new node is still added to parentElement

Parameters:
parentElement - parent of the node to be added
name - name of the node to add
value - String value of the node to add