KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > om > common > LanguageSet


1 /*
2  * Copyright 2003,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 /*
17
18  */

19
20 package org.apache.pluto.om.common;
21
22 import java.util.Iterator JavaDoc;
23 import java.util.Locale JavaDoc;
24
25 /**
26  * <P>
27  * This interface provides access to a set of <CODE>Language</CODE> objects.
28  * </P>
29  * <P>
30  * This interface defines the model as known from the MVC pattern.
31  * Its purpose is to provide read access to the data stored in the model.
32  * </P>
33  *
34
35  */

36 public interface LanguageSet extends org.apache.pluto.om.Model
37 {
38
39     /**
40      * Returns all elements of this set as iterator
41      * The return value cannot be NULL.
42      *
43      * @return An iterator containing all language objects
44      */

45     public Iterator JavaDoc iterator();
46
47     /**
48      * Returns a iterator of all supported locales by this portlet
49      * The return value cannot be NULL.
50      *
51      * @return an iterator containing all supported locales as java.util.Locale objects
52      */

53     public Iterator JavaDoc getLocales();
54
55     /**
56      * Returns the language object of the given locale.
57      * If the given locale is not supported the Language of the preferred locale
58      * will be returned.
59      * The return value may be NULL if there is no preferred locale as well.
60      *
61      * @return the language object of the given locale
62      */

63     public Language get(Locale JavaDoc locale);
64
65     /**
66      * Returns the default locale object or NULL if there is no default locale
67      *
68      * @return the default locale object or NULL if there is no default locale
69      */

70     public java.util.Locale JavaDoc getDefaultLocale();
71 }
72
Popular Tags