|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.channels.BaseChannel
org.jasig.portal.channels.error.CError
public final class CError
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:
Nested Class Summary | |
---|---|
private class |
CError.RefreshPolicy
Class to represent policy about whether channel refresh and reinstantiation is allowed. |
Field Summary | |
---|---|
private ErrorDocument |
errorDocument
An ErrorDocument representing the error about which we are reporting and providing a source for XML to be rendered by our XSLT. |
private static org.apache.commons.logging.Log |
log
|
private static MediaManager |
MEDIAMANAGER
|
private boolean |
placeHolder
CError is a placeholder when it is taking the place of a channel that no longer exists or that the user doesn't have permission to render. |
private PortalControlStructures |
portcs
|
private boolean |
showStackTrace
True if we should display the stack trace of the stored Throwable, if any, at rendering. |
private static java.lang.String |
sslLocation
The location of our our .ssl file. |
private java.lang.String |
ssTitle
The title of the stylesheet we should use to render. |
private IChannel |
the_channel
The channel instance that failed. |
Fields inherited from class org.jasig.portal.channels.BaseChannel |
---|
runtimeData, staticData |
Constructor Summary | |
---|---|
CError()
Construct an uninitialized instance of the CError channel. |
|
CError(ErrorCode errorCode,
java.lang.String message,
java.lang.String channelSubscribeId,
IChannel channelInstance)
Instantiate a CError representing a particular channel's failure, including a message and errorCode, but not a Throwable. |
|
CError(ErrorCode errorCode,
java.lang.Throwable throwable,
java.lang.String channelSubscribeId,
IChannel channelInstance)
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,
java.lang.Throwable exception,
java.lang.String channelSubscribeId,
IChannel channelInstance,
java.lang.String message)
Instantiate a CError instance representing the failure of some particular channel, including an error code, message, and the Throwable. |
Method Summary | |
---|---|
private CError.RefreshPolicy |
computeRefreshPolicy()
Compute the refresh policy. |
ChannelCacheKey |
generateKey()
Requests the channel to generate a key uniqly describing it's current state, and a description of key usage. |
ErrorDocument |
getErrorDocument()
|
boolean |
isCacheValid(java.lang.Object validity)
Requests the channel to verify validity of the retreived cache based on the validator object. |
(package private) boolean |
isPlaceHolder()
Returns true iff this CError instance is acting as a placeholder. |
private void |
localRenderXML(org.xml.sax.ContentHandler out)
|
void |
receiveEvent(PortalEvent ev)
Passes an outside event to a channel. |
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. |
private void |
resetCError(ErrorCode errorCode,
java.lang.Throwable throwable,
java.lang.String channelSubscribeId,
IChannel channelInstance,
java.lang.String message)
Resets internal state of CError. |
void |
setErrorDocument(ErrorDocument errorDocument)
|
(package private) void |
setPlaceHolder(boolean placeHolder)
Configure this CError instance to act as a placeholder. |
void |
setPortalControlStructures(PortalControlStructures pcs)
Passes portal control structure to the channel. |
void |
setStaticData(ChannelStaticData sd)
Passes ChannelStaticData to the channel. |
java.lang.String |
toString()
|
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 |
Methods inherited from interface org.jasig.portal.IChannel |
---|
getRuntimeProperties, setRuntimeData |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private ErrorDocument errorDocument
private IChannel the_channel
private boolean placeHolder
private boolean showStackTrace
private java.lang.String ssTitle
private PortalControlStructures portcs
private static final java.lang.String sslLocation
private static final MediaManager MEDIAMANAGER
Constructor Detail |
---|
public CError()
public CError(ErrorCode errorCode, java.lang.Throwable throwable, java.lang.String channelSubscribeId, IChannel channelInstance)
errorCode
- -
one of the static error codes of this classthrowable
- -
cause of failed channel's failurechannelSubscribeId
- -
identifies the failed channelchannelInstance
- -
the failed channelpublic CError(ErrorCode errorCode, java.lang.String message, java.lang.String channelSubscribeId, IChannel channelInstance)
errorCode
- -
one of the static error codes of this classmessage
- -
describes errorchannelSubscribeId
- -
identifies failed channelchannelInstance
- -
failed channelpublic CError(ErrorCode errorCode, java.lang.Throwable exception, java.lang.String channelSubscribeId, IChannel channelInstance, java.lang.String message)
errorCode
- -
one of the static error codes of this classexception
- -
thrown by the failed channelchannelSubscribeId
- -
identifies failed channelchannelInstance
- -
the failed channel instancemessage
- -
message describing failureMethod Detail |
---|
private void resetCError(ErrorCode errorCode, java.lang.Throwable throwable, java.lang.String channelSubscribeId, IChannel channelInstance, java.lang.String message)
errorCode
- -
new errorCode valuethrowable
- -
new stored ThrowablechannelSubscribeId
- -
new channelSubscribeIdchannelInstance
- -
new failed channelmessage
- -
new failure messagepublic void setPortalControlStructures(PortalControlStructures pcs)
IPrivileged
setPortalControlStructures
in interface IPrivileged
PortalControlStructures
public void receiveEvent(PortalEvent ev)
IChannel
receiveEvent
in interface IChannel
receiveEvent
in class BaseChannel
ev
- PortalEvent objectPortalEvent
public void setStaticData(ChannelStaticData sd)
IChannel
setStaticData
in interface IChannel
setStaticData
in class BaseChannel
sd
- channel static dataChannelStaticData
public void renderXML(org.xml.sax.ContentHandler out)
IChannel
renderXML
in interface IChannel
renderXML
in class BaseChannel
out
- the SAX ContentHandler to output content toprivate void localRenderXML(org.xml.sax.ContentHandler out)
public ChannelCacheKey generateKey()
ICacheable
generateKey
in interface ICacheable
public boolean isCacheValid(java.lang.Object validity)
ICacheable
isCacheValid
in interface ICacheable
public void renderCharacters(java.io.PrintWriter out) throws PortalException
ICharacterChannel
renderCharacters
in interface ICharacterChannel
out
- a PrintWriter
value into which the character output should be directed
PortalException
- if an error occursprivate CError.RefreshPolicy computeRefreshPolicy()
public ErrorDocument getErrorDocument()
public void setErrorDocument(ErrorDocument errorDocument)
errorDocument
- The errorDocument to set.boolean isPlaceHolder()
void setPlaceHolder(boolean placeHolder)
placeHolder
- true to suppress refresh and renew controls, false otherwisepublic java.lang.String toString()
toString
in class BaseChannel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |