public class

ErrorInfo

extends AbstractConfigurationElement
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.app.ErrorInfo

Class Overview

This class is used by the application to change the title and message of the error, to indicate whether the error is expected by the iframe in the event of an iframe request, or to find the page to which the user is redirected when the error occurs.

Summary

Nested Classes
class ErrorInfo.ErrorMessage Defines the message to be displayed in the error alert box. 
class ErrorInfo.ErrorTitle Defines the title to be displayed in the error alert box. 
Constants
String NODE_ERROR
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
ErrorInfo()
ErrorInfo(Node root)
Creates an ErrorInfo with the information in the Xml Node.
Public Methods
void addMessage(ErrorInfo.ErrorMessage msg)
void addTitle(ErrorInfo.ErrorTitle title)
boolean allowIframe()
Returns whether this error condition can happened within an iFrame request for partial page update.
boolean displayError()
Returns whether the application should render the title, message, and contact information when the error occurs.
int getErrorCode()
The code identifies the error.
int getErrorType()
The error type identifies what information will be displayed in the error message.
String getMessage(Messages messages)
Returns the string to display as Message for this error message.
AbstractConfigurationElement.FilteredList getMessageList()
Returns the list of messages associated with this error.
String getTarget()
The target attribute indicates the page to which the user should be redirected when the error occurs.
String getTitle(Messages messages)
Returns the string to display as title for this error message.
AbstractConfigurationElement.FilteredList getTitleList()
Returns the list of titles to display for this error.
void setAllowIframe(boolean value)
Indicates whether this error condition can happened within an iFrame request for partial page update.
void setDisplayError(boolean value)
Indicates whether the application should render the title, message, and contact information when the error occurs.
void setErrorCode(int errorCode)
Set code that identifies the error.
void setErrorType(int errorType)
Set error type
void setMessageElement(Object key, ConfigurationElement child)
void setShowContactInfo(boolean value)
Indicates whether the application should render the contact information (if available) from the Project Defaults page when error information is displayed to the user.
void setTarget(String target)
Set the target page.
void setUseOriginalMessage(boolean value)
Indicates whether the application should display the original error message returned by the error object.
boolean showContactInfo()
Returns whether the application should render the contact information (if available) from the Project Defaults page when error information is displayed to the user.
boolean useOriginalMessage()
Returns whether the application should display the original error message returned by the error object.
Protected Methods
String getKeyAttribute()
This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.
void initDefaultAttributes()
This method can be overridden to set default values for attributes.
[Expand]
Inherited Methods
From class com.microstrategy.utils.config.AbstractConfigurationElement
From class java.lang.Object
From interface com.microstrategy.utils.config.ConfigurationElement
From interface com.microstrategy.utils.config.ConfigurationFile

Constants

public static final String NODE_ERROR

Constant Value: "error"

Public Constructors

public ErrorInfo ()

public ErrorInfo (Node root)

Creates an ErrorInfo with the information in the Xml Node. Internally it calls initFromXML(Node).

Parameters
root the xml node.

Public Methods

public void addMessage (ErrorInfo.ErrorMessage msg)

public void addTitle (ErrorInfo.ErrorTitle title)

public boolean allowIframe ()

Returns whether this error condition can happened within an iFrame request for partial page update. If "false", even if it's an iframe-request, the whole page gets refreshed.

public boolean displayError ()

Returns whether the application should render the title, message, and contact information when the error occurs.

public int getErrorCode ()

The code identifies the error. This can be an error code from the Intelligence Server or a value from the EnumWebAppErrorCodes interface.

public int getErrorType ()

The error type identifies what information will be displayed in the error message. Possible values are: 1 - system error; 2 - user error. For system errors we display the title, info, and error message where the info looks like:

Your request could not be processed due to a server error.
Please try again. If the error persists, contact the server administrator.

For user errors we skip the info part.

public String getMessage (Messages messages)

Returns the string to display as Message for this error message. This string is the result of the concatenation of all the title nodes of this error. If a Messages instance is provided, the string will be localized using the strings bundle.

public AbstractConfigurationElement.FilteredList getMessageList ()

Returns the list of messages associated with this error. The error message displayed to the user will be the linear concatenation of these.

public String getTarget ()

The target attribute indicates the page to which the user should be redirected when the error occurs. If a target is not specified (it's either null or an empty string, the execution continues on the same page.

public String getTitle (Messages messages)

Returns the string to display as title for this error message. This string is the result of the concatenation of all the title nodes of this error. If a Messages instance is provided, the string will be localized using the strings bundle.

public AbstractConfigurationElement.FilteredList getTitleList ()

Returns the list of titles to display for this error. The final title displayed to the user will be the linear concatenation of them.

public void setAllowIframe (boolean value)

Indicates whether this error condition can happened within an iFrame request for partial page update. If "false", even if it's an iframe-request, the whole page gets refreshed.

public void setDisplayError (boolean value)

Indicates whether the application should render the title, message, and contact information when the error occurs.

public void setErrorCode (int errorCode)

Set code that identifies the error. This can be an error code from the Intelligence Server or a value from the EnumWebAppErrorCodes interface.

public void setErrorType (int errorType)

Set error type

public void setMessageElement (Object key, ConfigurationElement child)

public void setShowContactInfo (boolean value)

Indicates whether the application should render the contact information (if available) from the Project Defaults page when error information is displayed to the user.

public void setTarget (String target)

Set the target page. The target indicates the page to which the user should be redirected when the error occurs. If a target is not specified (it's either null or an empty string, the execution continues on the same page.

public void setUseOriginalMessage (boolean value)

Indicates whether the application should display the original error message returned by the error object. (This is the error message generated on the back-end.)

public boolean showContactInfo ()

Returns whether the application should render the contact information (if available) from the Project Defaults page when error information is displayed to the user.

public boolean useOriginalMessage ()

Returns whether the application should display the original error message returned by the error object. (This is the error message generated on the back-end.)

Protected Methods

protected String getKeyAttribute ()

This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.

protected void initDefaultAttributes ()

This method can be overridden to set default values for attributes. Simply extend this method and call setAttribute(String, Object)