uPortal 2.4.1
API Documentation

org.jasig.portal.channels
Class CError

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

public 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:

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

Field Summary
static int AUTHORIZATION_EXCEPTION
           
static int CHANNEL_AUTHORIZATION_EXCEPTION
           
static int CHANNEL_MISSING_EXCEPTION
           
static int GENERAL_ERROR
           
static int GENERAL_RENDERING_EXCEPTION
           
static int INTERNAL_TIMEOUT_EXCEPTION
           
static int RENDER_TIME_EXCEPTION
           
static int RESOURCE_MISSING_EXCEPTION
           
static int SET_PCS_EXCEPTION
           
static int SET_RUNTIME_DATA_EXCEPTION
           
static int SET_STATIC_DATA_EXCEPTION
           
static int TIMEOUT_EXCEPTION
           
 
Constructor Summary
CError()
           
CError(int errorCode, java.lang.String message, java.lang.String channelSubscribeId, IChannel channelInstance)
           
CError(int errorCode, java.lang.Throwable exception, java.lang.String channelSubscribeId, IChannel channelInstance)
           
CError(int errorCode, java.lang.Throwable exception, java.lang.String channelSubscribeId, IChannel channelInstance, java.lang.String message)
           
 
Method Summary
 ChannelCacheKey generateKey()
          Requests the channel to generate a key uniqly describing it's current state, and a description of key usage.
 boolean isCacheValid(java.lang.Object validity)
          Requests the channel to verify validity of the retreived cache based on the validator object.
 void renderCharacters(java.io.PrintWriter out)
          Asks the channel to render its content as characters.
 void renderXML(org.xml.sax.ContentHandler out)
          Ask channel to render its content.
 void setMessage(java.lang.String m)
           
 void setPortalControlStructures(PortalControlStructures pcs)
          Passes portal control structure to the channel.
 void setStaticData(ChannelStaticData sd)
          This is so CError can be used by getUserLayout() as a placeholder for channels that have either been deleted from the portal database or the users permission to use the channel has been removed (permanently or temporarily).
 
Methods inherited from class org.jasig.portal.channels.BaseChannel
getRuntimeProperties, receiveEvent, setRuntimeData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jasig.portal.IChannel
getRuntimeProperties, receiveEvent, setRuntimeData
 

Field Detail

GENERAL_ERROR

public static final int GENERAL_ERROR
See Also:
Constant Field Values

RENDER_TIME_EXCEPTION

public static final int RENDER_TIME_EXCEPTION
See Also:
Constant Field Values

SET_STATIC_DATA_EXCEPTION

public static final int SET_STATIC_DATA_EXCEPTION
See Also:
Constant Field Values

SET_RUNTIME_DATA_EXCEPTION

public static final int SET_RUNTIME_DATA_EXCEPTION
See Also:
Constant Field Values

TIMEOUT_EXCEPTION

public static final int TIMEOUT_EXCEPTION
See Also:
Constant Field Values

SET_PCS_EXCEPTION

public static final int SET_PCS_EXCEPTION
See Also:
Constant Field Values

CHANNEL_AUTHORIZATION_EXCEPTION

public static final int CHANNEL_AUTHORIZATION_EXCEPTION
See Also:
Constant Field Values

CHANNEL_MISSING_EXCEPTION

public static final int CHANNEL_MISSING_EXCEPTION
See Also:
Constant Field Values

GENERAL_RENDERING_EXCEPTION

public static final int GENERAL_RENDERING_EXCEPTION
See Also:
Constant Field Values

INTERNAL_TIMEOUT_EXCEPTION

public static final int INTERNAL_TIMEOUT_EXCEPTION
See Also:
Constant Field Values

AUTHORIZATION_EXCEPTION

public static final int AUTHORIZATION_EXCEPTION
See Also:
Constant Field Values

RESOURCE_MISSING_EXCEPTION

public static final int RESOURCE_MISSING_EXCEPTION
See Also:
Constant Field Values
Constructor Detail

CError

public CError()

CError

public CError(int errorCode,
              java.lang.Throwable exception,
              java.lang.String channelSubscribeId,
              IChannel channelInstance)

CError

public CError(int errorCode,
              java.lang.String message,
              java.lang.String channelSubscribeId,
              IChannel channelInstance)

CError

public CError(int errorCode,
              java.lang.Throwable exception,
              java.lang.String channelSubscribeId,
              IChannel channelInstance,
              java.lang.String message)
Method Detail

setMessage

public void setMessage(java.lang.String m)

setPortalControlStructures

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

Specified by:
setPortalControlStructures in interface IPrivileged
See Also:
PortalControlStructures

setStaticData

public void setStaticData(ChannelStaticData sd)
This is so CError can be used by getUserLayout() as a placeholder for channels that have either been deleted from the portal database or the users permission to use the channel has been removed (permanently or temporarily).

Specified by:
setStaticData in interface IChannel
Overrides:
setStaticData in class BaseChannel

renderXML

public void renderXML(org.xml.sax.ContentHandler out)
Description copied from interface: IChannel
Ask channel to render its content.

Specified by:
renderXML in interface IChannel
Overrides:
renderXML in class BaseChannel

generateKey

public ChannelCacheKey generateKey()
Description copied from interface: ICacheable
Requests the channel to generate a key uniqly describing it's current state, and a description of key usage.

Specified by:
generateKey in interface ICacheable

isCacheValid

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

Specified by:
isCacheValid in interface ICacheable

renderCharacters

public void renderCharacters(java.io.PrintWriter out)
                      throws PortalException
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

uPortal 2.4.1
API Documentation