to.etc.webapp.nls
Class NlsCachingMessageProvider

java.lang.Object
  extended by to.etc.webapp.nls.NlsCachingMessageProvider
All Implemented Interfaces:
NlsMessageProvider

public class NlsCachingMessageProvider
extends java.lang.Object
implements NlsMessageProvider

This is a wrapper for a message provider which caches all of the retrievals.

Author:
Frits Jalvingh Created on Oct 10, 2006

Constructor Summary
NlsCachingMessageProvider(NlsMessageProvider source)
           
 
Method Summary
 java.lang.String findMessage(java.util.Locale loc, java.lang.String code)
          Locate the specified key for the specified locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NlsCachingMessageProvider

public NlsCachingMessageProvider(NlsMessageProvider source)
Method Detail

findMessage

public java.lang.String findMessage(java.util.Locale loc,
                                    java.lang.String code)
Description copied from interface: NlsMessageProvider
Locate the specified key for the specified locale. This does fallback, meaning that if the exact locale is not matched it will try a less restrictive one, until the empty (default) locale has been reached. The first match is returned; if not even the empty locale returns a match this returns null.

Specified by:
findMessage in interface NlsMessageProvider
Returns: