java.lang.Object | ||
↳ | com.microstrategy.utils.config.AbstractConfigurationElement | |
↳ | com.microstrategy.web.beans.MessagesManager |
This class contains a list of Messages
instances, each of which
is associated with a specific java.util.Locale
object or
a Windows LCID (Window-based locale ID). The default
ResourceBundle
name is set to
"resources.MessagesBundle"
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ATT_RESOURCE_BUNDLE | ||||||||||
String | ATT_VERSION | ||||||||||
String | DEFAULT_MESSAGES_BUNDLE | The name of the default MessagesBundle file. | |||||||||
String | LOCALES_XML | ||||||||||
String | NODE_NAME |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected static final Locale | DEFAULT_LOCALE | The Locale used by default |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MessagesManager()
Constructs a MessagesManager using default values.
| |||||||||||
MessagesManager(Locale locale)
This constructor is deprecated.
The MessagesManager should be configured using an external xml configuration file
using the
load(String) method.
| |||||||||||
MessagesManager(Document doc)
This constructor is deprecated.
The MessagesManager should be configured using an external xml configuration file
using the
load(String) method.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
applyCustomizations()
Loops through all the
CustomizationInfo in the Customizations
class and apply the corresponding customizations. | ||||||||||
String |
getBrowserLocale(String browserLocale)
Returns the Web browser's locale ID, a Windows-based locale ID.
| ||||||||||
String |
getBundleName()
Returns the base name for the bundle holding the messages.
| ||||||||||
static MessagesManager | getInstance() | ||||||||||
static String |
getLocaleId(Locale locale)
Returns the corresponding windows-based locale ID for the given Java Locale
| ||||||||||
HashList |
getMessageInfo()
This method is deprecated.
Use
getMessageInfo(String) to obtain
a particular MessageInfo, or getMessageInfoList() to obtain
the list of all available MessageInfo.
| ||||||||||
MessageInfo |
getMessageInfo(String localeId)
Returns the MessageInfo objects for the given locale.
| ||||||||||
AbstractConfigurationElement.FilteredList |
getMessageInfoList()
Returns
Filteredlist with the list of MessageInfo
objects available from this MessagesManager. | ||||||||||
Messages |
getMessages(Locale locale)
Returns the
Messages object with the best-match possible for the specified
java.util.Locale . | ||||||||||
Messages |
getMessages(String localeId)
Returns the
Messages object with the best-match possible for the specified
Windows locale ID. | ||||||||||
Messages |
getMessages()
This method is deprecated.
No replacement.
| ||||||||||
AbstractConfigurationElement.FilteredList | getPartiallySupportedMessageInfoList() | ||||||||||
static void | init(String filePath) | ||||||||||
void |
load(String fileName)
Loads the file with the given name and initializes this
ConfigurationElement with its content. | ||||||||||
void |
setBundleName(String value)
Sets the base name for the bundle holding the messages.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getKeyAttribute()
This method must return the attribute that uniquely identifies this element among its siblings;
if no single attribute can be used, return null and override the
getKey and
setKey methods. | ||||||||||
void |
initDefaultAttributes()
This method can be overridden to set default values for attributes.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
The name of the default MessagesBundle file.
The Locale used by default
Constructs a MessagesManager using default values.
It's strongly recommended that the singleton
getInstance()
is used instead of creating a new instance.
This constructor is deprecated.
The MessagesManager should be configured using an external xml configuration file
using the load(String)
method.
Constructs a MessagesManager using the specified
java.util.Locale
as default.
locale | the java.util.Locale to use. |
---|
This constructor is deprecated.
The MessagesManager should be configured using an external xml configuration file
using the load(String)
method.
Constructs a MessagesManager with the specified
org.w3c.dom.Document
object.
doc | a org.w3c.dom.Document object. |
---|
Loops through all the CustomizationInfo
in the Customizations
class and apply the corresponding customizations.
ConfigException |
---|
Returns the Web browser's locale ID, a Windows-based locale ID. This method first extracts the country and language from the parameter browserLocale and then tries to use them to find out the Windows locale ID and returns it. If not found, the default one used when initializing this MessagesManager is returned.
browserLocale | a browser's locale information |
---|
Returns the base name for the bundle holding the messages.
Returns the corresponding windows-based locale ID for the given Java Locale
This method is deprecated.
Use getMessageInfo(String)
to obtain
a particular MessageInfo, or getMessageInfoList()
to obtain
the list of all available MessageInfo.
Returns Hashlist
over the collection of MessageInfo
objects from this MessagesManager, keyed by the Windows LCID.
Hashlist
over the collection of
MessageInfo
Returns the MessageInfo objects for the given locale.
localeId | The locale id identifying the MessageInfo |
---|
Returns Filteredlist
with the list of MessageInfo
objects available from this MessagesManager.
Returns the Messages
object with the best-match possible for the specified
java.util.Locale
.
locale | a java.util.Locale . |
---|
Messages
object.
Returns the Messages
object with the best-match possible for the specified
Windows locale ID.
localeId | a Window-based locale ID. |
---|
Messages
object
This method is deprecated.
No replacement.
Returns the Messages
object with the
java.util.Locale
specified at initialization time.
Messages
object.Loads the file with the given name and initializes this ConfigurationElement
with its content.
fileName | The path to the configuration file. This path will be resolved by the FileLoader
|
---|
ConfigException |
---|
Sets the base name for the bundle holding the messages.
This method must return the attribute that uniquely identifies this element among its siblings;
if no single attribute can be used, return null and override the getKey
and
setKey
methods.
This method can be overridden to set default values for attributes. Simply
extend this method and call setAttribute(String, Object)