Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal
Class PortalException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              org.jasig.portal.PortalException

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  AuthorizationException, CachingException, CasProxyTicketAcquisitionException, 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.12 $
Author:
  Peter Kharchenko
See Also:
  Serialized Form

Field Summary
`(package private) ErrorID` | `errorID` ErrorID categorizing this PortalException instance.
`private org.apache.commons.logging.Log` | `log`
`(package private) boolean` | `logPending` True if logging is pending on this exception instance (has not yet been logged but potentially will be).
`(package private) java.lang.String` | `parameter` Parameter to the ErrorID's template message.
`(package private) boolean` | `refreshable` should the user be given an option to retry rendering that same channel instance
`(package private) boolean` | `reinstantiable` should the user be given an option to reinstantiate the channel in a given session
`(package private) java.util.Date` | `timestamp` The time at which this PortalException instance was instantiated.

Constructor Summary
`PortalException()` Instantiate a generic PortalException.
`PortalException(ErrorID errorid)` Instantiate a PortalException representing an instance of the type of error represented by the given ErrorID.
`PortalException(ErrorID errorid, java.lang.Throwable cause)` Instantiate a PortalException representing an instance of the type of error represented by the given ErrorID, with the given underlying cause.
`PortalException(java.lang.String msg)` Creates a new `PortalException` instance, with a contained text message.
`PortalException(java.lang.String msg, boolean refresh, boolean reinstantiate)` Instantiate a PortalException with the given message and refresh, reinstantiate state.
`PortalException(java.lang.String msg, java.lang.Throwable cause)` Instantiate a PortalException with the given message and underlying cause.
`PortalException(java.lang.String msg, java.lang.Throwable cause, boolean refresh, boolean reinstantiate)` Instantiate a PortalException with the given message, underlying cause, refresh, and reinstantiate state.
`PortalException(java.lang.Throwable cause)` Construct a new portal exception, recording an underlying cause.

Method Summary
`boolean` | `allowRefresh()` Deprecated. use isRefreshable().
`boolean` | `allowReinstantiation()` Deprecated. use isReinstantiable()
`ErrorID` | `getErrorID()` Get the ErrorID representing the type of this error.
`java.lang.String` | `getParameter()` Get the parameter to the ErrorID template message.
`java.lang.Exception` | `getRecordedException()` Deprecated. - use Throwable.getCause()
`java.util.Date` | `getTimestamp()` Get the Date at which this PortalException instance was instantiated.
`boolean` | `isLogPending()` Determine whether logging is pending on this PortalException.
`boolean` | `isRefreshable()` Check if user-mediated referesh is allowed.
`boolean` | `isReinstantiable()` Check if user-mediated reinstantiation is allowed.
`void` | `setErrorID(ErrorID errorID)` Set the ErrorID categorizing this PortalException.
`void` | `setLogPending(boolean b)` Set whether logging is pending on this PortalException.
`void` | `setParameter(java.lang.String string)` Set the parameter to the ErrorID template message.
`void` | `setRecordedException(java.lang.Exception exc)` Deprecated. use initCause() instead.
`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, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### log

    private final org.apache.commons.logging.Log log

### reinstantiable

    boolean reinstantiable

  should the user be given an option to reinstantiate the channel in a given session

### refreshable

    boolean refreshable

  should the user be given an option to retry rendering that same channel instance

### logPending

    boolean logPending

  True if logging is pending on this exception instance (has not yet been logged but potentially will be). True if all the logging that ought to happen has happened.

### errorID

    ErrorID errorID

  ErrorID categorizing this PortalException instance.

### parameter

    java.lang.String parameter

  Parameter to the ErrorID's template message.

### timestamp

    java.util.Date timestamp

  The time at which this PortalException instance was instantiated.

Constructor Detail

### PortalException

    public PortalException()

  Instantiate a generic PortalException. Instantiating a bare, no-message, no ErrorID, no frills PortalException is pretty anti-social. Wouldn't you rather use a constructor that provides more information?

### PortalException

    public PortalException(java.lang.Throwable cause)

  Construct a new portal exception, recording an underlying cause.

  Parameters:
    `cause` - a `Throwable` causing this exception

### PortalException

    public PortalException(java.lang.String msg)

  Creates a new `PortalException` instance, with a contained text message.

  Parameters:
    `msg` - describes exceptional condition

### PortalException

    public PortalException(ErrorID errorid)

  Instantiate a PortalException representing an instance of the type of error represented by the given ErrorID.

  Parameters:
    `errorid` - - type of error

### PortalException

    public PortalException(java.lang.String msg,
                           java.lang.Throwable cause)

  Instantiate a PortalException with the given message and underlying cause.

  Parameters:
    `msg` - - message describing the error
    `cause` - - underlying cause of the error

### PortalException

    public PortalException(ErrorID errorid,
                           java.lang.Throwable cause)

  Instantiate a PortalException representing an instance of the type of error represented by the given ErrorID, with the given underlying cause.

  Parameters:
    `errorid` - - type of error
    `cause` - - underlying cause of error.

### PortalException

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

  Instantiate a PortalException with the given message and refresh, reinstantiate state.

  Parameters:
    `msg` - - message describing the problem
    `refresh` - - whether refresh is appropriate response
    `reinstantiate` - - whether reinstantiate is appropriate response

### PortalException

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

  Instantiate a PortalException with the given message, underlying cause, refresh, and reinstantiate state.

  Parameters:
    `msg` - - message describing the problem
    `cause` - - underlying cause of problem
    `refresh` - - true if refresh is an appropriate response
    `reinstantiate` - - true if reinstantiate is an appropriate response

Method Detail

### isRefreshable

    public boolean isRefreshable()

  Check if user-mediated referesh is allowed.

  Returns:
    true if refresh allowed, false otherwise.

### allowRefresh

    public boolean allowRefresh()

  Deprecated. use isRefreshable().

  Legacy support for old name of property accessor.

  Returns:
    isRefreshable()

### isReinstantiable

    public boolean isReinstantiable()

  Check if user-mediated reinstantiation is allowed.

  Returns:
    true if reinstantiation allowed, false otherwise

### allowReinstantiation

    public boolean allowReinstantiation()

  Deprecated. use isReinstantiable()

  Legacy support for old name of property accessor

  Returns:
    isRinstantiable();

### getRecordedException

    public java.lang.Exception getRecordedException()

  Deprecated. - use Throwable.getCause()

  Retrieve an optionally recorded exception that caused the error.

  Returns:
    the cause if it is an Exception

### 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)

  Deprecated. use initCause() instead.

  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()

  Determine whether logging is pending on this PortalException.

  Returns:
    `true` if the log is pending, otherwise `false`

### setLogPending

    public void setLogPending(boolean b)

  Set whether logging is pending on this PortalException.

  Parameters:
    `b` - true if logging is pending

### getErrorID

    public ErrorID getErrorID()

  Get the ErrorID representing the type of this error.

  Returns:
    the error ID

### setErrorID

    public void setErrorID(ErrorID errorID)

  Set the ErrorID categorizing this PortalException.

  Parameters:
    `errorID` - the ErrorID categorizing this PortalException.

### getParameter

    public java.lang.String getParameter()

  Get the parameter to the ErrorID template message.

  Returns:
    the parameter

### setParameter

    public void setParameter(java.lang.String string)

  Set the parameter to the ErrorID template message.

  Parameters:
    `string` - - parameter to ErrorID template message.

### getTimestamp

    public java.util.Date getTimestamp()

  Get the Date at which this PortalException instance was instantiated.

  Returns:
    Returns the timestamp.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD