Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.util
Interface MessageProvider

All Known Implementing Classes:
ImplementationMessages, Messages

public interface MessageProvider

A MessageProvider generates localized messages based on a message code and replacement arguments.


Method Summary
 java.util.Locale getLocale()
          Gets the locale used for error messages.
 java.lang.String getMessage(int code, java.lang.Object[] args)
          Creates a message from the specified code and replacement arguments, localized to the current locale.
 java.lang.String getMessage(int code, java.lang.Object[] args, java.util.Locale locale)
          Creates a localized message from the specified message code and replacement arguments.
 void setLocale(java.util.Locale locale)
          Sets the locale used for error messages.
 

Method Detail

setLocale

void setLocale(java.util.Locale locale)
Sets the locale used for error messages.

Parameters:
locale - The new locale.

getLocale

java.util.Locale getLocale()
Gets the locale used for error messages.

Returns:
The locale.

getMessage

java.lang.String getMessage(int code,
                            java.lang.Object[] args,
                            java.util.Locale locale)
Creates a localized message from the specified message code and replacement arguments.

Parameters:
code - The message code.
args - The arguments to be used as replacement text in the message created.
locale - The requested locale of the message to be created.
Returns:
a localized message from the specified message code

getMessage

java.lang.String getMessage(int code,
                            java.lang.Object[] args)
Creates a message from the specified code and replacement arguments, localized to the current locale. If no locale has been set, the default locale is being used.

Parameters:
code - The key for the message text.
args - The arguments to be used as replacement text in the message created.
Returns:
a localized message from the specified message code

Spatial DataBlade
JAVA API v8.21


Licensed Materials - Property of IBM
Copyright IBM Corp. 2002, 2012 All Rights Reserved.