org.apache.felix.ipojo.architecture
Class ComponentTypeDescription

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

public class ComponentTypeDescription
extends Object

Component Type description.

Author:
Felix Project Team

Constructor Summary
ComponentTypeDescription(IPojoFactory factory)
          Constructor.
 
Method Summary
 void addProperty(PropertyDescription pd)
          Adds a configuration properties to the component type.
 void addProperty(String name, String value)
          Adds a String property in the component type.
 void addProperty(String name, String value, boolean immutable)
          Adds a String property in the component type.
 void addProvidedServiceSpecification(String serviceSpecification)
          Adds a provided service to the component type.
 BundleContext getBundleContext()
           
 String getClassName()
          Deprecated.  
 Element getDescription()
          Gets the component type description.
 IPojoFactory getFactory()
          Gets the attached factory.
 String[] getFactoryInterfacesToPublish()
          Gets the interfaces published by the factory.
 String getName()
          Returns the component-type name.
 PropertyDescription[] getProperties()
          Gets component-type properties.
 Dictionary getPropertiesToPublish()
          Computes the default service properties to publish : factory.name, service.pid, component.providedServiceSpecification, component.properties, component.description, factory.State.
 String[] getprovidedServiceSpecification()
          Gets the list of provided service offered by instances of this type.
 String getVersion()
          Gets the component type version.
 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 String toString()
Gets a printable form of the current component type description.

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

getClassName

public String getClassName()
Deprecated. 

Gets the implementation class of this component type.

Returns:
the component type implementation class name.

getVersion

public 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(String name,
                        String value)
Adds a String property in the component type.

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

addProperty

public void addProperty(String name,
                        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

getprovidedServiceSpecification

public 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(String serviceSpecification)
Adds a provided service to the component type.

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

getName

public String getName()
Returns the component-type name.

Returns:
the name of this component type

getPropertiesToPublish

public Dictionary 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 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 Element getDescription()
Gets the component type description.

Returns:
: the description

getBundleContext

public BundleContext getBundleContext()


Copyright © 2011 Apache Software Foundation. All Rights Reserved.