|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.beasys.commerce.util.MessageCatalog
@Deprecated public class MessageCatalog
A message catalog is a collection of property files that store paired
sets of keyed messages. The MessageCatalog
exposes an API
for accessing catalog messages. Each message catalog property file
obeys the following naming convention:
namespace_[language]_[country]_[variant].properties
The namespace describes the type of messages contained in the property
file, whereas the language, country, and variant describe a locale (as
represented by the Locale
). In order to expose the
messages contained in a message catalog property file, the file must
be included in the classpath.
Each property file contains zero or more lines of the following format:
messageKey.user=[user message]
messageKey.log=[log message]
Both the user and log messages are a description of the message itself;
however, the user message text is targeted at developers, whereas the log
message text is targeted at application administrators. Both the user
and log messages may contain parameter substitution tags for supporting
dynamic message parameter substitution. To do so, use substitution tags of
the form described in the documentation for MessageFormat
.
Example:
message1.log=Could not access account {1,number,integer}.
PropertyResourceBundle
,
MessageFormat
Field Summary | |
---|---|
protected static Hashtable |
cachedResourceBundles
Deprecated See BEA Commerce product offering |
static String |
DEFAULT_MESSAGE
Deprecated See BEA Commerce product offering |
static String |
DEFAULT_NAMESPACE
Deprecated See BEA Commerce product offering |
static String |
LOG_MESSAGE_SUFFIX
Deprecated See BEA Commerce product offering |
static String |
USER_MESSAGE_SUFFIX
Deprecated See BEA Commerce product offering |
Constructor Summary | |
---|---|
MessageCatalog()
Deprecated See BEA Commerce product offering |
Method Summary | |
---|---|
static String |
getLogMessage(String messageKey)
Deprecated See BEA Commerce product offering |
static String |
getLogMessage(String messageKey,
Object argument)
Deprecated See BEA Commerce product offering |
static String |
getLogMessage(String messageKey,
Object[] arguments)
Deprecated See BEA Commerce product offering |
static String |
getLogMessage(String namespace,
String messageKey)
Deprecated See BEA Commerce product offering |
static String |
getLogMessage(String namespace,
String messageKey,
Object argument)
Deprecated See BEA Commerce product offering |
static String |
getLogMessage(String namespace,
String messageKey,
Object[] arguments)
Deprecated See BEA Commerce product offering |
protected static String |
getMessage(String namespace,
String messageKey,
String messageKeySuffix,
Object[] arguments)
Deprecated See BEA Commerce product offering |
protected static ResourceBundle |
getResourceBundle(String namespace)
Deprecated See BEA Commerce product offering |
static String |
getUserMessage(String messageKey)
Deprecated See BEA Commerce product offering |
static String |
getUserMessage(String messageKey,
Object argument)
Deprecated See BEA Commerce product offering |
static String |
getUserMessage(String messageKey,
Object[] arguments)
Deprecated See BEA Commerce product offering |
static String |
getUserMessage(String namespace,
String messageKey)
Deprecated See BEA Commerce product offering |
static String |
getUserMessage(String namespace,
String messageKey,
Object argument)
Deprecated See BEA Commerce product offering |
static String |
getUserMessage(String namespace,
String messageKey,
Object[] arguments)
Deprecated See BEA Commerce product offering |
static void |
main(String[] args)
Deprecated See BEA Commerce product offering |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Hashtable cachedResourceBundles
public static final String DEFAULT_NAMESPACE
public static final String DEFAULT_MESSAGE
public static final String USER_MESSAGE_SUFFIX
public static final String LOG_MESSAGE_SUFFIX
Constructor Detail |
---|
public MessageCatalog()
Method Detail |
---|
protected static ResourceBundle getResourceBundle(String namespace)
null
is
returned.
null
public static String getUserMessage(String messageKey)
messageKey
- The key of the target message.
public static String getUserMessage(String messageKey, Object argument)
messageKey
- The key of the target message.argument
- The substitution argument.
public static String getUserMessage(String messageKey, Object[] arguments)
messageKey
- The key of the target message.arguments
- The substitution arguments.
public static String getUserMessage(String namespace, String messageKey)
namespace
- The namespace of the target message.messageKey
- The key of the target message.
public static String getUserMessage(String namespace, String messageKey, Object argument)
namespace
- The namespace of the target message.messageKey
- The key of the target message.argument
- The substitution argument.
public static String getUserMessage(String namespace, String messageKey, Object[] arguments)
namespace
- The namespace of the target message.messageKey
- The key of the target message.arguments
- The substitution arguments.
public static String getLogMessage(String messageKey)
messageKey
- The key of the target message.
public static String getLogMessage(String messageKey, Object argument)
messageKey
- The key of the target message.argument
- The substitution argument.
public static String getLogMessage(String messageKey, Object[] arguments)
messageKey
- The key of the target message.arguments
- The substitution arguments.
public static String getLogMessage(String namespace, String messageKey)
namespace
- The namespace of the target message.messageKey
- The key of the target message.
public static String getLogMessage(String namespace, String messageKey, Object argument)
namespace
- The namespace of the target message.messageKey
- The key of the target message.argument
- The substitution argument.
public static String getLogMessage(String namespace, String messageKey, Object[] arguments)
namespace
- The namespace of the target message.messageKey
- The key of the target message.arguments
- The substitution arguments.
protected static String getMessage(String namespace, String messageKey, String messageKeySuffix, Object[] arguments)
namespace
- The namespace of the target message.messageKey
- The key of the target message.messageKeySuffix
- The key suffix of the target message.arguments
- The substitution arguments.
public static void main(String[] args)
args
- The command line arguments.
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |