com.fatwire.cs.ui.exception
Class UIException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.fatwire.cs.ui.exception.UIException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LocalizedMessageException, UIServiceException

public class UIException
extends java.lang.Exception

This class is used to create and manage UI named exceptions with a specific name By doing so you are responsible for the lifecycle of adding and removing in to the interface via the UIExceptionManager.

See Also:
Serialized Form

Constructor Summary
protected UIException()
           
protected UIException(java.lang.String sExceptionName)
          Creates an exception with a specific name.
protected UIException(java.lang.String sExceptionName, java.lang.Throwable cause)
          Creates an exception with a specific name.
  UIException(java.lang.Throwable cause)
          Creates an exception with a nested exception
 
Method Summary
 java.lang.String getMessage()
          Abstract method must be implemented by exception who knows how to properly retrieve the internationalized error message.
 java.lang.String getName()
          Used to return the name of this exception
 ExceptionRenderer getRenderer()
          This method returns the default or customized renderer.
 UIComponent render()
          Renders this exception for the UI
 void setName(java.lang.String sName)
          Set the name of the exception if you wish to overide the standard lifecycle of displaying an error message (1 screen).
 void setRenderer(ExceptionRenderer renderer)
          This method overrides the default renderer.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UIException

protected UIException()

UIException

protected UIException(java.lang.String sExceptionName)
Creates an exception with a specific name.

Parameters:
sExceptionName - the name to assign to the exception

UIException

public UIException(java.lang.Throwable cause)
Creates an exception with a nested exception

Parameters:
cause - of the exception

UIException

protected UIException(java.lang.String sExceptionName,
                      java.lang.Throwable cause)
Creates an exception with a specific name.

Parameters:
sExceptionName -
cause - is the nested exception
Method Detail

getMessage

public java.lang.String getMessage()
Abstract method must be implemented by exception who knows how to properly retrieve the internationalized error message. i.e. via resource bundle or XLAT or whatever implementation

Overrides:
getMessage in class java.lang.Throwable
Returns:
Retrieves the internationalized error message for this exception

setRenderer

public void setRenderer(ExceptionRenderer renderer)
This method overrides the default renderer. Used if additional info is contained in the exception besides the error message;

Parameters:
renderer - the ExceptionRenderer capable of properly rendering this exception

getRenderer

public ExceptionRenderer getRenderer()
This method returns the default or customized renderer.

Returns:
renderer the ExceptionRenderer capable of properly rendering this exception

getName

public java.lang.String getName()
Used to return the name of this exception

Returns:
the name of this exception

setName

public void setName(java.lang.String sName)
Set the name of the exception if you wish to overide the standard lifecycle of displaying an error message (1 screen). If you set the name of the exception you are required to remove the exception manually using ExceptionManger.removeException

Parameters:
sName - the name to assign to the exception

render

public UIComponent render()
Renders this exception for the UI

Returns:
JSF component used to display error msg


Copyright (c) 2003 - 2011 FatWire Corporation All Rights Reserved.