java.lang.Object | ||
↳ | com.microstrategy.utils.config.AbstractConfigurationElement | |
↳ | com.microstrategy.web.app.ErrorInfo |
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.
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates an ErrorInfo with the information in the Xml Node. Internally
it calls initFromXML(Node)
.
root | the xml node. |
---|
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.
Returns whether the application should render the title, message, and contact information when the error occurs.
The code identifies the error. This can be an error code from the Intelligence Server or a value from the EnumWebAppErrorCodes interface.
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.
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. TODO: Enhance this method to properly consider useOriginalMessage option. It should either take in the original message as an additional parameter, or potentially the Exception/error. However, the errors and exceptions don't always have a common parent or common way of retrieving the original message, so passing the original string would probably be best.
Returns the list of messages associated with this error. The error message displayed to the user will be the linear concatenation of these.
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.
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.
Returns the list of titles to display for this error. The final title displayed to the user will be the linear concatenation of them.
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.
Indicates whether the application should render the title, message, and contact information when the error occurs.
Set code that identifies the error. This can be an error code from the Intelligence Server or a value from the EnumWebAppErrorCodes interface.
Set error type
Indicates whether the application should render the contact information (if available) from the Project Defaults page when error information is displayed to the user.
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.
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.)
Returns whether the application should render the contact information (if available) from the Project Defaults page when error information is displayed to the user.
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.)
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.
This method can be overridden to set default values for attributes. Simply
extend this method and call setAttribute(String, Object)