org.sakaiproject.entitybroker.util.core
Class EntityPropertiesServiceSimple

java.lang.Object
  extended by org.sakaiproject.entitybroker.util.core.AbstractEntityPropertiesService
      extended by org.sakaiproject.entitybroker.util.core.EntityPropertiesServiceSimple
All Implemented Interfaces:
EntityPropertiesService

public class EntityPropertiesServiceSimple
extends AbstractEntityPropertiesService
implements 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
protected  class EntityPropertiesServiceSimple.ResourceBundleMessageSource
          Message 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
EntityPropertiesServiceSimple()
           
 
Method Summary
 List<String> registerLocaleMessages(String prefix, String baseName, Locale locale, ClassLoader classLoader)
          Override this to provide custom message handling, you must register the AbstractEntityPropertiesService.MessageBundle you create in this method so that the messages can be looked up later, register using AbstractEntityPropertiesService.registerPrefixMessageBundle(String, MessageBundle)
 
Methods inherited from class org.sakaiproject.entitybroker.util.core.AbstractEntityPropertiesService
getLocale, getProperty, getProperty, getProperty, loadProperties, registerPrefixMessageBundle, unloadProperties, unregisterPrefixMessageBundle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.entitybroker.providers.EntityPropertiesService
getLocale, getProperty, getProperty, getProperty, loadProperties, unloadProperties
 

Constructor Detail

EntityPropertiesServiceSimple

public EntityPropertiesServiceSimple()
Method Detail

registerLocaleMessages

public List<String> registerLocaleMessages(String prefix,
                                           String baseName,
                                           Locale locale,
                                           ClassLoader classLoader)
Description copied from class: AbstractEntityPropertiesService
Override this to provide custom message handling, you must register the AbstractEntityPropertiesService.MessageBundle you create in this method so that the messages can be looked up later, register using AbstractEntityPropertiesService.registerPrefixMessageBundle(String, MessageBundle)

Specified by:
registerLocaleMessages in class AbstractEntityPropertiesService
Parameters:
prefix - an entity prefix
baseName - (optional) the part before the .properties or _en.properties, example: location/dir/myentity.properties, if null then prefix is used
locale - the Locale to register messages for
classLoader - (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


Copyright © 2007-2013 CARET, University of Cambridge. All Rights Reserved.