Interface ResourceBundleService


public interface ResourceBundleService
May 7, 2004
Version:
$Id: ResourceBundleService.java 5799 2006-05-28 17:55:42Z geaz $ This class is used to manage the Resoucebunlde. It should work like the java.util.ResourceBundle class except that the properties file can be in the database or a a directory. The class java.util.ResourceBundle require that the properties file has to be in the classpath.
Author:
Tuan Nguyen
  • Method Details

    • getResourceBundle

      ResourceBundle getResourceBundle(String name, Locale locale)
      This method should search for a template in the database that the service manage or the resource in the classpath of the current thread class loader
      Parameters:
      name - The name of the resource bunlde
      locale - the locale
      Returns:
      A ResourceBunlde or null if no ResourceBundle is found
    • getResourceBundle

      ResourceBundle getResourceBundle(String name, Locale locale, ClassLoader cl)
      This method should search for a template in the database that the service manage or the resource in the classpath of the specified class loader
      Parameters:
      name - the name of the resource
      locale - the locale
      cl - The classloader
      Returns:
    • getResourceBundle

      ResourceBundle getResourceBundle(String[] name, Locale locale)
      This method will call the method public ResourceBundle getResourceBundle(String[] name, Locale locale, ClassLoader cl) and using the the classloader of the current thread
    • getResourceBundle

      ResourceBundle getResourceBundle(String[] name, Locale locale, ClassLoader cl)
      This method will look for all the resources with the given names and merge into one resource bundle, the properties in the later resource bundle name will have the higher priority than the previous one.
    • getResourceBundleData

      ResourceBundleData getResourceBundleData(String id)
      This method should look for a resource bundle in the database that match the given id. The ResourceBundleData store the data as text instead of a properties map.
      Parameters:
      id - The id of the resource bundle data
      Returns:
      A ResourceBundleData instance or no record is found.
    • removeResourceBundleData

      ResourceBundleData removeResourceBundleData(String id)
      This method remove the data record in the databas and return the data instance after it has been removed
      Parameters:
      id - The id of the data record
      Returns:
      A ResourceBundleData instance
    • saveResourceBundle

      void saveResourceBundle(ResourceBundleData data)
      This method shoudl create or update a ResourceBundleData instance
      Parameters:
      data - the ResourceBundleData instance to update or create
    • findResourceDescriptions

      org.exoplatform.commons.utils.PageList<ResourceBundleData> findResourceDescriptions(Query q)
      This method search and return a page description iterator
      Parameters:
      q - The search criteria
      Returns:
      A PageDescription Iterator
    • createResourceBundleDataInstance

      ResourceBundleData createResourceBundleDataInstance()
      This method is acted as a factory of
      Returns:
    • getSharedResourceBundleNames

      String[] getSharedResourceBundleNames()
      The developer can store the common properties in certain resource bundles so later he can merge a resource bundle with the shared resource bunldes
      Returns:
      the name of the shared resource bundle