KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > resourcebundle > ResourceBundleService


1 //
2
// ____.
3
// __/\ ______| |__/\. _______
4
// __ .____| | \ | +----+ \
5
// _______| /--| | | - \ _ | : - \_________
6
// \\______: :---| : : | : | \________>
7
// |__\---\_____________:______: :____|____:_____\
8
// /_____|
9
//
10
// . . . i n j a h i a w e t r u s t . . .
11
//
12
//
13
package org.jahia.resourcebundle;
14
15 import java.util.Iterator JavaDoc;
16
17 import org.jahia.exceptions.JahiaException;
18 import org.jahia.services.JahiaService;
19
20 /**
21  * Resource Bundle Service.
22  * Maintain a registry of resource bundles that can be referred by dynamic content ( JahiaField content ).
23  *
24  * @author Khue Nguyen
25  */

26 public abstract class ResourceBundleService extends JahiaService
27 {
28     protected String JavaDoc configFileName = "resourcebundles_config.xml";
29
30     /**
31      * Returns an enumeration of all Resource Bundle Definition.
32      *
33      * @return all ResourceBundle registered in the system
34      * @throws JahiaException
35      */

36     public abstract Iterator JavaDoc getResourceBundles()
37     throws JahiaException;
38
39     /**
40      * Returns an Resource Bundle Definition looking at it key
41      *
42      * @param key ResourceBundle Key
43      * @return an Resource Bundle looking at it key
44      * @throws JahiaException
45      */

46     public abstract ResourceBundleDefinition getResourceBundle(String JavaDoc key)
47     throws JahiaException;
48
49     /**
50      * Add a resource Bundle.
51      * If a resource bundle already exists for this key, this is this one that is returned !
52      * The existing resource bundle definition won't be overriden.
53      *
54      * @param key ResourceBundle Key
55      * @return an Resource Bundle looking at it key
56      * @throws JahiaException
57      */

58     public abstract ResourceBundleDefinition
59     declareResourceBundleDefinition (String JavaDoc key, String JavaDoc resourceBundleName)
60     throws JahiaException;
61
62 }
63
64
Popular Tags