org.apache.tapestry.services.impl
Class LocalizedPropertySource

java.lang.Object
  extended byorg.apache.tapestry.services.impl.LocalizedPropertySource

public class LocalizedPropertySource
extends java.lang.Object

Wraps around a IPropertySourceto query a series of localized keys.

This is much simpler than the old org.apache.tapestry.util.LocalizedPropertySource, and allows the locale to be specified on a thread-safe, per-invocation basis.

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
LocalizedPropertySource(IPropertySource source)
           
 
Method Summary
 java.lang.String getPropertyValue(java.lang.String propertyName, java.util.Locale locale)
          Get the property from the source, trying different variations of propertyName (adding suffixes).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalizedPropertySource

public LocalizedPropertySource(IPropertySource source)
Method Detail

getPropertyValue

public java.lang.String getPropertyValue(java.lang.String propertyName,
                                         java.util.Locale locale)
Get the property from the source, trying different variations of propertyName (adding suffixes).

Parameters:
propertyName - the base property name to search with.