org.apache.tapestry.util
Class LocalizedResourceFinder

java.lang.Object
  extended by org.apache.tapestry.util.LocalizedResourceFinder

public class LocalizedResourceFinder
extends Object

Searches for a localization of a particular resource in the classpath (using a IResourceResolver.

Since:
3.0
Version:
$Id: LocalizedResourceFinder.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
LocalizedResourceFinder(IResourceResolver resolver)
           
 
Method Summary
 LocalizedResource resolve(String resourcePath, Locale locale)
          Resolves the resource, returning a path representing the closest match (with respect to the provided locale).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalizedResourceFinder

public LocalizedResourceFinder(IResourceResolver resolver)
Method Detail

resolve

public LocalizedResource resolve(String resourcePath,
                                 Locale locale)
Resolves the resource, returning a path representing the closest match (with respect to the provided locale). Returns null if no match.

The provided path is split into a base path and a suffix (at the last period character). The locale will provide different suffixes to the base path and the first match is returned.