Knopflerfish OSGi 5.2.0

org.knopflerfish.util.metatype
Class BundleMetaTypeResource

java.lang.Object
  extended by org.knopflerfish.util.metatype.BundleMetaTypeResource
All Implemented Interfaces:
MetaTypeInformation, MetaTypeProvider

public class BundleMetaTypeResource
extends java.lang.Object
implements MetaTypeInformation


Field Summary
 
Fields inherited from interface org.osgi.service.metatype.MetaTypeProvider
METATYPE_FACTORY_PID, METATYPE_PID
 
Constructor Summary
BundleMetaTypeResource(Bundle bundle)
           
 
Method Summary
 void addMetaData(org.knopflerfish.util.metatype.MetaData md)
           
 Bundle getBundle()
          Return the bundle for which this object provides meta type information.
 java.lang.String[] getFactoryPids()
          Return the Factory PIDs (for ManagedServiceFactories) for which ObjectClassDefinition information is available.
 java.lang.String[] getLocales()
          Return a list of available locales.
 ObjectClassDefinition getObjectClassDefinition(java.lang.String id, java.lang.String locale)
          Returns an object class definition for the specified id localized to the specified locale.
 java.lang.String[] getPids()
          Return the PIDs (for ManagedServices) for which ObjectClassDefinition information is available.
 void prepare()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BundleMetaTypeResource

public BundleMetaTypeResource(Bundle bundle)
Method Detail

getBundle

public Bundle getBundle()
Description copied from interface: MetaTypeInformation
Return the bundle for which this object provides meta type information.

Specified by:
getBundle in interface MetaTypeInformation
Returns:
Bundle for which this object provides meta type information.

addMetaData

public void addMetaData(org.knopflerfish.util.metatype.MetaData md)

getFactoryPids

public java.lang.String[] getFactoryPids()
Description copied from interface: MetaTypeInformation
Return the Factory PIDs (for ManagedServiceFactories) for which ObjectClassDefinition information is available.

Specified by:
getFactoryPids in interface MetaTypeInformation
Returns:
Array of Factory PIDs.

getPids

public java.lang.String[] getPids()
Description copied from interface: MetaTypeInformation
Return the PIDs (for ManagedServices) for which ObjectClassDefinition information is available.

Specified by:
getPids in interface MetaTypeInformation
Returns:
Array of PIDs.

prepare

public void prepare()

getLocales

public java.lang.String[] getLocales()
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 the Locale class.

Specified by:
getLocales in interface MetaTypeProvider
Returns:
An array of locale strings or null if there is no locale specific localization can be found.

getObjectClassDefinition

public ObjectClassDefinition getObjectClassDefinition(java.lang.String id,
                                                      java.lang.String locale)
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 the Locale class. This Locale class is not used because certain profiles do not contain it.

Specified by:
getObjectClassDefinition in interface MetaTypeProvider
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 or null for default locale.
Returns:
A ObjectClassDefinition object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Knopflerfish OSGi 5.2.0