org.jasig.portal.channels.error
Class CError

java.lang.Object
  extended by org.jasig.portal.channels.BaseChannel
      extended by org.jasig.portal.channels.error.CError
All Implemented Interfaces:
ICacheable, IChannel, ICharacterChannel, IPrivileged, IPrivilegedChannel

Deprecated. All IChannel implementations should be migrated to portlets

@Deprecated
public final class CError
extends BaseChannel
implements IPrivilegedChannel, ICacheable, ICharacterChannel

CError is the error channel, also known as the null channel; it is designed to render in place of other channels when something goes wrong.

Possible conditions when CError is invoked are:

Since:
uPortal 2.5. Prior to 2.5, CError existed only as org.jasig.portal.channels.CError.
Version:
$Revision: 19776 $ $Date: 2010-01-14 16:17:21 -0600 (Thu, 14 Jan 2010) $
Author:
Peter Kharchenko, pkharchenko@interactivebusiness.com, andrew.petro@yale.edu

Field Summary
 
Fields inherited from class org.jasig.portal.channels.BaseChannel
runtimeData, staticData
 
Fields inherited from interface org.jasig.portal.ICacheable
CHANNEL_CACHE_KEY_INSTANCE_SCOPE, CHANNEL_CACHE_KEY_SCOPE_PARAM_NAME, CHANNEL_CACHE_KEY_SYSTEM_SCOPE
 
Constructor Summary
CError()
          Deprecated. Construct an uninitialized instance of the CError channel.
CError(ErrorCode errorCode, String message, String channelSubscribeId, IChannel channelInstance)
          Deprecated. Instantiate a CError representing a particular channel's failure, including a message and errorCode, but not a Throwable.
CError(ErrorCode errorCode, Throwable throwable, String channelSubscribeId, IChannel channelInstance)
          Deprecated. Construct an instance of the Error channel representing a failure to render of a particular subscribed channel for reason of having thrown a Throwable.
CError(ErrorCode errorCode, Throwable exception, String channelSubscribeId, IChannel channelInstance, String message)
          Deprecated. Instantiate a CError instance representing the failure of some particular channel, including an error code, message, and the Throwable.
 
Method Summary
protected  void doCommonErrorHandling(ContentHandler contentHandler, PrintWriter printWriter)
          Deprecated. Logic common to both renderXml and renderCharacters for handling a request for an errored out channel.
 ChannelCacheKey generateKey()
          Deprecated. Requests the channel to generate a key uniquely describing its current state, and a description of key usage.
 ErrorDocument getErrorDocument()
          Deprecated.  
 boolean isCacheValid(Object validity)
          Deprecated. Requests the channel to verify validity of the retrieved cache based on the validator object.
 void receiveEvent(PortalEvent ev)
          Deprecated. Passes an outside event to a channel.
protected  void renderChannel(IChannel channel, ContentHandler contentHandler, PrintWriter printWriter)
          Deprecated.  
 void renderCharacters(PrintWriter out)
          Deprecated. Asks the channel to render its content as characters.
 void renderXML(ContentHandler out)
          Deprecated. Ask channel to render its content.
 void setErrorDocument(ErrorDocument errorDocument)
          Deprecated.  
 void setPortalControlStructures(PortalControlStructures pcs)
          Deprecated. Passes portal control structure to the channel.
 void setStaticData(ChannelStaticData sd)
          Deprecated. Passes ChannelStaticData to the channel.
 String toString()
          Deprecated.  
 
Methods inherited from class org.jasig.portal.channels.BaseChannel
getRuntimeProperties, setRuntimeData
 
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, setRuntimeData
 

Constructor Detail

CError

public CError()
Deprecated. 
Construct an uninitialized instance of the CError channel.


CError

public CError(ErrorCode errorCode,
              Throwable throwable,
              String channelSubscribeId,
              IChannel channelInstance)
Deprecated. 
Construct an instance of the Error channel representing a failure to render of a particular subscribed channel for reason of having thrown a Throwable.

Parameters:
errorCode - one of the static error codes of this class
throwable - cause of failed channel's failure
channelSubscribeId - identifies the failed channel
channelInstance - the failed channel

CError

public CError(ErrorCode errorCode,
              String message,
              String channelSubscribeId,
              IChannel channelInstance)
Deprecated. 
Instantiate a CError representing a particular channel's failure, including a message and errorCode, but not a Throwable.

Parameters:
errorCode - one of the static error codes of this class
message - describes error
channelSubscribeId - identifies failed channel
channelInstance - failed channel

CError

public CError(ErrorCode errorCode,
              Throwable exception,
              String channelSubscribeId,
              IChannel channelInstance,
              String message)
Deprecated. 
Instantiate a CError instance representing the failure of some particular channel, including an error code, message, and the Throwable.

Parameters:
errorCode - one of the static error codes of this class
exception - thrown by the failed channel
channelSubscribeId - identifies failed channel
channelInstance - the failed channel instance
message - message describing failure
Method Detail

setPortalControlStructures

public void setPortalControlStructures(PortalControlStructures pcs)
Deprecated. 
Description copied from interface: IPrivileged
Passes portal control structure to the channel.

Specified by:
setPortalControlStructures in interface IPrivileged
See Also:
PortalControlStructures

receiveEvent

public void receiveEvent(PortalEvent ev)
Deprecated. 
Description copied from interface: IChannel
Passes an outside event to a channel. Events should normally come from the LayoutBean.

Specified by:
receiveEvent in interface IChannel
Overrides:
receiveEvent in class BaseChannel
Parameters:
ev - PortalEvent object
See Also:
PortalEvent

setStaticData

public void setStaticData(ChannelStaticData sd)
Deprecated. 
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
See Also:
ChannelStaticData

renderChannel

protected void renderChannel(IChannel channel,
                             ContentHandler contentHandler,
                             PrintWriter printWriter)
                      throws Exception
Deprecated. 
Throws:
Exception

doCommonErrorHandling

protected void doCommonErrorHandling(ContentHandler contentHandler,
                                     PrintWriter printWriter)
Deprecated. 
Logic common to both renderXml and renderCharacters for handling a request for an errored out channel.


renderXML

public void renderXML(ContentHandler out)
Deprecated. 
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

generateKey

public ChannelCacheKey generateKey()
Deprecated. 
Description copied from interface: ICacheable
Requests the channel to generate a key uniquely describing its current state, and a description of key usage.

Specified by:
generateKey in interface ICacheable

isCacheValid

public boolean isCacheValid(Object validity)
Deprecated. 
Description copied from interface: ICacheable
Requests the channel to verify validity of the retrieved cache based on the validator object.

Specified by:
isCacheValid in interface ICacheable

renderCharacters

public void renderCharacters(PrintWriter out)
                      throws PortalException
Deprecated. 
Description copied from interface: ICharacterChannel
Asks the channel to render its content as characters. The method has the same call precedence as the IChannel.renderXML() method. (i.e. if the channel also supports ICacheable, portal will try to find a cache entry prior calling this method)

Specified by:
renderCharacters in interface ICharacterChannel
Parameters:
out - a PrintWriter value into which the character output should be directed
Throws:
PortalException - if an error occurs

getErrorDocument

public ErrorDocument getErrorDocument()
Deprecated. 
Returns:
Returns the errorDocument.

setErrorDocument

public void setErrorDocument(ErrorDocument errorDocument)
Deprecated. 
Parameters:
errorDocument - The errorDocument to set.

toString

public String toString()
Deprecated. 
Overrides:
toString in class BaseChannel


Copyright © 2010 Jasig. All Rights Reserved.