org.norther.tammi.core.locale
Interface FallbackResources

All Known Subinterfaces:
FallbackMap, HostFilter<F>, PipeFilter<F>, ResourceFilter, ServiceFilter<F>
All Known Implementing Classes:
DefaultFallbackMap, DefaultHostFilter, DefaultPipeFilter, DefaultResourceFilter, DefaultServiceFilter

public interface FallbackResources

An interface to fallback resources applied when normal qualified resources are not available.

Version:
$Id: FallbackResources.java,v 1.5 2009/11/13 16:31:45 cvsimp Exp $
Author:
Ilkka Priha

Method Summary
 String getFallbackBaseName()
          Gets the fallback base name.
 LookupResourceBundle getFallbackBundle(Locale... locale)
          Gets the fallback bundle for the specified locale.
 LookupResourceBundle getFallbackBundle(String key, Locale... locale)
          Gets the fallback bundle for the specified key and locale.
 LookupResourceBundle resolveFallbackBundle(String name, Locale... locale)
          Resolves a fallback bundle for the qualified name and locale.
 LookupResourceBundle resolveFallbackBundle(String name, String key, Locale... locale)
          Resolves a fallback bundle for the qualified name, key and locale.
 String resolveFallbackBundleName(String name)
          Resolves a fallback bundle name for the qualified name.
 Object resolveFallbackResource(String name, String key, Locale... locale)
          Resolves a localized resource for the qualified name, key and locale.
 

Method Detail

getFallbackBaseName

String getFallbackBaseName()
Gets the fallback base name.

Returns:
the base name of the fallback bundle or null.

getFallbackBundle

LookupResourceBundle getFallbackBundle(Locale... locale)
Gets the fallback bundle for the specified locale.

Parameters:
locale - the locale.
Returns:
the fallback bundle or null.

getFallbackBundle

LookupResourceBundle getFallbackBundle(String key,
                                       Locale... locale)
Gets the fallback bundle for the specified key and locale.

Parameters:
key - the resource key.
locale - the locale.
Returns:
the fallback bundle or null.

resolveFallbackBundleName

String resolveFallbackBundleName(String name)
Resolves a fallback bundle name for the qualified name.

Parameters:
name - the qualified name.
Returns:
the base name of the fallback bundle or null.

resolveFallbackBundle

LookupResourceBundle resolveFallbackBundle(String name,
                                           Locale... locale)
Resolves a fallback bundle for the qualified name and locale.

Parameters:
name - the qualified name.
locale - the locale.
Returns:
the fallback bundle or null.

resolveFallbackBundle

LookupResourceBundle resolveFallbackBundle(String name,
                                           String key,
                                           Locale... locale)
Resolves a fallback bundle for the qualified name, key and locale.

Parameters:
name - the qualified name.
key - the resource key.
locale - the locale.
Returns:
the fallback bundle or null.

resolveFallbackResource

Object resolveFallbackResource(String name,
                               String key,
                               Locale... locale)
Resolves a localized resource for the qualified name, key and locale.

Parameters:
name - the qualified name.
key - the resource key.
locale - the locale.
Returns:
the localized resource or the key if not found.


Copyright © 2004 The Norther Organization. All rights reserved.