com.retek.commons.gui.event
Class RErrorEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.retek.commons.gui.event.RErrorEvent
All Implemented Interfaces:
java.io.Serializable

public class RErrorEvent
extends java.util.EventObject

This class represents a generic RErrorEvent that has occurred in the client. It contains an error code that represents the key into the messages properties file. Each value assigned to the RErrorEvent represents a replacement value when using the MessageFormat class. RErrorEvent defaults to a "warning" severity level upon creation.

Retek Inc. Copyright (c) 2002

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RErrorEvent(java.lang.Object source, java.lang.String errorCode)
          Returns new RErrorEvent object.
RErrorEvent(java.lang.Object source, java.lang.String errorCode, java.lang.String valueOne)
          Returns new RErrorEvent object.
RErrorEvent(java.lang.Object source, java.lang.String errorCode, java.lang.String valueOne, java.lang.String valueTwo)
          Creates new RErrorEvent object.
 
Method Summary
 void addErrorValue(java.lang.String value)
          Adds an error value to the stored error values.
 java.lang.String getErrorCode()
          Retrieves the error code for the error event.
 java.lang.String getErrorValue(int index)
          Retrieves a single error value stored in the RErrorEvent by index.
 java.lang.String getMessage()
          Retrieves an internationally translated error messages.
 ErrorSeverity getSeverity()
          Retrieves the severity level of the exception.
 void setErrorCode(java.lang.String errorCode)
          Sets the error code for the error event.
 void setSeverity(ErrorSeverity severity)
          Sets the severity level of the exception.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RErrorEvent

public RErrorEvent(java.lang.Object source,
                   java.lang.String errorCode)
Returns new RErrorEvent object.

Parameters:
source - The object that generated the event.
errorCode - The error code to translate into an error message.

RErrorEvent

public RErrorEvent(java.lang.Object source,
                   java.lang.String errorCode,
                   java.lang.String valueOne)
Returns new RErrorEvent object. All error values should already be formatted to the correct locale before being assigned to the error event.

Parameters:
source - The object that generated the event.
errorCode - The error code to translate into an error message.
valueOne - The first value to substitute in the error message.

RErrorEvent

public RErrorEvent(java.lang.Object source,
                   java.lang.String errorCode,
                   java.lang.String valueOne,
                   java.lang.String valueTwo)
Creates new RErrorEvent object. All error values should already be formatted to the correct locale before being assigned to the error event.

Parameters:
source - The object that generated the event.
errorCode - The error code to translate into an error message.
valueOne - The first value to substitute in the error message.
valueTwo - The second value to substitute in the error message.
Method Detail

setErrorCode

public void setErrorCode(java.lang.String errorCode)
Sets the error code for the error event.

Parameters:
errorCode - The error code to set in the event.

getErrorCode

public java.lang.String getErrorCode()
Retrieves the error code for the error event.

Returns:
The error code of this event.

addErrorValue

public void addErrorValue(java.lang.String value)
Adds an error value to the stored error values.

Parameters:
value - A single error value.

getErrorValue

public java.lang.String getErrorValue(int index)
Retrieves a single error value stored in the RErrorEvent by index. This index begins with one (1) and goes up to the number of values assigned to the error. If the index is out of range, an empty string is returned.


getMessage

public java.lang.String getMessage()
Retrieves an internationally translated error messages.

Returns:
The internationally translated error message.

setSeverity

public void setSeverity(ErrorSeverity severity)
Sets the severity level of the exception. The default value is ErrorSeverity.WARNING..

Parameters:
severity - The severity level .

getSeverity

public ErrorSeverity getSeverity()
Retrieves the severity level of the exception.

Returns:
The severity level.


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28