|
Oracle Data-aware Controls Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.dacf.util.errormanager.ErrorMessage
The ErrorMessage class is an overloaded class and is used to define an error. An ErrorMessage can define information which is either:
The default ErrorMessage class is without context (except for the source object). This is the generic error message and defines these attributes:
The source object is used by listeners to throw exceptions and possibly by non-buffered loggers to interact between user and the error stack.
The ErrorType, ErrorSeverity, ErrorMessageText attributes implement ErrorAttribute and Enumeration. The ErrorTimeStamp attribute is constructed by the class constructor. These attributes are context-less and are be used for indication, status checking, and so on.
The context-specific version of the ErrorMessage class contains these context-less attributes but also includes a Context attribute. The Context attribute allows you to define your own error messages by extending the ErrorMessage class and adding error-specific information.
To extend ErrorMessage, you must write an ErrorMessageContext class. This class holds all the information used by ErrorListeners to make veto descisions, or in the case of DACF controls, the information used by the NavigationManager. The ErrorMessageContext class can offer some of its Context as context-less information in the form of ErrorAttributes.
For an example of a context-specific ErrorMessage class, see the oracle.dacf.dataset.dacfErrorMessageContext class. It adds DacfContext (dataItem, row, control, related error) to ErrorMessage and provides a Context-description of all fields it wants to log to non-buffered loggers.
ErrorManager
,
ErrorAttribute
,
ErrorMessageContext
,
DacfErrorMessageContext
Constructor Summary | |
ErrorMessage(java.lang.Object source,
ErrorType type,
ErrorSeverity severity,
ErrorMessageText messageText)
Public constructor for the generic, context-less error message. |
|
ErrorMessage(java.lang.Object source,
ErrorType type,
ErrorSeverity severity,
ErrorMessageText messageText,
ErrorMessageContext context)
Public constructor which requires context-specific information to extend the error message. |
Method Summary | |
ErrorAttribute[] |
getAddedErrorAttributes()
A convience method that wraps the context-less _messageContext.getAddedErrorAttributes (provided by ErrorMessageContext class) in an array. |
ErrorMessageContext |
getErrorMessageContext()
Returns the message context which typically contains error-specific information. |
ErrorMessageText |
getMessageText()
Returns the message text and ID wrapped in an ErrorMessageText class. |
ErrorSeverity |
getSeverity()
Returns the error severity for this error message. |
java.lang.Object |
getSource()
Returns the source object that caused the error. |
ErrorTimeStamp |
getTimeStamp()
Returns the date and time that this error message was added to the ErrorManager. |
ErrorType |
getType()
Returns the error type for this error message. |
void |
setErrorMessageContext(ErrorMessageContext messageContext)
Extends the error message by specifying the error-specific context information. |
void |
setMessageText(ErrorMessageText messageText)
Specifies the error message text for this error message. |
void |
setSeverity(ErrorSeverity severity)
Specifies the error severity for this error message. |
void |
setSource(java.lang.Object src)
Specifies the source object that caused the error. |
void |
setType(ErrorType type)
Specifies the the error type for this error message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ErrorMessage(java.lang.Object source, ErrorType type, ErrorSeverity severity, ErrorMessageText messageText)
source
- the source object.type
- the error type.severity
- the error severity.messageText
- the error message.public ErrorMessage(java.lang.Object source, ErrorType type, ErrorSeverity severity, ErrorMessageText messageText, ErrorMessageContext context)
source
- the source object.type
- the error type.severity
- the error severity.messageText
- the error message.context
- the context extending this error message.Method Detail |
public java.lang.Object getSource()
public void setSource(java.lang.Object src)
src
- the source causing the error.public ErrorTimeStamp getTimeStamp()
public ErrorType getType()
public void setType(ErrorType type)
type
- the error type.public ErrorSeverity getSeverity()
public void setSeverity(ErrorSeverity severity)
severity
- severity of this error.public ErrorMessageText getMessageText()
public void setMessageText(ErrorMessageText messageText)
messageText
- the error message text.public ErrorMessageContext getErrorMessageContext()
public void setErrorMessageContext(ErrorMessageContext messageContext)
messageContext
- the context of this message.public ErrorAttribute[] getAddedErrorAttributes()
ErrorMessageContext.getAddedErrorAttributes()
|
Oracle Data-aware Controls Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2003, Oracle. All rights reserved.