com.filenet.wcm.toolkit.server.util
Class FrameworkException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.filenet.wcm.toolkit.server.util.FrameworkException
All Implemented Interfaces:
java.io.Serializable

public class FrameworkException
extends java.lang.Exception

A renderable exception / wrapper that is generated and thrown from hooks into the toolkit framework page cycle (event/render) via low-level try/catch blocks. Can be caught and rethrown without obscuring the original stack trace, since the "stack trace" and "message" accessors wrap the Throwable passed in the constructor. Construction collects sufficient information to call the WcmErrorMessageBox.render static call.

See Also:
Serialized Form

Field Summary
protected  java.util.List anchorLinks
           
protected  java.lang.Throwable cause
           
protected  java.util.Map extraParameters
           
protected  boolean isWarning
           
protected  WcmAnchor signOutAnchor
           
protected  java.lang.String weReturnURL
           
 
Constructor Summary
FrameworkException(java.lang.Throwable cause, java.lang.String baseURL, boolean isWarning, boolean showHelpLink, java.util.List anchorLinks)
          This constructor allows total control over the links shown at the bottom of the WcmErrorMessageBox display.
FrameworkException(java.lang.Throwable cause, java.lang.String baseURL, java.lang.String pageName, WindowID wid, boolean windowSignedIn)
           
FrameworkException(java.lang.Throwable cause, java.lang.String baseURL, java.lang.String pageName, WindowID wid, boolean windowSignedIn, boolean isWarning)
          Create a FrameworkException object that can optionally be displayed as a warning (no stack trace is shown).
FrameworkException(java.lang.Throwable cause, java.lang.String baseURL, java.lang.String pageName, WindowID wid, boolean windowSignedIn, java.util.Locale locale)
          Create a FrameworkException object..
 
Method Summary
protected  void configureCloseURL(boolean windowSignedIn, boolean isPopup)
           
protected  void configureHelpURL(java.lang.String baseURL)
           
protected  void configureReturnURL(java.lang.String baseURL, java.lang.String pageName, java.lang.String weReturnURL, WindowID wid)
           
protected  void configureSignoutURL(boolean windowSignedIn, boolean isMainWindow, java.lang.String baseURL)
           
 java.lang.String extractStackTrace()
           
 java.lang.Throwable getCauseException()
          Get the exception object wrapped by this exception object.
 java.lang.String getLocalizedMessage()
           
 java.lang.String getMessage()
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream printStream)
           
 void printStackTrace(java.io.PrintWriter printWriter)
           
 void renderErrorMessageBox(javax.servlet.http.HttpServletRequest request, java.io.Writer w)
          Renders the WcmErrorMessageBox display based on the parameters that were passed in.
 void renderErrorMessageBox(java.io.Writer w)
          Deprecated. - Use renderErrorMessageBox(HttpServletRequest, Writer)
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cause

protected java.lang.Throwable cause

extraParameters

protected java.util.Map extraParameters

weReturnURL

protected java.lang.String weReturnURL

isWarning

protected boolean isWarning

anchorLinks

protected java.util.List anchorLinks

signOutAnchor

protected WcmAnchor signOutAnchor
Constructor Detail

FrameworkException

public FrameworkException(java.lang.Throwable cause,
                          java.lang.String baseURL,
                          java.lang.String pageName,
                          WindowID wid,
                          boolean windowSignedIn)

FrameworkException

public FrameworkException(java.lang.Throwable cause,
                          java.lang.String baseURL,
                          java.lang.String pageName,
                          WindowID wid,
                          boolean windowSignedIn,
                          java.util.Locale locale)
Create a FrameworkException object..

Parameters:
cause - The cause exception being wrapped (required).
baseURL - The baseURL value for the application (required).
pageName - The page name qualified relative to the application base URL, as returned from WcmController.getPageName() (required).
wid - The window ID object as returned from WcmController.getWindowIdObject() (required).

FrameworkException

public FrameworkException(java.lang.Throwable cause,
                          java.lang.String baseURL,
                          java.lang.String pageName,
                          WindowID wid,
                          boolean windowSignedIn,
                          boolean isWarning)
Create a FrameworkException object that can optionally be displayed as a warning (no stack trace is shown).

Parameters:
cause - The cause exception being wrapped (required).
baseURL - The baseURL value for the application (required).
pageName - The page name qualified relative to the application base URL, as returned from WcmController.getPageName() (required).
wid - The window ID object as returned from WcmController.getWindowIdObject() (required).
windowSignedIn - Specify if the windowId represents the first windowId accessed after sign-in.
isWarning - Secify whether or not this message is a warning. If true, the show/hide details link is hidden.

FrameworkException

public FrameworkException(java.lang.Throwable cause,
                          java.lang.String baseURL,
                          boolean isWarning,
                          boolean showHelpLink,
                          java.util.List anchorLinks)
This constructor allows total control over the links shown at the bottom of the WcmErrorMessageBox display.

Parameters:
cause - The cause exception being wrapped (required).
baseURL - The baseURL value for the application (required).
isWarning - Secify whether or not this message is a warning. If true, the show/hide details link is hidden.
showHelpLink - Specify whether or not to show the help link.
anchorLinks - A list of anchor links to show in addition to the show/hide details and help link (optional).
Method Detail

configureHelpURL

protected void configureHelpURL(java.lang.String baseURL)

configureSignoutURL

protected void configureSignoutURL(boolean windowSignedIn,
                                   boolean isMainWindow,
                                   java.lang.String baseURL)

configureCloseURL

protected void configureCloseURL(boolean windowSignedIn,
                                 boolean isPopup)

configureReturnURL

protected void configureReturnURL(java.lang.String baseURL,
                                  java.lang.String pageName,
                                  java.lang.String weReturnURL,
                                  WindowID wid)

getCauseException

public java.lang.Throwable getCauseException()
Get the exception object wrapped by this exception object.

Returns:
Throwable

renderErrorMessageBox

public void renderErrorMessageBox(java.io.Writer w)
                           throws java.io.IOException
Deprecated. - Use renderErrorMessageBox(HttpServletRequest, Writer)

Throws:
java.io.IOException

renderErrorMessageBox

public void renderErrorMessageBox(javax.servlet.http.HttpServletRequest request,
                                  java.io.Writer w)
                           throws java.io.IOException
Renders the WcmErrorMessageBox display based on the parameters that were passed in.

Parameters:
request -
w -
Throws:
java.io.IOException

getLocalizedMessage

public java.lang.String getLocalizedMessage()

getMessage

public java.lang.String getMessage()

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(java.io.PrintStream printStream)

printStackTrace

public void printStackTrace(java.io.PrintWriter printWriter)

toString

public java.lang.String toString()

extractStackTrace

public java.lang.String extractStackTrace()


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.