org.apache.tapestry.util
Class LocalizedPropertySource
java.lang.Object
|
+--org.apache.tapestry.util.DelegatingPropertySource
|
+--org.apache.tapestry.util.LocalizedPropertySource
- All Implemented Interfaces:
- IPropertySource
- public class LocalizedPropertySource
- extends DelegatingPropertySource
A PropertySource extending the DelegatingPropertySources and adding the
capability of searching for localized versions of the desired property.
Useful when peoperties related to localization are needed.
- Since:
- 3.0
- Version:
- $Id: LocalizedPropertySource.java,v 1.1 2003/06/29 18:05:41 mindbridge Exp $
- Author:
- mindbridge
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalizedPropertySource
public LocalizedPropertySource()
- Creates a LocalizedPropertySource with the default locale
LocalizedPropertySource
public LocalizedPropertySource(Locale locale)
- Creates a LocalizedPropertySource with the provided locale
LocalizedPropertySource
public LocalizedPropertySource(IPropertySource delegate)
- Creates a LocalizedPropertySource with the default locale and the provided delegate
LocalizedPropertySource
public LocalizedPropertySource(Locale locale,
IPropertySource delegate)
- Creates a LocalizedPropertySource with the provided locale and delegate
getLocale
public Locale getLocale()
- Returns:
- the locale currently used
setLocale
public void setLocale(Locale locale)
- Parameters:
locale
- the locale currently used
getPropertyValue
public String getPropertyValue(String propertyName)
- Examines the properties localized using the provided locale in the order
of more specific to more general and returns the first that has a value.
- Overrides:
getPropertyValue
in class DelegatingPropertySource
- See Also:
DelegatingPropertySource.getPropertyValue(java.lang.String)