uPortal 2.4.1
API Documentation

org.jasig.portal
Class PortalException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.jasig.portal.PortalException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AuthorizationException, CachingException, GeneralRenderingException, GroupsException, InternalTimeoutException, LockingException, PortalSecurityException, ResourceMissingException

public class PortalException
extends java.lang.Exception

Base portal exception class. Information contained in this class allows ErrorChannel to handle errors gracefully. This class also reports itself to the ProblemsTable whenever it is instantiated. The Problems servlet displays recently reported PortalExceptions.

Version:
$Revision: 1.11 $
Author:
Peter Kharchenko
See Also:
Serialized Form

Constructor Summary
PortalException()
           
PortalException(ErrorID errorid)
           
PortalException(ErrorID errorid, java.lang.Exception exc)
           
PortalException(java.lang.Exception exc)
          Construct a new portal exception, recording the exception that originally caused the error.
PortalException(java.lang.String msg)
          Creates a new PortalException instance, with a contained text message.
PortalException(java.lang.String msg, boolean refresh, boolean reinstantiate)
           
PortalException(java.lang.String msg, java.lang.Exception exc)
           
PortalException(java.lang.String msg, java.lang.Exception exc, boolean refresh, boolean reinstantiate)
           
 
Method Summary
 boolean allowRefresh()
          Legacy support for badly named property accessor
 boolean allowReinstantiation()
          Legacy support for badly named property accessor
 ErrorID getErrorID()
           
 java.lang.String getMessage()
          Override Exception getMessage() method to append the recorded exception message, if applicable
 java.lang.String getParameter()
           
 java.lang.Exception getRecordedException()
          Retrieve an optionally recorded exception that caused the error.
 java.util.Date getTimestamp()
           
 boolean isLogPending()
           
 boolean isRefreshable()
          Check if user-mediated referesh is allowed.
 boolean isReinstantiable()
          Check if user-mediated reinstantiation is allowed.
 void printStackTrace()
          Overrides Exception printStackTrace() method
 void printStackTrace(java.io.PrintStream stream)
          Overrides Exception printStackTrace(PrintStream stream) method
 void printStackTrace(java.io.PrintWriter writer)
          Overrides Exception printStackTrace(PrintWriter writer) method to print recorded exception stack trace if applicable
 void setErrorID(ErrorID errorID)
           
 void setLogPending(boolean b)
           
 void setParameter(java.lang.String string)
           
 void setRecordedException(java.lang.Exception exc)
          Allows to record the exception that caused the error.
 void setRefreshable(boolean refresh)
          Set if the user should be presented with an option to retry the same operation on the component that has generated the error.
 void setReinstantiable(boolean reinstantiate)
          Set if the user should be presented with an option to reinstantiate the component (channel) that generated the error.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortalException

public PortalException()

PortalException

public PortalException(java.lang.Exception exc)
Construct a new portal exception, recording the exception that originally caused the error.

Parameters:
exc - an Exception value

PortalException

public PortalException(java.lang.String msg)
Creates a new PortalException instance, with a contained text message.

Parameters:
msg - a String value

PortalException

public PortalException(ErrorID errorid)

PortalException

public PortalException(java.lang.String msg,
                       java.lang.Exception exc)

PortalException

public PortalException(ErrorID errorid,
                       java.lang.Exception exc)

PortalException

public PortalException(java.lang.String msg,
                       boolean refresh,
                       boolean reinstantiate)

PortalException

public PortalException(java.lang.String msg,
                       java.lang.Exception exc,
                       boolean refresh,
                       boolean reinstantiate)
Method Detail

isRefreshable

public boolean isRefreshable()
Check if user-mediated referesh is allowed.


allowRefresh

public boolean allowRefresh()
Legacy support for badly named property accessor

Returns:
isRefreshable()

isReinstantiable

public boolean isReinstantiable()
Check if user-mediated reinstantiation is allowed.

Returns:
a boolean value

allowReinstantiation

public boolean allowReinstantiation()
Legacy support for badly named property accessor

Returns:
isRinstantiable();

getRecordedException

public java.lang.Exception getRecordedException()
Retrieve an optionally recorded exception that caused the error.

Returns:
an Exception value

setRefreshable

public void setRefreshable(boolean refresh)
Set if the user should be presented with an option to retry the same operation on the component that has generated the error.

Parameters:
refresh - a boolean value

setReinstantiable

public void setReinstantiable(boolean reinstantiate)
Set if the user should be presented with an option to reinstantiate the component (channel) that generated the error.

Parameters:
reinstantiate - a boolean value

setRecordedException

public void setRecordedException(java.lang.Exception exc)
Allows to record the exception that caused the error. The exception information can later be used in error reporting and user interaction.

Parameters:
exc - an Exception value

isLogPending

public boolean isLogPending()
Returns:
true if the log is pending, otherwise false

setLogPending

public void setLogPending(boolean b)
Parameters:
b -

getErrorID

public ErrorID getErrorID()
Returns:
the error ID

setErrorID

public void setErrorID(ErrorID errorID)
Parameters:
errorID -

getParameter

public java.lang.String getParameter()
Returns:
the parameter

setParameter

public void setParameter(java.lang.String string)
Parameters:
string -

getMessage

public java.lang.String getMessage()
Override Exception getMessage() method to append the recorded exception message, if applicable

Returns:
the message

printStackTrace

public void printStackTrace()
Overrides Exception printStackTrace() method


printStackTrace

public void printStackTrace(java.io.PrintWriter writer)
Overrides Exception printStackTrace(PrintWriter writer) method to print recorded exception stack trace if applicable


printStackTrace

public void printStackTrace(java.io.PrintStream stream)
Overrides Exception printStackTrace(PrintStream stream) method


getTimestamp

public java.util.Date getTimestamp()
Returns:
Returns the timestamp.

uPortal 2.4.1
API Documentation