org.apache.felix.ipojo.architecture
Class ComponentTypeDescription

java.lang.Object
  extended by org.apache.felix.ipojo.architecture.ComponentTypeDescription

public class ComponentTypeDescription
extends java.lang.Object

Component Type description.

Author:
Felix Project Team

Constructor Summary
ComponentTypeDescription(Factory factory)
          Constructor.
 
Method Summary
 void addProperty(PropertyDescription pd)
          Add a configuration properties to the component type.
 void addProperty(java.lang.String name, java.lang.String value)
          Add a String property in the component type.
 void addProperty(java.lang.String name, java.lang.String value, boolean immutable)
          Add a String property in the component type.
 void addProvidedServiceSpecification(java.lang.String serviceSpecification)
          Add a provided service to the component type.
 org.osgi.framework.BundleContext getBundleContext()
           
 java.lang.String getClassName()
          Get the implementation class of this component type.
 org.apache.felix.ipojo.metadata.Element getDescription()
          Get the component type description.
 java.lang.String getName()
          Return the component-type name.
 PropertyDescription[] getProperties()
          Get component-type properties.
 java.util.Dictionary getPropertiesToPublish()
          Compute the default service properties to publish : factory.name, service.pid, component.providedServiceSpecification, component.properties, component.description, factory.State.
 java.lang.String[] getprovidedServiceSpecification()
          Get the list of provided service offered by instances of this type.
 java.lang.String toString()
          Get a printable form of the current component type description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComponentTypeDescription

public ComponentTypeDescription(Factory factory)
Constructor.

Parameters:
factory - : represented factory.
Method Detail

toString

public java.lang.String toString()
Get a printable form of the current component type description.

Overrides:
toString in class java.lang.Object
Returns:
printable form of the component type description
See Also:
Object.toString()

getClassName

public java.lang.String getClassName()
Get the implementation class of this component type.

Returns:
the component type implementation class name.

getProperties

public PropertyDescription[] getProperties()
Get component-type properties.

Returns:
the list of configuration properties accepted by the component type type.

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)
Add a String property in the component type.

Parameters:
name - : property name.
value - : property value.

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value,
                        boolean immutable)
Add a String property in the component type.

Parameters:
name - : property name.
value - : property value.
immutable - : the property is immutable.

addProperty

public void addProperty(PropertyDescription pd)
Add a configuration properties to the component type.

Parameters:
pd - : the property to add

getprovidedServiceSpecification

public java.lang.String[] getprovidedServiceSpecification()
Get the list of provided service offered by instances of this type.

Returns:
the list of the provided service.

addProvidedServiceSpecification

public void addProvidedServiceSpecification(java.lang.String serviceSpecification)
Add a provided service to the component type.

Parameters:
serviceSpecification - : the provided service to add (interface name)

getName

public java.lang.String getName()
Return the component-type name.

Returns:
the name of this component type

getPropertiesToPublish

public java.util.Dictionary getPropertiesToPublish()
Compute the default service properties to publish : factory.name, service.pid, component.providedServiceSpecification, component.properties, component.description, factory.State.

Returns:
: the dictionary of properties to publish.

getDescription

public org.apache.felix.ipojo.metadata.Element getDescription()
Get the component type description.

Returns:
: the description

getBundleContext

public org.osgi.framework.BundleContext getBundleContext()