KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > osgi > service > metatype > MetaTypeProvider


1 /*
2  * $Header: /cvshome/build/org.osgi.service.metatype/src/org/osgi/service/metatype/MetaTypeProvider.java,v 1.11 2006/06/16 16:31:23 hargrave Exp $
3  *
4  * Copyright (c) OSGi Alliance (2001, 2006). All Rights Reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package org.osgi.service.metatype;
19
20 /**
21  * Provides access to metatypes.
22  *
23  * @version $Revision: 1.11 $
24  */

25 public interface MetaTypeProvider {
26     /**
27      * Returns an object class definition for the specified id localized to the
28      * specified locale.
29      *
30      * <p>
31      * The locale parameter must be a name that consists of <code>language</code>[
32      * "_" <code>country</code>[ "_" <code>variation</code>] ] as is customary in
33      * the <code>Locale</code> class. This <code>Locale</code> class is not used
34      * because certain profiles do not contain it.
35      *
36      * @param id The ID of the requested object class. This can be a pid or
37      * factory pid returned by getPids or getFactoryPids.
38      * @param locale The locale of the definition or <code>null</code> for default
39      * locale.
40      * @return A <code>ObjectClassDefinition</code> object.
41      * @throws IllegalArgumentException If the id or locale arguments are not
42      * valid
43      */

44     public ObjectClassDefinition getObjectClassDefinition(String JavaDoc id, String JavaDoc locale);
45
46     /**
47      * Return a list of available locales.
48      *
49      * The results must be names that consists of language [ _ country [ _
50      * variation ]] as is customary in the <code>Locale</code> class.
51      *
52      * @return An array of locale strings or <code>null</code> if there is no
53      * locale specific localization can be found.
54      *
55      */

56     public String JavaDoc[] getLocales();
57 }
58
Popular Tags