IMC Epclient 5.0.3

at.spardat.enterprise.exc
Interface INotification

All Known Implementing Classes:
BaseException, Notification

public interface INotification

An INotification is a message that some business logic code wants to tell to its environment. This may be exceptional, informative or a question (as indicated by getType(). Besides having a detailed message (getMessage()), a notification may have a short message (getShortMessage()), that may be used in title bars if this notification is displayed in the presentation layer.

The recipient of a INotification who must handle it may discriminate among different notifications using an integer code, getCode(). The code should obey the following convention in order to ensure that codes from different applications or modules do not clash. The code should follow the form of 9 digit decimal number AAAMMMCCC, where

Codes 001xxxxxx are reservered for infrastructure like enterprise or XMA. A typical use of these kinds of codes is to define some module offset:
 public static final int          MY_MODULE = 55001000;
 
and to construct Notifications by adding offsets to the module constant:
 new Notification (...).setCode (MY_MODULE+5);
 
The piece of code that creates an INotification may also define the possible reactions the recipient should take when he receives the notification, see getReaction().

Author:
YSD, 21.05.2003 18:11:13

Field Summary
static int R_ABORT
          Indicates that the permissible user reaction(s) to this notification is ABORT.
static int R_ABORT_RETRY_IGNORE
          Indicates that the permissible user reaction(s) to this notification is ABORT, RETRY or IGNORE.
static int R_CANCEL
          Indicates that the permissible user reaction(s) to this notification is CANCEL.
static int R_IGNORE
          Indicates that the permissible user reaction(s) to this notification is IGNORE.
static int R_NO
          Indicates that the permissible user reaction(s) to this notification is NO.
static int R_OK
          Indicates that the permissible user reaction(s) to this notification is OK.
static int R_OK_CANCEL
          Indicates that the permissible user reaction(s) to this notification is OK or CANCEL.
static int R_RETRY
          Indicates that the permissible user reaction(s) to this notification is RETRY.
static int R_RETRY_CANCEL
          Indicates that the permissible user reaction(s) to this notification is RETRY or CANCEL.
static int R_YES
          Indicates that the permissible user reaction(s) to this notification is YES.
static int R_YES_NO
          Indicates that the permissible user reaction(s) to this notification is YES or NO.
static int R_YES_NO_CANCEL
          Indicates that the permissible user reaction(s) to this notification is YES, NO or CANCEL.
static int T_ERROR
          Indicates that the type of the notification is a error.
static int T_INFORMATION
          Indicates that the type of the notification is a information.
static int T_QUESTION
          Indicates that the type of the notification is a question.
static int T_WARNING
          Indicates that the type of the notification is a warning.
 
Method Summary
 int getCode()
          Returns the code.
 java.lang.String getMessage()
          Returns a fully descriptive text of this notification.
 int getReaction()
          Returns the permissible user reaction to the notification which is one of the constants starting with R_.
 java.lang.String getShortMessage()
          Returns a short text explaining this notification.
 int getType()
          Returns the type of this notification, that is one of the constants with praefix T_.
 

Field Detail

T_QUESTION

public static final int T_QUESTION
Indicates that the type of the notification is a question.

See Also:
Constant Field Values

T_INFORMATION

public static final int T_INFORMATION
Indicates that the type of the notification is a information.

See Also:
Constant Field Values

T_WARNING

public static final int T_WARNING
Indicates that the type of the notification is a warning.

See Also:
Constant Field Values

T_ERROR

public static final int T_ERROR
Indicates that the type of the notification is a error.

See Also:
Constant Field Values

R_OK

public static final int R_OK
Indicates that the permissible user reaction(s) to this notification is OK.

See Also:
Constant Field Values

R_CANCEL

public static final int R_CANCEL
Indicates that the permissible user reaction(s) to this notification is CANCEL.

See Also:
Constant Field Values

R_YES

public static final int R_YES
Indicates that the permissible user reaction(s) to this notification is YES.

See Also:
Constant Field Values

R_NO

public static final int R_NO
Indicates that the permissible user reaction(s) to this notification is NO.

See Also:
Constant Field Values

R_RETRY

public static final int R_RETRY
Indicates that the permissible user reaction(s) to this notification is RETRY.

See Also:
Constant Field Values

R_ABORT

public static final int R_ABORT
Indicates that the permissible user reaction(s) to this notification is ABORT.

See Also:
Constant Field Values

R_IGNORE

public static final int R_IGNORE
Indicates that the permissible user reaction(s) to this notification is IGNORE.

See Also:
Constant Field Values

R_OK_CANCEL

public static final int R_OK_CANCEL
Indicates that the permissible user reaction(s) to this notification is OK or CANCEL.

See Also:
Constant Field Values

R_YES_NO

public static final int R_YES_NO
Indicates that the permissible user reaction(s) to this notification is YES or NO.

See Also:
Constant Field Values

R_YES_NO_CANCEL

public static final int R_YES_NO_CANCEL
Indicates that the permissible user reaction(s) to this notification is YES, NO or CANCEL.

See Also:
Constant Field Values

R_RETRY_CANCEL

public static final int R_RETRY_CANCEL
Indicates that the permissible user reaction(s) to this notification is RETRY or CANCEL.

See Also:
Constant Field Values

R_ABORT_RETRY_IGNORE

public static final int R_ABORT_RETRY_IGNORE
Indicates that the permissible user reaction(s) to this notification is ABORT, RETRY or IGNORE.

See Also:
Constant Field Values
Method Detail

getType

public int getType()
Returns the type of this notification, that is one of the constants with praefix T_. If no type is set, this defaults to T_ERROR.


getReaction

public int getReaction()
Returns the permissible user reaction to the notification which is one of the constants starting with R_. You will get a bit or combination of constants. If you did set a constant that combines some others, like R_YES_NO, the bit or combination of R_YES and R_NO is returned.


getShortMessage

public java.lang.String getShortMessage()
Returns a short text explaining this notification. This text is optional. If not set, it defaults to a text derived from type. The returned String is never null.


getMessage

public java.lang.String getMessage()
Returns a fully descriptive text of this notification. The returned text is never null.


getCode

public int getCode()
Returns the code. The code should be used to discrimitate amongst different kinds of notifications. It should be a number that is unique amongst all applications. The returned code is zero if it has not been set, i.e., zero is a reserved code.


IMC Epclient 5.0.3