|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.zphinx.spine.exceptions.SpineException
com.zphinx.spine.exceptions.SpineMessageException
public class SpineMessageException
SpineMessageException is the base spine exception that is used by this framework to create exceptions which accept locale sensitive message keys which allow parametric replacement of strings.
This exception requires (for speed purposes) that an exceptionMessageClass property be declared in the spine-init.xml file. This property is a property of the MessagePlugin and associates this exception with a properties file, which should contain your error messages.
The exception will still find you message by it's defined key if it is not in the default exceptionMessageClass, but it does this by seacrhing through all the properties files, and Locales in the application.
Copyright ©Zphinx Software Solutions
| Constructor Summary | |
|---|---|
SpineMessageException(String message)
Creates a SpineMessageException with a message key |
|
SpineMessageException(String message,
Locale locale)
Creates a SpineMessageException with a message key at the specified locale |
|
SpineMessageException(String message,
Object[] arguments)
Creates a SpineMessageException with a message key with the associated parametric replacements |
|
SpineMessageException(String message,
Object[] arguments,
Locale locale)
Creates a SpineMessageException with a message key with the associated parametric replacements at the specified locale |
|
| Method Summary | |
|---|---|
String |
getLocalizedMessage()
Gets the locale sensitive message |
String |
getLocalizedMessage(Locale locale)
Gets the locale sensitive message |
String |
getMessage()
Gets the message for this exception from the associated properties files |
String |
getMessage(Locale locale)
Gets the message for this exception from the associated properties files |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SpineMessageException(String message)
message - The message key used to initialise this exception
public SpineMessageException(String message,
Locale locale)
message - The message key used to initialise this exceptionlocale - The locale within which this message key's property should be displayed
public SpineMessageException(String message,
Object[] arguments)
message - The message key used to initialise this exceptionarguments - The parametric replacement objects used to obtain messages from the specified properties file
public SpineMessageException(String message,
Object[] arguments,
Locale locale)
message - The message key used to initialise this exceptionarguments - The parametric replacement objects used to obtain messages from the specified properties filelocale - The locale within which this message key's property should be displayed| Method Detail |
|---|
public String getMessage()
getMessage in class Throwablepublic String getLocalizedMessage()
getLocalizedMessage in class Throwablepublic String getMessage(Locale locale)
locale - The locale for which to retrieve this message
public String getLocalizedMessage(Locale locale)
locale - The locale for which to retrieve this message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||