org.apache.felix.ipojo.architecture

## Class ComponentTypeDescription

- java.lang.Object
- - org.apache.felix.ipojo.architecture.ComponentTypeDescription

    public class ComponentTypeDescription
    extends java.lang.Object

Component Type description.

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`ComponentTypeDescription(IPojoFactory factory)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`void` `addProperty(PropertyDescription pd)` Adds a configuration properties to the component type.
`void` `addProperty(java.lang.String name, java.lang.String value)` Adds a String property in the component type.
`void` `addProperty(java.lang.String name, java.lang.String value, boolean immutable)` Adds a String property in the component type.
`void` `addProvidedServiceSpecification(java.lang.String serviceSpecification)` Adds a provided service to the component type.
`org.osgi.framework.BundleContext` `getBundleContext()`
`java.lang.String` `getClassName()` Deprecated.
`org.apache.felix.ipojo.metadata.Element` `getDescription()` Gets the component type description.
`IPojoFactory` `getFactory()` Gets the attached factory.
`java.lang.String[]` `getFactoryInterfacesToPublish()` Gets the interfaces published by the factory.
`CustomHandlerInfo` `getHandlerInfo(java.lang.String handlerNs, java.lang.String handlerName)`
`java.lang.String` `getName()` Returns the component-type name.
`PropertyDescription[]` `getProperties()` Gets component-type properties.
`java.util.Dictionary<java.lang.String,java.lang.Object>` `getPropertiesToPublish()` Computes the default service properties to publish : factory.name, service.pid, component.providedServiceSpecification, component.properties, component.description, factory.State.
`java.lang.String[]` `getprovidedServiceSpecification()` Gets the list of provided service offered by instances of this type.
`java.lang.String` `getVersion()` Gets the component type version.
`void` `setHandlerInfo(java.lang.String handlerNs, java.lang.String handlerName, CustomHandlerInfo info)` Adds the HandlerInfo for specified handler.
`java.lang.String` `toString()` Gets 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(IPojoFactory factory)

Constructor.

Parameters:
  `factory` - : represented factory.

### Method Detail

#### getFactory

    public IPojoFactory getFactory()

Gets the attached factory.

Returns:
  the factory

#### toString

    public java.lang.String toString()

Gets 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()

Deprecated.
Gets the implementation class of this component type.

Returns:
  the component type implementation class name.

#### getVersion

    public java.lang.String getVersion()

Gets the component type version.

Returns:
  the component type version or `null` if not set.

#### getProperties

    public PropertyDescription[] getProperties()

Gets 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)

Adds 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)

Adds 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)

Adds a configuration properties to the component type.

Parameters:
  `pd` - : the property to add

#### setHandlerInfo

    public void setHandlerInfo(java.lang.String handlerNs,
                               java.lang.String handlerName,
                               CustomHandlerInfo info)

Adds the HandlerInfo for specified handler.

Parameters:
  `handlerNs` - Handler's namespace
  `handlerName` - Handler's name
  `info` - HandlerInfo associated with the given custom handler.

#### getHandlerInfo

    public CustomHandlerInfo getHandlerInfo(java.lang.String handlerNs,
                                            java.lang.String handlerName)

#### getprovidedServiceSpecification

    public java.lang.String[] getprovidedServiceSpecification()

Gets 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)

Adds a provided service to the component type.

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

#### getName

    public java.lang.String getName()

Returns the component-type name.

Returns:
  the name of this component type

#### getPropertiesToPublish

    public java.util.Dictionary<java.lang.String,java.lang.Object> getPropertiesToPublish()

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

#### getFactoryInterfacesToPublish

    public java.lang.String[] getFactoryInterfacesToPublish()

Gets the interfaces published by the factory. By default publish both `Factory` and `ManagedServiceFactory`.

Returns:
  : the list of interface published by the factory.

#### getDescription

    public org.apache.felix.ipojo.metadata.Element getDescription()

Gets the component type description.

Returns:
  : the description

#### getBundleContext

    public org.osgi.framework.BundleContext getBundleContext()