org.apache.felix.scr.impl
Class ComponentMetadata

java.lang.Object
  extended by org.apache.felix.scr.impl.ComponentMetadata

public class ComponentMetadata
extends java.lang.Object

This class holds the information associated to a component in the descriptor *


Constructor Summary
ComponentMetadata()
           
 
Method Summary
 void addDependency(ReferenceMetadata newReference)
          Used to add a reference metadata to the component
 void addProperty(PropertyMetadata newProperty)
          Used to add a property to the instance
 java.util.List getDependencies()
          Returns the dependency descriptors
 java.lang.String getFactoryIdentifier()
          Returns the factory identifier
 java.lang.String getImplementationClassName()
          Returns the name of the implementation class
 java.lang.String getName()
          Returns the name of the component
 java.util.Dictionary getProperties()
          Returns the properties.
 ServiceMetadata getServiceMetadata()
          Returns the associated ServiceMetadata
 boolean isEnabled()
          Returns the value of the enabled flag
 boolean isFactory()
          Test to see if this service is a factory
 boolean isImmediate()
          Returns the flag that defines the activation policy for the component.
 void setEnabled(boolean enabled)
          Setter for the enabled property
 void setFactoryIdentifier(java.lang.String factoryIdentifier)
           
 void setImmediate(boolean immediate)
          Setter for the immediate property
 void setImplementationClassName(java.lang.String implementationClassName)
          Sets the name of the implementation class
 void setName(java.lang.String name)
          Setter for the name
 void setService(ServiceMetadata service)
          Used to set a ServiceMetadata object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentMetadata

public ComponentMetadata()
Method Detail

setName

public void setName(java.lang.String name)
Setter for the name

Parameters:
name -

setEnabled

public void setEnabled(boolean enabled)
Setter for the enabled property

Parameters:
enabled -

setFactoryIdentifier

public void setFactoryIdentifier(java.lang.String factoryIdentifier)
Parameters:
factoryIdentifier -

setImmediate

public void setImmediate(boolean immediate)
Setter for the immediate property

Parameters:
immediate -

setImplementationClassName

public void setImplementationClassName(java.lang.String implementationClassName)
Sets the name of the implementation class

Parameters:
implementationClassName - a class name

addProperty

public void addProperty(PropertyMetadata newProperty)
Used to add a property to the instance

Parameters:
newProperty - a property metadata object

setService

public void setService(ServiceMetadata service)
Used to set a ServiceMetadata object.

Parameters:
service - a ServiceMetadata

addDependency

public void addDependency(ReferenceMetadata newReference)
Used to add a reference metadata to the component

Parameters:
newReference - a new ReferenceMetadata to be added

getName

public java.lang.String getName()
Returns the name of the component

Returns:
A string containing the name of the component

isEnabled

public boolean isEnabled()
Returns the value of the enabled flag

Returns:
a boolean containing the value of the enabled flag

getFactoryIdentifier

public java.lang.String getFactoryIdentifier()
Returns the factory identifier

Returns:
A string containing a factory identifier or null

isImmediate

public boolean isImmediate()
Returns the flag that defines the activation policy for the component.

This method may only be trusted after this instance has been validated by the validate() call. Else it will either return the value of an explicitly set "immediate" attribute or return false if a service element is set or true otherwise. This latter default value deduction may be unsafe while the descriptor has not been completely read.

Returns:
a boolean that defines the activation policy

getImplementationClassName

public java.lang.String getImplementationClassName()
Returns the name of the implementation class

Returns:
the name of the implementation class

getServiceMetadata

public ServiceMetadata getServiceMetadata()
Returns the associated ServiceMetadata

Returns:
a ServiceMetadata object or null if the Component does not provide any service

getProperties

public java.util.Dictionary getProperties()
Returns the properties.

Returns:
the properties as a Dictionary

getDependencies

public java.util.List getDependencies()
Returns the dependency descriptors

Returns:
a Collection of dependency descriptors

isFactory

public boolean isFactory()
Test to see if this service is a factory

Returns:
true if it is a factory, false otherwise