Class EntityPropertiesServiceSimple.ResourceBundleMessageSource
- java.lang.Object
-
- org.sakaiproject.entitybroker.util.core.EntityPropertiesServiceSimple.ResourceBundleMessageSource
-
- All Implemented Interfaces:
AbstractEntityPropertiesService.MessageBundle
- Enclosing class:
- EntityPropertiesServiceSimple
protected class EntityPropertiesServiceSimple.ResourceBundleMessageSource extends Object implements AbstractEntityPropertiesService.MessageBundle
Message source based on the standard resource bundle
-
-
Constructor Summary
Constructors Constructor Description ResourceBundleMessageSource(ResourceBundle bundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getPropertyKeys(Locale locale)Get all the keys for a specific LocaleStringgetPropertyMessage(String code, Object[] args, Locale locale)Try to resolve the message.
-
-
-
Constructor Detail
-
ResourceBundleMessageSource
public ResourceBundleMessageSource(ResourceBundle bundle)
-
-
Method Detail
-
getPropertyMessage
public String getPropertyMessage(String code, Object[] args, Locale locale)
Description copied from interface:AbstractEntityPropertiesService.MessageBundleTry to resolve the message. Treat as an error if the message can't be found.- Specified by:
getPropertyMessagein interfaceAbstractEntityPropertiesService.MessageBundle- Parameters:
code- the code to lookup up, such as 'calculator.noRateSet'args- Array of arguments that will be filled in for params within the message (params look like "{0}", "{1,date}", "{2,time}" within a message), ornullif none.locale- the Locale in which to do the lookup- Returns:
- the resolved message
-
getPropertyKeys
public List<String> getPropertyKeys(Locale locale)
Description copied from interface:AbstractEntityPropertiesService.MessageBundleGet all the keys for a specific Locale- Specified by:
getPropertyKeysin interfaceAbstractEntityPropertiesService.MessageBundle- Parameters:
locale- the Locale in which to do the lookup- Returns:
- the list of all keys found for the given Locale
-
-