Class EntityPropertiesServiceSimple
- java.lang.Object
-
- org.sakaiproject.entitybroker.util.core.AbstractEntityPropertiesService
-
- org.sakaiproject.entitybroker.util.core.EntityPropertiesServiceSimple
-
- All Implemented Interfaces:
org.sakaiproject.entitybroker.providers.EntityPropertiesService
public class EntityPropertiesServiceSimple extends AbstractEntityPropertiesService implements org.sakaiproject.entitybroker.providers.EntityPropertiesService
This is a simple implementation of the properties loader service which uses standard java resource bundles- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classEntityPropertiesServiceSimple.ResourceBundleMessageSourceMessage source based on the standard resource bundle-
Nested classes/interfaces inherited from class org.sakaiproject.entitybroker.util.core.AbstractEntityPropertiesService
AbstractEntityPropertiesService.MessageBundle
-
-
Field Summary
-
Fields inherited from class org.sakaiproject.entitybroker.util.core.AbstractEntityPropertiesService
prefixMap
-
-
Constructor Summary
Constructors Constructor Description EntityPropertiesServiceSimple()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>registerLocaleMessages(String prefix, String baseName, Locale locale, ClassLoader classLoader)Override this to provide custom message handling, you must register theAbstractEntityPropertiesService.MessageBundleyou create in this method so that the messages can be looked up later, register usingAbstractEntityPropertiesService.registerPrefixMessageBundle(String, MessageBundle)-
Methods inherited from class org.sakaiproject.entitybroker.util.core.AbstractEntityPropertiesService
getLocale, getProperty, getProperty, getProperty, loadProperties, registerPrefixMessageBundle, unloadProperties, unregisterPrefixMessageBundle
-
-
-
-
Method Detail
-
registerLocaleMessages
public List<String> registerLocaleMessages(String prefix, String baseName, Locale locale, ClassLoader classLoader)
Description copied from class:AbstractEntityPropertiesServiceOverride this to provide custom message handling, you must register theAbstractEntityPropertiesService.MessageBundleyou create in this method so that the messages can be looked up later, register usingAbstractEntityPropertiesService.registerPrefixMessageBundle(String, MessageBundle)- Specified by:
registerLocaleMessagesin classAbstractEntityPropertiesService- Parameters:
prefix- an entity prefixbaseName- (optional) the part before the .properties or _en.properties, example: location/dir/myentity.properties, if null then prefix is usedlocale- the Locale to register messages forclassLoader- (optional) the ClassLoader to find the properties files in, if null then the default thread ClassLoader is used- Returns:
- the list of registered keys for this Locale
-
-