org.apache.felix.metatype.internal
Class MetaTypeInformationImpl

java.lang.Object
  extended by org.apache.felix.metatype.internal.MetaTypeInformationImpl
All Implemented Interfaces:
MetaTypeInformation, MetaTypeProvider
Direct Known Subclasses:
ServiceMetaTypeInformation

public class MetaTypeInformationImpl
extends Object
implements MetaTypeInformation

The MetaTypeInformationImpl class implements the MetaTypeInformation interface returned from the MetaTypeService.

Author:
fmeschbe

Field Summary
static String SERVICE_FACTORYPID
           
 
Constructor Summary
protected MetaTypeInformationImpl(Bundle bundle)
           
 
Method Summary
protected  void addFactoryPids(String[] factoryPids)
           
protected  void addMetaData(MetaData md)
           
protected  void addMetaTypeProvider(String key, MetaTypeProvider mtp)
           
protected  void addPids(String[] pids)
           
 Bundle getBundle()
          Return the bundle for which this object provides meta type information.
 String[] getFactoryPids()
          Return the Factory PIDs (for ManagedServiceFactories) for which ObjectClassDefinition information is available.
 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.
 String[] getPids()
          Return the PIDs (for ManagedServices) for which ObjectClassDefinition information is available.
protected  void removeFactoryPid(String factoryPid)
           
protected  MetaTypeProvider removeMetaTypeProvider(String key)
           
protected  void removePid(String pid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_FACTORYPID

public static final String SERVICE_FACTORYPID
See Also:
Constant Field Values
Constructor Detail

MetaTypeInformationImpl

protected MetaTypeInformationImpl(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.

getFactoryPids

public 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 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.

getLocales

public 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(String id,
                                                      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.

addMetaData

protected void addMetaData(MetaData md)

addPids

protected void addPids(String[] pids)

removePid

protected void removePid(String pid)

addFactoryPids

protected void addFactoryPids(String[] factoryPids)

removeFactoryPid

protected void removeFactoryPid(String factoryPid)

addMetaTypeProvider

protected void addMetaTypeProvider(String key,
                                   MetaTypeProvider mtp)

removeMetaTypeProvider

protected MetaTypeProvider removeMetaTypeProvider(String key)


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.