|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.ChannelManager
public class ChannelManager
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.
| Field Summary | |
|---|---|
private IAuthorizationPrincipal |
ap
|
private BrowserInfo |
binfo
|
private boolean |
ccaching
|
private static IChannelRendererFactory |
cChannelRendererFactory
Factory used to build all channel renderer objects. |
static java.lang.String |
channelAddressingPathElement
|
private java.util.Map |
channelCacheTable
|
private javax.naming.Context |
channelContext
|
private java.util.Hashtable |
channelTable
|
private java.lang.String |
channelTarget
|
private boolean |
groupedRendering
|
private java.util.HashMap |
iccListeners
|
private java.util.HashMap |
iccTalkers
|
private LocaleManager |
lm
|
private static org.apache.commons.logging.Log |
log
|
private PortalControlStructures |
pcs
|
private java.util.Set |
pendingChannels
|
private javax.naming.Context |
portalContext
|
private java.util.Hashtable |
rendererTable
|
private java.util.Set |
repeatRenderings
|
static int |
SYSTEM_CHANNEL_CACHE_MIN_SIZE
|
static java.util.Map |
systemCache
|
private java.util.Hashtable |
targetParams
|
UPFileSpec |
uPElement
|
private IUserPreferencesManager |
upm
|
private static boolean |
useAnchors
|
| 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)
|
private void |
clearRepeatedRenderings()
Clear information about repeated rendering attempts. |
void |
commitToRenderingChannelSet()
A method to notify ChannelManager that the channel set for
the current rendering cycle is complete. |
private IChannel |
feedPortalControlStructuresToChannel(IChannel chObj,
PortalControlStructures pcs)
|
private IChannel |
feedRuntimeDataToChannel(IChannel chObj,
javax.servlet.http.HttpServletRequest req)
|
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. |
private static javax.naming.Context |
getChannelJndiContext(javax.naming.Context portalContext,
java.lang.String sessionId,
java.lang.String userId,
java.lang.String layoutId)
getChannelContext generates a JNDI context that
will be passed to the regular channels. |
java.lang.String |
getChannelTarget()
|
java.lang.String |
getChannelTitle(java.lang.String channelSubscribeId)
Get the dynamic channel title for a given channelSubscribeID. |
private java.util.Set |
getListeningChannels(java.lang.String talkerChannelSubscribeId)
|
private static javax.naming.Context |
getPortalContext()
Get the uPortal JNDI context |
private void |
handleRenderingError(java.lang.String channelSubscribeId,
org.xml.sax.ContentHandler contentHandler,
java.lang.Throwable t,
int renderingStatus,
java.lang.String commonMessage,
java.lang.String technicalMessage,
boolean partialOutput)
Handles rendering output errors by replacing a channel instance with that of an error channel. |
private boolean |
hasListeningChannels(java.lang.String talkerChannelSubscribeId)
|
private IChannel |
instantiateChannel(IUserLayoutChannelDescription cd)
|
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. |
private boolean |
isListeningToChannels(java.lang.String listenerChannelSubscribeId)
|
private boolean |
isRepeatedRenderingAttempt(java.lang.String channelSubscribeId)
Check if repeated rendering has been attempted for a given channel. |
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. |
private void |
processRequestChannelParameters(javax.servlet.http.HttpServletRequest req)
Determine target channel and pass corresponding actions/params to that channel |
(package private) void |
registerChannelDependency(java.lang.String listenerChannelSubscribeId,
java.lang.String talkerChannelSubscribeId)
|
void |
removeChannel(java.lang.String channelSubscribeId)
Removes channel instance from the internal caches. |
(package private) void |
removeChannelDependency(java.lang.String listenerChannelSubscribeId,
java.lang.String talkerChannelSubscribeId)
|
private IChannel |
replaceWithErrorChannel(java.lang.String channelSubscribeId,
ErrorCode errorCode,
java.lang.Throwable t,
java.lang.String message,
boolean setRuntimeData)
A helper method to replace all occurences of a given channel instance with that of an error channel. |
private IChannel |
replaceWithSecureInfoChannel(java.lang.String channelSubscribeId,
boolean setRuntimeData)
A helper method to replace all occurences of a secure channel instance with that of a secure information channel. |
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)
|
private void |
setRepeatedRenderingAttempt(java.lang.String channelSubscribeId)
Register a repeated rendering attempt for a particular channel. |
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. |
private IChannelRenderer |
startChannelRendering(java.lang.String channelSubscribeId,
boolean noTimeout)
Initiate channel rendering cycle, possibly disabling timeout. |
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.apache.commons.logging.Log log
private IUserPreferencesManager upm
private PortalControlStructures pcs
private java.util.Hashtable channelTable
private java.util.Hashtable rendererTable
private java.util.Map channelCacheTable
private java.lang.String channelTarget
private java.util.Hashtable targetParams
private BrowserInfo binfo
private LocaleManager lm
private javax.naming.Context portalContext
private javax.naming.Context channelContext
private java.util.HashMap iccTalkers
private java.util.HashMap iccListeners
private java.util.Set pendingChannels
private boolean groupedRendering
private IAuthorizationPrincipal ap
private static final IChannelRendererFactory cChannelRendererFactory
public UPFileSpec uPElement
public static final int SYSTEM_CHANNEL_CACHE_MIN_SIZE
public static final java.util.Map systemCache
public static final java.lang.String channelAddressingPathElement
private static boolean useAnchors
private java.util.Set repeatRenderings
private boolean ccaching
| Constructor Detail |
|---|
public ChannelManager()
public ChannelManager(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
IUserPreferencesManager manager,
UPFileSpec uPElement)
ChannelManager instance.
request - a HttpServletRequest valueresponse - a HttpServletResponse valuemanager - an IUserPreferencesManager valueuPElement - an UPFileSpec that includes a tag number.public ChannelManager(IUserPreferencesManager manager)
ChannelManager instance.
manager - an IUserPreferencesManager value| Method Detail |
|---|
public void setChannelInstance(java.lang.String channelSubscribeId,
IChannel channelInstance)
public void commitToRenderingChannelSet()
ChannelManager that the channel set for
the current rendering cycle is complete.
Note: This information is used to identify relevant channel communication dependencies
public void finishedRenderingCycle()
public void finishedSession()
public void outputChannel(java.lang.String channelSubscribeId,
org.xml.sax.ContentHandler contentHandler)
CachingSerializer, the method
will take care of character cache compilation and store cache
in the tables.
channelSubscribeId - a String valuecontentHandler - a ContentHandler valueprivate boolean isRepeatedRenderingAttempt(java.lang.String channelSubscribeId)
channelSubscribeId - a String value
boolean valueprivate void setRepeatedRenderingAttempt(java.lang.String channelSubscribeId)
channelSubscribeId - a String valueprivate void clearRepeatedRenderings()
private void handleRenderingError(java.lang.String channelSubscribeId,
org.xml.sax.ContentHandler contentHandler,
java.lang.Throwable t,
int renderingStatus,
java.lang.String commonMessage,
java.lang.String technicalMessage,
boolean partialOutput)
channelSubscribeId - a String valuecontentHandler - a ContentHandler valuet - a Throwable valuerenderingStatus - an int valuecommonMessage - a String valuetechnicalMessage - a String valuepartialOutput - a boolean value
private IChannel replaceWithErrorChannel(java.lang.String channelSubscribeId,
ErrorCode errorCode,
java.lang.Throwable t,
java.lang.String message,
boolean setRuntimeData)
channelSubscribeId - a String valueerrorCode - an ErrorCodet - a Throwable an exception that caused the problemmessage - a String an optional message to pass to the error channelsetRuntimeData - a boolean wether the method should also set the ChannelRuntimeData for the newly instantiated error channel
IChannel value of an error channel instance
private IChannel replaceWithSecureInfoChannel(java.lang.String channelSubscribeId,
boolean setRuntimeData)
channelSubscribeId - a String valuesetRuntimeData - a boolean wether the method should also set the ChannelRuntimeData for the newly instantiated secure info channel
IChannel value of a secure info channel instance
private static javax.naming.Context getChannelJndiContext(javax.naming.Context portalContext,
java.lang.String sessionId,
java.lang.String userId,
java.lang.String layoutId)
throws javax.naming.NamingException
getChannelContext generates a JNDI context that
will be passed to the regular channels. The context is pieced
together from the parts of the global portal context.
portalContext - uPortal JNDI contextsessionId - current session iduserId - id of a current userlayoutId - id of the layout used by the user
InitialContext value
javax.naming.NamingException
private static javax.naming.Context getPortalContext()
throws javax.naming.NamingException
javax.naming.NamingException
public IChannel instantiateChannel(java.lang.String channelSubscribeId)
throws PortalException
channelSubscribeId - a channel instance Id in the userLayout
IChannel object
PortalException
private IChannel instantiateChannel(IUserLayoutChannelDescription cd)
throws PortalException
PortalException
public void passPortalEvent(java.lang.String channelSubscribeId,
PortalEvent le)
channelSubscribeId - the channel subscribe idle - the portal eventprivate void processRequestChannelParameters(javax.servlet.http.HttpServletRequest req)
req - the HttpServletRequest
private IChannel feedPortalControlStructuresToChannel(IChannel chObj,
PortalControlStructures pcs)
private IChannel feedRuntimeDataToChannel(IChannel chObj,
javax.servlet.http.HttpServletRequest req)
public IChannel getChannelInstance(java.lang.String channelSubscribeId)
channelSubscribeId - a String value
IChannel objectpublic void removeChannel(java.lang.String channelSubscribeId)
channelSubscribeId - a String value
public void startRenderingCycle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
UPFileSpec uPElement)
request - a HttpServletRequest valueresponse - a HttpServletResponse valueuPElement - an UPFileSpec valuepublic boolean isCharacterCaching()
boolean valuepublic void setCharacterCaching(boolean setting)
setting - a boolean valuepublic void setUPElement(UPFileSpec uPElement)
UPFileSpec object that will be
used to construct file portion of the context path
in the auto-generated URLs, also known as the baseActionURL.
uPElement - an UPFileSpec valuepublic void setUserPreferencesManager(IUserPreferencesManager m)
IUserPreferencesManager to use.
m - an IUserPreferencesManager value
public IChannelRenderer startChannelRendering(java.lang.String channelSubscribeId)
throws PortalException
channelSubscribeId - a String value
IChannelRenderer value
PortalException - if an error occurs
private IChannelRenderer startChannelRendering(java.lang.String channelSubscribeId,
boolean noTimeout)
throws PortalException
channelSubscribeId - a String valuenoTimeout - a boolean value specifying if the
time out rendering control should be disabled.
IChannelRenderer value
PortalException - if an error occurs
void registerChannelDependency(java.lang.String listenerChannelSubscribeId,
java.lang.String talkerChannelSubscribeId)
private java.util.Set getListeningChannels(java.lang.String talkerChannelSubscribeId)
private boolean isListeningToChannels(java.lang.String listenerChannelSubscribeId)
private boolean hasListeningChannels(java.lang.String talkerChannelSubscribeId)
void removeChannelDependency(java.lang.String listenerChannelSubscribeId,
java.lang.String talkerChannelSubscribeId)
public static boolean isUseAnchors()
true if use of anchors is enabled, otherwise falsepublic java.lang.String getChannelTarget()
public void channelAdded(LayoutEvent ev)
channelAdded in interface LayoutEventListenerpublic void channelUpdated(LayoutEvent ev)
channelUpdated in interface LayoutEventListenerpublic void channelMoved(LayoutMoveEvent ev)
channelMoved in interface LayoutEventListenerpublic void channelDeleted(LayoutMoveEvent ev)
channelDeleted in interface LayoutEventListenerpublic void folderAdded(LayoutEvent ev)
folderAdded in interface LayoutEventListenerpublic void folderUpdated(LayoutEvent ev)
folderUpdated in interface LayoutEventListenerpublic void folderMoved(LayoutMoveEvent ev)
folderMoved in interface LayoutEventListenerpublic void folderDeleted(LayoutMoveEvent ev)
folderDeleted in interface LayoutEventListenerpublic void layoutLoaded()
layoutLoaded in interface LayoutEventListenerpublic void layoutSaved()
layoutSaved in interface LayoutEventListenerpublic void setLocaleManager(LocaleManager lm)
public java.lang.String getChannelTitle(java.lang.String channelSubscribeId)
channelSubscribeId -
java.lang.IllegalArgumentException - if channelSubcribeId is null
java.lang.IllegalStateException - if
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||