com.plumtree.uiinfrastructure.errordisplay
Class UIError

java.lang.Object
  extended by com.plumtree.uiinfrastructure.errordisplay.UIError

public class UIError
extends java.lang.Object

Author:
Ben Geislinger UIError objects describe an error condition that needs to be communicated to one or more users of the portal.

UI code encountering an error condition should create a new UIError object, configure that UIError as appropriate, and raise it using the PTErrorHandler class. Error messages will then be generated and displayed as appropriate.

Constructor Summary
UIError(UIErrorLevel level, UIErrorScope scope, java.lang.Exception exception, java.lang.String message, java.lang.String extendedMessage)
          Creates a new UIError object.
UIError(UIErrorLevel level, UIErrorScope scope, java.lang.String message, java.lang.String extendedMessage)
          Creates a new UIError object.
 
Method Summary
 java.lang.String GetActivitySpace()
          Call this method to determine the activity space with which this error is associated.
 boolean GetClearWithActivitySpaceChange()
          Call this method to determine whether or not this error should be cleared when the user changes activity spaces.
 boolean GetDisplayOnSeparatePage()
          Call this method to determine whether or not the error message for this UIError object should be displayed on a separate ui page.
 java.lang.Exception GetException()
          Call this method to obtain the Exception associated with this error.
 java.lang.String GetExtendedMessage()
          Call this method to obtain the extended message of this error.
 HTMLElement GetHTMLMessage()
          Call this method to obtain the HTMLElement message displayed with this error.
 boolean GetImmediateClear()
           
 UIErrorLevel GetLevel()
           
 boolean GetManualClear()
          TODOCR JF 12/10/02 - Javadoc?
 java.lang.String GetMessage()
          Call this method to obtain the String message displayed along with this error.
 UIErrorScope GetScope()
           
 java.lang.String GetSessionKey()
          Call this method to obtain the key with which this error was stored on the user's session or application.
 java.lang.String GetTitle()
          Call this method to obtain the title of this error.
 void SetActivitySpace(java.lang.String sName)
          Call this method to associate this error with an activity space.
 void SetClearWithActivitySpaceChange(boolean b)
          Call this method to toggle whether or not this error should be cleared from memory when the user changes activity spaces.
 void SetDisplayOnSeparatePage(boolean b)
          Call this method to toggle whether or not the error message for this UIError object should be displayed on a separate ui page.
 void SetException(java.lang.Exception ex)
          Call this method to set the Exception included within this error.
 void SetHTMLMessage(HTMLElement e)
          Call this method to set the message displayed along with this error.
 void SetImmediateClear(boolean b)
           
 void SetManualClear(boolean b)
          TODOCR JF 12/10/02 - What is this doing? No Javadoc?
 void SetSessionKey(java.lang.String s)
          Call this method to set the session key that was used to store this error on the user's session or application.
 void SetTitle(java.lang.String title)
          Call this method to set the title of this error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIError

public UIError(UIErrorLevel level,
               UIErrorScope scope,
               java.lang.Exception exception,
               java.lang.String message,
               java.lang.String extendedMessage)
Creates a new UIError object.

Parameters:
level - UIErrorLevel enumeration indicates the severity of this error.
scope - UIErrorScope enumeration indicates the intended audience of this error.
exception - Previously caught exception might provide valuable clues to debuggers.
message - This message will be displayed to the user.
extendedMessage - This message will be embedded in HTML comments.

UIError

public UIError(UIErrorLevel level,
               UIErrorScope scope,
               java.lang.String message,
               java.lang.String extendedMessage)
Creates a new UIError object.

Parameters:
level - UIErrorLevel enumeration indicates the severity of this error.
scope - UIErrorScope enumeration indicates the intended audience of this error.
message - This message will be displayed to the user.
extendedMessage - This message will be embedded in HTML comments.
Method Detail

GetActivitySpace

public java.lang.String GetActivitySpace()
Call this method to determine the activity space with which this error is associated. This method returns null if this error is not associated with an activity space.

Returns:
String name of the activity space.

GetClearWithActivitySpaceChange

public boolean GetClearWithActivitySpaceChange()
Call this method to determine whether or not this error should be cleared when the user changes activity spaces.

Returns:
boolean value

GetDisplayOnSeparatePage

public boolean GetDisplayOnSeparatePage()
Call this method to determine whether or not the error message for this UIError object should be displayed on a separate ui page.

Returns:
boolean value

GetException

public java.lang.Exception GetException()
Call this method to obtain the Exception associated with this error.

Returns:
Exception

GetExtendedMessage

public java.lang.String GetExtendedMessage()
Call this method to obtain the extended message of this error.

Returns:
String extended message

GetHTMLMessage

public HTMLElement GetHTMLMessage()
Call this method to obtain the HTMLElement message displayed with this error.

Returns:
HTMLElement message

GetImmediateClear

public boolean GetImmediateClear()
Returns:

GetLevel

public UIErrorLevel GetLevel()
Returns:

GetManualClear

public boolean GetManualClear()
TODOCR JF 12/10/02 - Javadoc?

Returns:

GetMessage

public java.lang.String GetMessage()
Call this method to obtain the String message displayed along with this error.

Returns:
String message.

GetScope

public UIErrorScope GetScope()
Returns:

GetSessionKey

public java.lang.String GetSessionKey()
Call this method to obtain the key with which this error was stored on the user's session or application.

Returns:
String value.

GetTitle

public java.lang.String GetTitle()
Call this method to obtain the title of this error.

Returns:
String title

SetActivitySpace

public void SetActivitySpace(java.lang.String sName)
Call this method to associate this error with an activity space. This error will only be seen by the user when the user is on the specified activity space.

Note that it does not make sense to associate this error with an activity space if this error gets its own display page, because the error display page is its own activity space.

Parameters:
sName - Pass the String name of the activity space.

SetClearWithActivitySpaceChange

public void SetClearWithActivitySpaceChange(boolean b)
Call this method to toggle whether or not this error should be cleared from memory when the user changes activity spaces. This clearing will only take affect if you also call the SetActivitySpace( String ) method to tie this error to an activity space.

Parameters:
b - boolean value

SetDisplayOnSeparatePage

public void SetDisplayOnSeparatePage(boolean b)
Call this method to toggle whether or not the error message for this UIError object should be displayed on a separate ui page.

Pass false to have this error displayed on the main portal or editor page. Pass true to have this error displayed on a separate page.

Parameters:
b - boolean value.

SetException

public void SetException(java.lang.Exception ex)
Call this method to set the Exception included within this error.

Information from this exception will be logged, but it will not be displayed to the user.

Parameters:
ex - Exception

SetHTMLMessage

public void SetHTMLMessage(HTMLElement e)
Call this method to set the message displayed along with this error.

An error can contain both a String message and an HTMLElement message, and both will be displayed along with the error.

Parameters:
e - HTMLElement message.

SetImmediateClear

public void SetImmediateClear(boolean b)
Parameters:
b -

SetManualClear

public void SetManualClear(boolean b)
TODOCR JF 12/10/02 - What is this doing? No Javadoc?

Parameters:
b -

SetTitle

public void SetTitle(java.lang.String title)
Call this method to set the title of this error.

This title will be displayed above the error description.

Parameters:
title - String title

SetSessionKey

public void SetSessionKey(java.lang.String s)
Call this method to set the session key that was used to store this error on the user's session or application.

Parameters:
s - String key.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.