net.sourceforge.stripes.localization
Interface LocalizationBundleFactory

All Superinterfaces:
ConfigurableComponent
All Known Implementing Classes:
DefaultLocalizationBundleFactory

public interface LocalizationBundleFactory
extends ConfigurableComponent

Extremely simple interface that is implemented to resolve the ResourceBundles from which various Strings are pulled at runtime. Can be implemented using property resource bundles, class resource bundles or anything else a developer can dream up.

The bundles returned from each method do not need to be discrete, and may all be the same bundle.


Method Summary
 ResourceBundle getErrorMessageBundle(Locale locale)
          Returns the ResourceBundle from which to draw error messages for the specified locale.
 ResourceBundle getFormFieldBundle(Locale locale)
          Returns the ResourceBundle from which to draw the names of form fields for the specified locale.
 
Methods inherited from interface net.sourceforge.stripes.config.ConfigurableComponent
init
 

Method Detail

getErrorMessageBundle

ResourceBundle getErrorMessageBundle(Locale locale)
                                     throws MissingResourceException
Returns the ResourceBundle from which to draw error messages for the specified locale.

Parameters:
locale - the locale that is in use for the current request
Throws:
MissingResourceException - when a bundle that is expected to be present cannot be located.

getFormFieldBundle

ResourceBundle getFormFieldBundle(Locale locale)
                                  throws MissingResourceException
Returns the ResourceBundle from which to draw the names of form fields for the specified locale.

Parameters:
locale - the locale that is in use for the current request
Throws:
MissingResourceException - when a bundle that is expected to be present cannot be located.


? Copyright 2005-2006, Stripes Development Team.