com.bowstreet.util.locale
Interface LocaleAware


public interface LocaleAware

Implemented by an object that can be told what locale to use for subsequent operations. This is currently used by the Localized Resource builder: if the specified resource bundle is actually a Java class (as opposed to a property file) then the builder's runtime checks that class to see if it implements the LocaleAware interface; if so, it calls the setLocale method passing the requested Locale. This enables a single active resource bundle to load resources dynamically, e.g., from a database.


Method Summary
 java.util.Locale getLocale()
          Return the currently selected Locale.
 void setLocale(java.util.Locale locale)
          Use this locale for processing.
 

Method Detail

getLocale

java.util.Locale getLocale()
Return the currently selected Locale.

Returns:
Currently selected Locale instance

setLocale

void setLocale(java.util.Locale locale)
Use this locale for processing.

Parameters:
locale - The requested Locale


Copyright © 2009 IBM. All Rights Reserved.