public class DefaultMetaTypeProvider extends Object implements MetaTypeProvider
DefaultMetaTypeProvider class is an implementation of the
MetaTypeProvider interface which is configured for a given
bundle using a MetaData object.
This class may be used by clients, e.g. ManagedService or
ManagedServiceFactory implementations to easily also implement
the MetaTypeProvider interface.
METATYPE_FACTORY_PID, METATYPE_PID| Constructor and Description |
|---|
DefaultMetaTypeProvider(Bundle bundle,
MetaData metadata) |
| Modifier and Type | Method and Description |
|---|---|
Bundle |
getBundle()
Returns the
Bundle to which this instance belongs. |
Designate |
getDesignate(String pid) |
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.
|
public Bundle getBundle()
Bundle to which this instance belongs.public String[] getLocales()
org.osgi.service.metatype.MetaTypeProviderLocale class.getLocales in interface MetaTypeProvidernull if there is no locale
specific localization can be found.public ObjectClassDefinition getObjectClassDefinition(String id, String locale)
org.osgi.service.metatype.MetaTypeProvider
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.
getObjectClassDefinition in interface MetaTypeProviderid - 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.Copyright © 2010 - 2020 Adobe. All Rights Reserved