@ConsumerType public interface MetaTypeProvider
METATYPE_FACTORY_PID
or METATYPE_PID
service property (or
both). Any PID mentioned in either of these factories must be a valid
argument to the getObjectClassDefinition(String, String)
method.Modifier and Type | Field and Description |
---|---|
static String |
METATYPE_FACTORY_PID
Service property to signal that this service has
ObjectClassDefinition objects for the given factory PIDs. |
static String |
METATYPE_PID
Service property to signal that this service has
ObjectClassDefinition objects for the given PIDs. |
Modifier and Type | Method and Description |
---|---|
String[] |
getLocales()
Return a list of available locales.
|
ObjectClassDefinition |
getObjectClassDefinition(String id,
String locale)
Returns an object class definition for the specified id localized to the
specified locale.
|
static final String METATYPE_PID
ObjectClassDefinition
objects for the given PIDs. The type of
this service property is String+
.static final String METATYPE_FACTORY_PID
ObjectClassDefinition
objects for the given factory PIDs. The
type of this service property is String+
.ObjectClassDefinition getObjectClassDefinition(String id, String locale)
The locale parameter must be a name that consists of language
[
"_" country
[ "_" variation
] ] as is customary in the
Locale
class. This Locale
class is not used because
certain profiles do not contain it.
id
- The ID of the requested object class. This can be a pid or
factory pid returned by getPids or getFactoryPids.locale
- The locale of the definition or null
for default
locale.ObjectClassDefinition
object.IllegalArgumentException
- If the id or locale arguments are not
validString[] getLocales()
Locale
class.null
if there is no locale
specific localization can be found.Copyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0