org.pm4j.core.pm.impl.title
Class ResStringCacheWithScopes

java.lang.Object
  extended by org.pm4j.core.pm.impl.title.ResStringCacheWithScopes

public class ResStringCacheWithScopes
extends java.lang.Object


Constructor Summary
ResStringCacheWithScopes()
           
 
Method Summary
 ResStringCache.Entry find(java.lang.Object scope, java.lang.String key, java.util.Locale locale)
          Finds an entry for the given key and locale.
 ResStringCache.Entry put(java.lang.Object scope, java.lang.String key, java.util.Locale locale, java.lang.String value)
          Adds a cache entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResStringCacheWithScopes

public ResStringCacheWithScopes()
Method Detail

find

public ResStringCache.Entry find(java.lang.Object scope,
                                 java.lang.String key,
                                 java.util.Locale locale)
Finds an entry for the given key and locale.

Parameters:
scope - The cache scope context object.
key - The resource key.
locale - The locale to find a value for.
Returns:
An ResStringCache.Entry if there is a cache entry for the given key-locale combination. Otherwise null.

put

public ResStringCache.Entry put(java.lang.Object scope,
                                java.lang.String key,
                                java.util.Locale locale,
                                java.lang.String value)
Adds a cache entry.

Parameters:
scope - The cache scope context object.
key - The resource key.
locale - The locale for the given value.
value - The locale specific value.
Returns:
The new resource entry.