Package org.apache.felix.metatype
Class DefaultMetaTypeProvider
- java.lang.Object
-
- org.apache.felix.metatype.DefaultMetaTypeProvider
-
- All Implemented Interfaces:
MetaTypeProvider
@Deprecated(since="2021-05-27") public class DefaultMetaTypeProvider extends Object implements MetaTypeProvider
Deprecated.The Apache Felix metatype API is deprecated, please use the OSGi metatype API instead.TheDefaultMetaTypeProvider
class is an implementation of theMetaTypeProvider
interface which is configured for a given bundle using aMetaData
object.This class may be used by clients, e.g.
ManagedService
orManagedServiceFactory
implementations to easily also implement theMetaTypeProvider
interface.
-
-
Field Summary
-
Fields inherited from interface org.osgi.service.metatype.MetaTypeProvider
METATYPE_FACTORY_PID, METATYPE_PID
-
-
Constructor Summary
Constructors Constructor Description DefaultMetaTypeProvider(Bundle bundle, MetaData metadata)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Bundle
getBundle()
Deprecated.Returns theBundle
to which this instance belongs.Designate
getDesignate(String pid)
Deprecated.String[]
getLocales()
Deprecated.Return a list of available locales.ObjectClassDefinition
getObjectClassDefinition(String id, String locale)
Deprecated.Returns an object class definition for the specified id localized to the specified locale.
-
-
-
Method Detail
-
getBundle
public Bundle getBundle()
Deprecated.Returns theBundle
to which this instance belongs.
-
getLocales
public String[] getLocales()
Deprecated.Description copied from interface:MetaTypeProvider
Return a list of available locales. The results must be names that consists of language [ _ country [ _ variation ]] as is customary in theLocale
class.- Specified by:
getLocales
in interfaceMetaTypeProvider
- Returns:
- An array of locale strings or
null
if there is no locale specific localization can be found.
-
getObjectClassDefinition
public ObjectClassDefinition getObjectClassDefinition(String id, String locale)
Deprecated.Description copied from interface:MetaTypeProvider
Returns an object class definition for the specified id localized to the specified locale.The locale parameter must be a name that consists of
language
[ "_"country
[ "_"variation
] ] as is customary in theLocale
class. ThisLocale
class is not used because certain profiles do not contain it.- Specified by:
getObjectClassDefinition
in interfaceMetaTypeProvider
- Parameters:
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 ornull
for default locale.- Returns:
- A
ObjectClassDefinition
object.
-
-