Package org.apache.commons.resources

Resources is a component that provides advanced management of message resources.


Interface Summary
Message An encapsulation of an individual message stored in a MessageList object, consisting of a message key (to be used to look up message text in an appropriate message resources database) plus up to four placeholder objects that can be used for parametric replacement in the message text.
MessageList A class that encapsulates messages.
Resources An abstract representation of a set of internationalized resources, which are arbitrary objects identified by a unique String key.
ResourcesFactory A ResourcesFactory is a factory pattern interface for a class that can create Resources instances based on a logical name that is passed to the factory.

Class Summary
Messages Wrapper around any Resources object that performs message string lookups from the Resources instance, and parameter replacement via java.text.MessageFormat.

Exception Summary
ResourcesException This class is a general purpose wrapper exception for problems pertaining to Resources.
ResourcesKeyException Specialized subclass of ResourcesException that is thrown by a resource getter method of a Resources instance, if an invalid key value is specified and the returnNull property is false.

Package org.apache.commons.resources Description

Resources is a component that provides advanced management of message resources.

Many Java applications must support internationalization (i18n) of message strings presented as part of the user interface, or in messages written to log files. The standard Java APIs offer the java.util.ResourceBundle family of classes to support this requirement; however, these classes have the following limitations that reduce their usefulness:

The classes in the proposed Resources package offer solutions to these two problems, and provide a framework for providing customized MessageResources implementations that can access resource strings from any desired static or dynamically updated collection.

Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.