org.jasig.portal.channels.error
Class ErrorCode

java.lang.Object
  extended by org.jasig.portal.channels.error.ErrorCode

public class ErrorCode
extends java.lang.Object

Error codes specific to the CError channel.

Since:
uPortal 2.5
Version:
$Revision: 1.3 $ $Date: 2005/04/17 20:53:22 $
Author:
andrew.petro@yale.edu

Field Summary
static ErrorCode CHANNEL_AUTHORIZATION_EXCEPTION
          Error code representing failure to render due to lack of authorization.
static ErrorCode CHANNEL_MISSING_EXCEPTION
          Error code representing the channel being just plain missing.
private static ErrorCode[] codeArray
           
private  int codeNumber
          Integer representing error code.
static ErrorCode GENERAL_ERROR
          Generic error code
private  java.lang.String label
          String label suggesting meaning of error code.
private  boolean refreshable
          True if channel refresh is an appropriate response to this error, false otherwise.
static ErrorCode RENDER_TIME_EXCEPTION
          Error code for failure during rendering.
static ErrorCode SET_PCS_EXCEPTION
          Error code representing failure when framework attempts to set channel portal control structures.
static ErrorCode SET_RUNTIME_DATA_EXCEPTION
          Error code for errors at time runtime data is set.
static ErrorCode SET_STATIC_DATA_EXCEPTION
          Error code for errors at time static data is set
static ErrorCode TIMEOUT_EXCEPTION
          Error code for channels that fail to complete rendering during allotted time.
static ErrorCode UNKNOWN_ERROR
          Generic error code
 
Constructor Summary
private ErrorCode(java.lang.String label, int codeNumber, boolean refreshable)
          Private constructor.
 
Method Summary
static ErrorCode codeForInt(int codeNum)
          Obtain the ErrorCode for the given code number, or null if the code number does not correspond to an error code.
 int getCode()
           
 java.lang.String getLabel()
           
 boolean isRefreshAllowed()
          Is this ErrorCode representative of a problem to which channel refresh would be an appropriate response.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN_ERROR

public static final ErrorCode UNKNOWN_ERROR
Generic error code


GENERAL_ERROR

public static final ErrorCode GENERAL_ERROR
Generic error code


RENDER_TIME_EXCEPTION

public static final ErrorCode RENDER_TIME_EXCEPTION
Error code for failure during rendering.


SET_STATIC_DATA_EXCEPTION

public static final ErrorCode SET_STATIC_DATA_EXCEPTION
Error code for errors at time static data is set


SET_RUNTIME_DATA_EXCEPTION

public static final ErrorCode SET_RUNTIME_DATA_EXCEPTION
Error code for errors at time runtime data is set.


TIMEOUT_EXCEPTION

public static final ErrorCode TIMEOUT_EXCEPTION
Error code for channels that fail to complete rendering during allotted time.


SET_PCS_EXCEPTION

public static final ErrorCode SET_PCS_EXCEPTION
Error code representing failure when framework attempts to set channel portal control structures.


CHANNEL_AUTHORIZATION_EXCEPTION

public static final ErrorCode CHANNEL_AUTHORIZATION_EXCEPTION
Error code representing failure to render due to lack of authorization.


CHANNEL_MISSING_EXCEPTION

public static final ErrorCode CHANNEL_MISSING_EXCEPTION
Error code representing the channel being just plain missing.


codeArray

private static ErrorCode[] codeArray

codeNumber

private final int codeNumber
Integer representing error code.


label

private final java.lang.String label
String label suggesting meaning of error code.


refreshable

private boolean refreshable
True if channel refresh is an appropriate response to this error, false otherwise.

Constructor Detail

ErrorCode

private ErrorCode(java.lang.String label,
                  int codeNumber,
                  boolean refreshable)
Private constructor.

Parameters:
label - - briefly describes error type
codeNumber - - integer representing error type
refreshable - - whether refresh is appropriate response
Method Detail

codeForInt

public static ErrorCode codeForInt(int codeNum)
Obtain the ErrorCode for the given code number, or null if the code number does not correspond to an error code.

Parameters:
codeNum -
Returns:
ErrorCode or null.

getCode

public int getCode()

getLabel

public java.lang.String getLabel()

isRefreshAllowed

public boolean isRefreshAllowed()
Is this ErrorCode representative of a problem to which channel refresh would be an appropriate response. Some ErrorCodes are representative of problems that refreshing just won't fix, such as a failure when setting static data.

Returns:
true if refresh is allowed, false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object