|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.util.DelegatingPropertySource org.apache.tapestry.util.LocalizedPropertySource
public class LocalizedPropertySource
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.
Constructor Summary | |
---|---|
LocalizedPropertySource()
Creates a LocalizedPropertySource with the default locale |
|
LocalizedPropertySource(IPropertySource delegate)
Creates a LocalizedPropertySource with the default locale and the provided delegate |
|
LocalizedPropertySource(Locale locale)
Creates a LocalizedPropertySource with the provided locale |
|
LocalizedPropertySource(Locale locale,
IPropertySource delegate)
Creates a LocalizedPropertySource with the provided locale and delegate |
Method Summary | |
---|---|
Locale |
getLocale()
|
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. |
void |
setLocale(Locale locale)
|
Methods inherited from class org.apache.tapestry.util.DelegatingPropertySource |
---|
addSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalizedPropertySource()
public LocalizedPropertySource(Locale locale)
public LocalizedPropertySource(IPropertySource delegate)
public LocalizedPropertySource(Locale locale, IPropertySource delegate)
Method Detail |
---|
public Locale getLocale()
public void setLocale(Locale locale)
locale
- the locale currently usedpublic String getPropertyValue(String propertyName)
getPropertyValue
in interface IPropertySource
getPropertyValue
in class DelegatingPropertySource
DelegatingPropertySource.getPropertyValue(java.lang.String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |