com.unitesk.atp.messages
Interface MessageBox

All Known Implementing Classes:
ListMessageBox, NullMessageBox, PrintStreamMessageBox

public interface MessageBox

The message box for application messages.

Version:
$Id: MessageBox.java,v 1.5 2005/07/08 15:35:55 all-x Exp $
Author:
Alexey Demakov

Method Summary
 void error(Message message)
          Outputs error message.
 void fatal(Message message)
          Outputs error message and stops program execution.
 int getErrorCount()
          Returns error messages count.
 int getInfoCount()
          Returns information messages count.
 MessageStringManager getStringManager()
          Returns localized string manager for this message box.
 int getWarningCount()
          Returns warning messages count.
 void info(Message message)
          TODO: make deprecated Outputs information message.
 void info(String message)
          Outputs information line.
 void statistics()
          Prints message box statistics.
 void status()
          If error count greater than zero, prints statistics and stops program execution.
 void stop(int code)
          Stops program execution by throwing FatalErrorException.
 void warning(Message message)
          Outputs warning message.
 

Method Detail

fatal

void fatal(Message message)
Outputs error message and stops program execution. Increments error counter.

Parameters:
message - The error message.

error

void error(Message message)
Outputs error message. Increments error counter.

Parameters:
message - The error message.

warning

void warning(Message message)
Outputs warning message. Increments warning counter.

Parameters:
message - The warning message.

info

void info(Message message)
TODO: make deprecated Outputs information message. Increments information counter.

Parameters:
message - The information message.

info

void info(String message)
Outputs information line. Increments information counter.

Parameters:
message - The information message.

getErrorCount

int getErrorCount()
Returns error messages count.

Returns:
The error count.

getWarningCount

int getWarningCount()
Returns warning messages count.

Returns:
The warning count.

getInfoCount

int getInfoCount()
Returns information messages count.

Returns:
The info count.

statistics

void statistics()
Prints message box statistics.


status

void status()
If error count greater than zero, prints statistics and stops program execution.


stop

void stop(int code)
Stops program execution by throwing FatalErrorException.

Parameters:
code - Exit status code

getStringManager

MessageStringManager getStringManager()
Returns localized string manager for this message box. Localized string manager is used to translate messages to text.



Copyright © 2001-2006 ISP RAS, RedVerst Group. All Rights Reserved.