org.apache.myfaces.extensions.cdi.core.api.resource.bundle
Interface ResourceBundle

All Superinterfaces:
Serializable

public interface ResourceBundle
extends Serializable

Allows to implement type-safe resource-bundles


Method Summary
 String getValue(Class<? extends BundleKey> key)
          Returns the value for the given key (and the configured bundle and local).
 String getValue(String key)
          Returns the value for the given key (and the configured bundle and local).
 ResourceBundle useBundle(Class<?> bundleClass)
          Allows to specify a class which is mapped to a bundle
 ResourceBundle useBundle(String bundleName)
          Allows to specify a bundle name
 ResourceBundle useLocale(Locale locale)
          Allows to specify a locale
 

Method Detail

useBundle

ResourceBundle useBundle(String bundleName)
Allows to specify a bundle name

Parameters:
bundleName - name of the bundle which should be used
Returns:
the instance itself

useBundle

ResourceBundle useBundle(Class<?> bundleClass)
Allows to specify a class which is mapped to a bundle

Parameters:
bundleClass - class mapped to a bundle
Returns:
the instance itself

useLocale

ResourceBundle useLocale(Locale locale)
Allows to specify a locale

Parameters:
locale - locale which should be used
Returns:
the instance itself

getValue

String getValue(Class<? extends BundleKey> key)
Returns the value for the given key (and the configured bundle and local). If the key extends a custom class and there is no specified bundle-name, the name of the super-class will be used as bundle-name.

Parameters:
key - current key
Returns:
the value for the given key

getValue

String getValue(String key)
Returns the value for the given key (and the configured bundle and local).

Parameters:
key - current key
Returns:
the value for the given key


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.