Knopflerfish OSGi 1.3.3

org.knopflerfish.util.metatype
Class MTP

java.lang.Object
  extended byorg.knopflerfish.util.metatype.MTP
All Implemented Interfaces:
MetaTypeProvider, PIDProvider
Direct Known Subclasses:
SystemMetatypeProvider

public class MTP
extends java.lang.Object
implements MetaTypeProvider, PIDProvider

Implementation of the MetaTypeProvider interface.


Constructor Summary
MTP(java.lang.String id)
           
 
Method Summary
 void addFactory(java.lang.String pid, ObjectClassDefinition ocd)
           
 void addService(java.lang.String pid, ObjectClassDefinition ocd)
           
 int compareTo(java.lang.Object other)
           
 boolean equals(java.lang.Object other)
           
 java.lang.String[] getFactoryPids()
          Get set of factory PIDs.
 java.lang.String getId()
           
 java.lang.String[] getLocales()
          Return a list of locales available or null if only 1 The return parameter must be a name that consists of language [ _ country [ _ variation ]] as is customary in the Locale class.
 ObjectClassDefinition getObjectClassDefinition(java.lang.String pid, java.lang.String locale)
          Return the definition of this object class for a locale.
 java.lang.String[] getPids()
          Get set of service PIDs.
 int hashCode()
           
 java.lang.String toString()
           
 java.lang.String toString(boolean bFull)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MTP

public MTP(java.lang.String id)
Method Detail

addService

public void addService(java.lang.String pid,
                       ObjectClassDefinition ocd)

addFactory

public void addFactory(java.lang.String pid,
                       ObjectClassDefinition ocd)

getPids

public java.lang.String[] getPids()
Description copied from interface: PIDProvider
Get set of service PIDs.

Specified by:
getPids in interface PIDProvider
Returns:
Set of String, wher each string is a possible service PID.

getFactoryPids

public java.lang.String[] getFactoryPids()
Description copied from interface: PIDProvider
Get set of factory PIDs.

Specified by:
getFactoryPids in interface PIDProvider
Returns:
Set of String, wher each string is a possible factory PID.

getLocales

public java.lang.String[] getLocales()
Description copied from interface: MetaTypeProvider
Return a list of locales available or null if only 1 The return 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:
getLocales in interface MetaTypeProvider

getObjectClassDefinition

public ObjectClassDefinition getObjectClassDefinition(java.lang.String pid,
                                                      java.lang.String locale)
Description copied from interface: MetaTypeProvider
Return the definition of this object class for a 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.

The implementation should use the locale parameter to match an ObjectClassDefinition object. It should follow the customary locale search path by removing the latter parts of the name.

Specified by:
getObjectClassDefinition in interface MetaTypeProvider
Parameters:
pid - The PID for which the type is needed or null if there is only 1
locale - The locale of the definition or null for default locale
Returns:
the ObjectClassDefinition object

toString

public java.lang.String toString()

toString

public java.lang.String toString(boolean bFull)

getId

public java.lang.String getId()

compareTo

public int compareTo(java.lang.Object other)

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object other)

Knopflerfish OSGi 1.3.3