uPortal 2.4.1
API Documentation

org.jasig.portal
Class ChannelManager

java.lang.Object
  extended byorg.jasig.portal.ChannelManager
All Implemented Interfaces:
java.util.EventListener, LayoutEventListener

public class ChannelManager
extends java.lang.Object
implements LayoutEventListener

ChannelManager shall have the burden of squeezing content out of channels.

Validation and timeouts, these two are needed for smooth operation of the portal sometimes channels will timeout with information retreival then the content should be skipped.

Version:
$Revision: 1.102.2.2 $
Author:
Peter Kharchenko, pkharchenko@unicon.net

Field Summary
static java.lang.String channelAddressingPathElement
           
static int SYSTEM_CHANNEL_CACHE_MIN_SIZE
           
static SoftHashMap systemCache
           
 UPFileSpec uPElement
           
 
Constructor Summary
ChannelManager()
           
ChannelManager(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, IUserPreferencesManager manager, UPFileSpec uPElement)
          Creates a new ChannelManager instance.
ChannelManager(IUserPreferencesManager manager)
          Creates a new ChannelManager instance.
 
Method Summary
 void channelAdded(LayoutEvent ev)
           
 void channelDeleted(LayoutMoveEvent ev)
           
 void channelMoved(LayoutMoveEvent ev)
           
 void channelUpdated(LayoutEvent ev)
           
 void commitToRenderingChannelSet()
          A method to notify ChannelManager that the channel set for the current rendering cycle is complete.
 void finishedRenderingCycle()
          Clean up after a rendering round.
 void finishedSession()
          Handle end-of-session cleanup
 void folderAdded(LayoutEvent ev)
           
 void folderDeleted(LayoutMoveEvent ev)
           
 void folderMoved(LayoutMoveEvent ev)
           
 void folderUpdated(LayoutEvent ev)
           
 IChannel getChannelInstance(java.lang.String channelSubscribeId)
          Obtain an instance of a channel.
 IChannel instantiateChannel(java.lang.String channelSubscribeId)
          Instantiates a channel given just the channel subscribe Id.
 boolean isCharacterCaching()
          Specifies if this particular rendering cycle is using character caching.
static boolean isUseAnchors()
          Determines whether or not anchors should be inserted at the end of URLS within channels.
 void layoutLoaded()
           
 void layoutSaved()
           
 void outputChannel(java.lang.String channelSubscribeId, org.xml.sax.ContentHandler contentHandler)
          Outputs a channel in to a given content handler.
 void passPortalEvent(java.lang.String channelSubscribeId, PortalEvent le)
          Passes a layout-level event to a channel.
 void removeChannel(java.lang.String channelSubscribeId)
          Removes channel instance from the internal caches.
 void setChannelInstance(java.lang.String channelSubscribeId, IChannel channelInstance)
          Directly places a channel instance into the hashtable of active channels.
 void setCharacterCaching(boolean setting)
          Specify that the current rendering cycle should be using (or not) character caching.
 void setLocaleManager(LocaleManager lm)
           
 void setUPElement(UPFileSpec uPElement)
          Specify UPFileSpec object that will be used to construct file portion of the context path in the auto-generated URLs, also known as the baseActionURL.
 void setUserPreferencesManager(IUserPreferencesManager m)
          Specify IUserPreferencesManager to use.
 IChannelRenderer startChannelRendering(java.lang.String channelSubscribeId)
          Initiate channel rendering cycle.
 void startRenderingCycle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, UPFileSpec uPElement)
          Signals the start of a new rendering cycle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uPElement

public UPFileSpec uPElement

SYSTEM_CHANNEL_CACHE_MIN_SIZE

public static final int SYSTEM_CHANNEL_CACHE_MIN_SIZE
See Also:
Constant Field Values

systemCache

public static final SoftHashMap systemCache

channelAddressingPathElement

public static final java.lang.String channelAddressingPathElement
See Also:
Constant Field Values
Constructor Detail

ChannelManager

public ChannelManager()

ChannelManager

public ChannelManager(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response,
                      IUserPreferencesManager manager,
                      UPFileSpec uPElement)
Creates a new ChannelManager instance.

Parameters:
request - a HttpServletRequest value
response - a HttpServletResponse value
manager - an IUserPreferencesManager value
uPElement - an UPFileSpec that includes a tag number.

ChannelManager

public ChannelManager(IUserPreferencesManager manager)
Creates a new ChannelManager instance.

Parameters:
manager - an IUserPreferencesManager value
Method Detail

setChannelInstance

public void setChannelInstance(java.lang.String channelSubscribeId,
                               IChannel channelInstance)
Directly places a channel instance into the hashtable of active channels. This is designed to be used by the error channel only.


commitToRenderingChannelSet

public void commitToRenderingChannelSet()
A method to notify ChannelManager that the channel set for the current rendering cycle is complete. Note: This information is used to identify relevant channel communication dependencies


finishedRenderingCycle

public void finishedRenderingCycle()
Clean up after a rendering round.


finishedSession

public void finishedSession()
Handle end-of-session cleanup


outputChannel

public void outputChannel(java.lang.String channelSubscribeId,
                          org.xml.sax.ContentHandler contentHandler)
Outputs a channel in to a given content handler. If the current rendering cycle is targeting character cache output, and the content handler passed to the method is an instance of CachingSerializer, the method will take care of character cache compilation and store cache in the tables.

Parameters:
channelSubscribeId - a String value
contentHandler - a ContentHandler value

instantiateChannel

public IChannel instantiateChannel(java.lang.String channelSubscribeId)
                            throws PortalException
Instantiates a channel given just the channel subscribe Id.

Parameters:
channelSubscribeId - a channel instance Id in the userLayout
Returns:
an IChannel object
Throws:
PortalException

passPortalEvent

public void passPortalEvent(java.lang.String channelSubscribeId,
                            PortalEvent le)
Passes a layout-level event to a channel.

Parameters:
channelSubscribeId - the channel subscribe id
le - the portal event

getChannelInstance

public IChannel getChannelInstance(java.lang.String channelSubscribeId)
Obtain an instance of a channel.

Parameters:
channelSubscribeId - a String value
Returns:
an IChannel object

removeChannel

public void removeChannel(java.lang.String channelSubscribeId)
Removes channel instance from the internal caches.

Parameters:
channelSubscribeId - a String value

startRenderingCycle

public void startRenderingCycle(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                UPFileSpec uPElement)
Signals the start of a new rendering cycle.

Parameters:
request - a HttpServletRequest value
response - a HttpServletResponse value
uPElement - an UPFileSpec value

isCharacterCaching

public boolean isCharacterCaching()
Specifies if this particular rendering cycle is using character caching.

Returns:
a boolean value

setCharacterCaching

public void setCharacterCaching(boolean setting)
Specify that the current rendering cycle should be using (or not) character caching.

Parameters:
setting - a boolean value

setUPElement

public void setUPElement(UPFileSpec uPElement)
Specify UPFileSpec object that will be used to construct file portion of the context path in the auto-generated URLs, also known as the baseActionURL.

Parameters:
uPElement - an UPFileSpec value

setUserPreferencesManager

public void setUserPreferencesManager(IUserPreferencesManager m)
Specify IUserPreferencesManager to use.

Parameters:
m - an IUserPreferencesManager value

startChannelRendering

public IChannelRenderer startChannelRendering(java.lang.String channelSubscribeId)
                                       throws PortalException
Initiate channel rendering cycle.

Parameters:
channelSubscribeId - a String value
Returns:
a IChannelRenderer value
Throws:
PortalException - if an error occurs

isUseAnchors

public static boolean isUseAnchors()
Determines whether or not anchors should be inserted at the end of URLS within channels. These anchors typically tell a browser to position itself with the channel in-view after a link is clicked or a form is submitted.

Returns:
true if use of anchors is enabled, otherwise false

channelAdded

public void channelAdded(LayoutEvent ev)
Specified by:
channelAdded in interface LayoutEventListener

channelUpdated

public void channelUpdated(LayoutEvent ev)
Specified by:
channelUpdated in interface LayoutEventListener

channelMoved

public void channelMoved(LayoutMoveEvent ev)
Specified by:
channelMoved in interface LayoutEventListener

channelDeleted

public void channelDeleted(LayoutMoveEvent ev)
Specified by:
channelDeleted in interface LayoutEventListener

folderAdded

public void folderAdded(LayoutEvent ev)
Specified by:
folderAdded in interface LayoutEventListener

folderUpdated

public void folderUpdated(LayoutEvent ev)
Specified by:
folderUpdated in interface LayoutEventListener

folderMoved

public void folderMoved(LayoutMoveEvent ev)
Specified by:
folderMoved in interface LayoutEventListener

folderDeleted

public void folderDeleted(LayoutMoveEvent ev)
Specified by:
folderDeleted in interface LayoutEventListener

layoutLoaded

public void layoutLoaded()
Specified by:
layoutLoaded in interface LayoutEventListener

layoutSaved

public void layoutSaved()
Specified by:
layoutSaved in interface LayoutEventListener

setLocaleManager

public void setLocaleManager(LocaleManager lm)

uPortal 2.4.1
API Documentation