org.marketcetera.util.l10n
Class PropertiesFileInfo

java.lang.Object
  extended by org.marketcetera.util.l10n.PropertiesFileInfo
All Implemented Interfaces:
MessageInfoProvider

public class PropertiesFileInfo
extends Object
implements MessageInfoProvider

Holder of meta-information about a properties file that maps message keys to message text.

Since:
0.6.0
Version:
$Id: PropertiesFileInfo.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com
See Also:
org.marketcetera.util.log

Constructor Summary
PropertiesFileInfo(I18NMessageProvider provider)
          Creates a new meta-information holder for the fallback properties file associated with the given provider.
PropertiesFileInfo(I18NMessageProvider provider, Locale locale)
          Creates a new meta-information holder for the properties file associated with the given provider and locale.
 
Method Summary
 Locale getLocale()
          Returns the receiver's locale.
 List<MessageInfo> getMessageInfo()
          Returns the receiver's meta-information.
 I18NMessageProvider getProvider()
          Returns the receiver's message provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesFileInfo

public PropertiesFileInfo(I18NMessageProvider provider,
                          Locale locale)
                   throws I18NException
Creates a new meta-information holder for the properties file associated with the given provider and locale.

Parameters:
provider - The provider.
locale - The locale. Use Locale.ROOT for the fallback properties file.
Throws:
I18NException - Thrown if there is an I/O error while attempting to read the properties file.

PropertiesFileInfo

public PropertiesFileInfo(I18NMessageProvider provider)
                   throws I18NException
Creates a new meta-information holder for the fallback properties file associated with the given provider.

Parameters:
provider - The provider.
Throws:
I18NException - Thrown if there is an I/O error while attempting to read the properties file.
Method Detail

getProvider

public I18NMessageProvider getProvider()
Returns the receiver's message provider.

Returns:
The provider.

getLocale

public Locale getLocale()
Returns the receiver's locale.

Returns:
The locale. It is null for the fallback properties file.

getMessageInfo

public List<MessageInfo> getMessageInfo()
Description copied from interface: MessageInfoProvider
Returns the receiver's meta-information.

Specified by:
getMessageInfo in interface MessageInfoProvider
Returns:
The meta-information.


Copyright © 2012. All Rights Reserved.