org.osconsulting.l10n
Class LocalizedMessage
java.lang.Object
org.osconsulting.l10n.LocalizedMessage
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- JErrCode
public class LocalizedMessage
- extends java.lang.Object
- implements java.io.Serializable
An JErrorCode contains alphaumeric code and belongs to a certain category of
errors. All JErrorCodes need to be listed in an implementation of the JErrorCategory
abstact class.
- Author:
- Kurt Stam
Copyright 2006 osConsulting.org Kurt Stam and Shahar Bar
- See Also:
- Serialized Form
Constructor Summary |
LocalizedMessage(java.lang.String key,
java.util.Collection<MessageStore> messageStores)
Constructor, should only be called from the custom JErrorCategory to which
this errorCode belongs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LocalizedMessage
public LocalizedMessage(java.lang.String key,
java.util.Collection<MessageStore> messageStores)
- Constructor, should only be called from the custom JErrorCategory to which
this errorCode belongs. The error code is the key into error MessageStore to
find the localized error message in the MessageStore.
- Parameters:
code
- - alpha numeric code, can be used to display or to lookup the
localized error message.errorCategoryClass
- - the custom implementation of the JErrorCategory class to
which this errorCode belongs.
getKey
public java.lang.String getKey()
- Gets the alphanumeric error code.
- Returns:
- - the code of the errorCode
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
String.toString()
getLocalizedMessage
public java.lang.String getLocalizedMessage(java.util.Locale locale)
getLocalizedMessage
public java.lang.String getLocalizedMessage(java.lang.String[] args,
java.util.Locale locale)
Copyright © 2006-2007. All Rights Reserved.