Top Description Fields Methods
org.osgi.service.metatype

public Interface MetaTypeProvider

Known Direct Subinterfaces
org.osgi.service.metatype.MetaTypeInformation
Annotations
@ConsumerType
Imports
org.osgi.annotation.versioning.ConsumerType

Provides access to metatypes. This interface can be implemented on a Managed Service or Managed Service Factory as well as registered as a service. When registered as a service, it must be registered with a 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.
Author
$Id: 39c152ce5cdd1c764cb49f9272492b430d43cc0c $

Field Summary

Modifier and TypeField and Description
public static final String
METATYPE_FACTORY_PID

Service property to signal that this service has ObjectClassDefinition objects for the given factory PIDs.

public static final String
METATYPE_PID

Service property to signal that this service has ObjectClassDefinition objects for the given PIDs.

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

An array of locale strings or null if there is no locale specific localization can be found.
getLocales
()

Return a list of available locales.

public ObjectClassDefinition

Returns:

A ObjectClassDefinition object.
getObjectClassDefinition
(String
The ID of the requested object class. This can be a pid or factory pid returned by getPids or getFactoryPids.
id
,
String
The locale of the definition or null for default locale.
locale
)

Returns an object class definition for the specified id localized to the specified locale.

Field Detail

METATYPE_FACTORY_PIDback to summary
public static final String METATYPE_FACTORY_PID

Service property to signal that this service has ObjectClassDefinition objects for the given factory PIDs. The type of this service property is String+.

Since
1.2
METATYPE_PIDback to summary
public static final String METATYPE_PID

Service property to signal that this service has ObjectClassDefinition objects for the given PIDs. The type of this service property is String+.

Since
1.2

Method Detail

getLocalesback to summary
public String[] getLocales()

Return a list of available locales. The results must be names that consists of language [ _ country [ _ variation ]] as is customary in the Locale class.

Returns:String[]

An array of locale strings or null if there is no locale specific localization can be found.

getObjectClassDefinitionback to summary
public ObjectClassDefinition getObjectClassDefinition(String id, String locale)

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 the Locale class. This Locale class is not used because certain profiles do not contain it.

Parameters
id:String

The ID of the requested object class. This can be a pid or factory pid returned by getPids or getFactoryPids.

locale:String

The locale of the definition or null for default locale.

Returns:ObjectClassDefinition

A ObjectClassDefinition object.

Exceptions
IllegalArgumentException:
If the id or locale arguments are not valid