KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > script > common > bundle > BundleNodeFactory


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * $Header:$
17  */

18 package org.apache.beehive.netui.script.common.bundle;
19
20 import java.util.Locale JavaDoc;
21 import java.util.ResourceBundle JavaDoc;
22
23 import org.apache.struts.util.MessageResources;
24
25 /**
26  *
27  */

28 public class BundleNodeFactory {
29
30     private static final BundleNodeFactory FACTORY = new BundleNodeFactory();
31
32     public static final BundleNodeFactory getInstance() {
33         return FACTORY;
34     }
35
36     private BundleNodeFactory() {}
37
38     public final BundleNode getStrutsBundleNode(String JavaDoc name, MessageResources messageResources, Locale JavaDoc locale) {
39         return new StrutsBundleNode(locale, messageResources);
40     }
41
42     public final BundleNode getResourceBundleNode(String JavaDoc name, ResourceBundle JavaDoc resourceBundle, Locale JavaDoc locale) {
43         return new ResourceBundleNode(resourceBundle);
44     }
45 }
46
Popular Tags