org.apache.hivemind.util
Class LocalizedContextResourceFinder

java.lang.Object
  extended by org.apache.hivemind.util.LocalizedContextResourceFinder

public class LocalizedContextResourceFinder
extends java.lang.Object

Finds localized resources within the web application context.

Originally part of Tapestry 3.0.

Since:
1.1
Author:
Howard Lewis Ship
See Also:
ServletContext

Constructor Summary
LocalizedContextResourceFinder(javax.servlet.ServletContext context)
           
 
Method Summary
 LocalizedResource resolve(java.lang.String contextPath, java.util.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

LocalizedContextResourceFinder

public LocalizedContextResourceFinder(javax.servlet.ServletContext context)
Method Detail

resolve

public LocalizedResource resolve(java.lang.String contextPath,
                                 java.util.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.



Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.