org.apache.cocoon.i18n
Interface BundleFactory

All Superinterfaces:
Component
All Known Implementing Classes:
XMLResourceBundleFactory

public interface BundleFactory
extends Component

Bundle Factory implementations are responsible for loading and providing particular types of resource bundles, implementors of Bundle interface.

Version:
$Id: BundleFactory.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Konstantin Piroumian, Vadim Gritsenko

Nested Class Summary
static class BundleFactory.ConfigurationKeys
          Constants for bundle factory configuration keys
 
Field Summary
static String ROLE
          Bundle factory ROLE name
 
Method Summary
 void release(Bundle bundle)
          Releases a bundle back to the bundle factory when it's not needed anymore.
 Bundle select(String[] directories, String bundleName, Locale locale)
          Select a bundle based on the catalogue base location, bundle name, and the locale.
 Bundle select(String bundleName, Locale locale)
          Select a bundle based on the bundle name and the locale from the default catalogue.
 Bundle select(String bundleName, String locale)
          Select a bundle based on the bundle name and the locale name from the default catalogue.
 Bundle select(String base, String bundleName, Locale locale)
          Select a bundle based on the catalogue base location, bundle name, and the locale.
 Bundle select(String base, String bundleName, String locale)
          Select a bundle based on the catalogue base location, bundle name, and the locale name.
 

Field Detail

ROLE

static final String ROLE
Bundle factory ROLE name

Method Detail

select

Bundle select(String base,
              String bundleName,
              String locale)
              throws ComponentException
Select a bundle based on the catalogue base location, bundle name, and the locale name.

Parameters:
base - catalogue base location (URI)
bundleName - bundle name
locale - locale name
Returns:
the bundle
Throws:
ComponentException - if a bundle is not found

select

Bundle select(String base,
              String bundleName,
              Locale locale)
              throws ComponentException
Select a bundle based on the catalogue base location, bundle name, and the locale.

Parameters:
base - catalogue base location (URI)
bundleName - bundle name
locale - locale
Returns:
the bundle
Throws:
ComponentException - if a bundle is not found

select

Bundle select(String[] directories,
              String bundleName,
              Locale locale)
              throws ComponentException
Select a bundle based on the catalogue base location, bundle name, and the locale.

Parameters:
directories - catalogue base location (URI)
bundleName - bundle name
locale - locale
Returns:
the bundle
Throws:
ComponentException - if a bundle is not found

select

Bundle select(String bundleName,
              String locale)
              throws ComponentException
Select a bundle based on the bundle name and the locale name from the default catalogue.

Parameters:
bundleName - bundle name
locale - locale name
Returns:
the bundle
Throws:
ComponentException - if a bundle is not found

select

Bundle select(String bundleName,
              Locale locale)
              throws ComponentException
Select a bundle based on the bundle name and the locale from the default catalogue.

Parameters:
bundleName - bundle name
locale - locale
Returns:
the bundle
Throws:
ComponentException - if a bundle is not found

release

void release(Bundle bundle)
Releases a bundle back to the bundle factory when it's not needed anymore.

Parameters:
bundle - the bundle


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