com.ls.util
Interface IErrorHandler

All Known Implementing Classes:
ResourceBasedErrorHandler

public interface IErrorHandler

Interface that defines methods for error handling

Version:
$Revision: 1.3 $
Author:
Last modified by $Author: TBerk $

Field Summary
static String DEFAULT_ERROR_MESSAGE
          Default error message if it could not be retrieved from the database and the resource bundle.
static String DEFAULT_LOCALE
          The default local string value for the system.
 
Method Summary
 String getErrorMessage(String key)
          Returns a error message from the resourceBundle specified by the key
 String getErrorMessage(String key, String languageCode)
          Returns a error message from the resourceBundle specified by the key
 

Field Detail

DEFAULT_ERROR_MESSAGE

public static final String DEFAULT_ERROR_MESSAGE
Default error message if it could not be retrieved from the database and the resource bundle. The dafult value is defined as "A general error occurred!".

DEFAULT_LOCALE

public static final String DEFAULT_LOCALE
The default local string value for the system. The dafult value is defined as "de".
Method Detail

getErrorMessage

public String getErrorMessage(String key)
                       throws ResourceBundleException
Returns a error message from the resourceBundle specified by the key
Parameters:
key - The key of the error message
Returns:
The value (error message itself) which belongs to the given key.
Throws:
ResourceBundleException - If there is an error while retrieving this message from resource bundle

getErrorMessage

public String getErrorMessage(String key,
                              String languageCode)
                       throws ResourceBundleException
Returns a error message from the resourceBundle specified by the key
Parameters:
key - The key of the error message
languageCode - The language code
Returns:
The value (error message itself) which belongs to the given key.
Throws:
ResourceBundleException - If there is an error while retrieving this message from resource bundle