org.apache.felix.scrplugin.om
Class Component

java.lang.Object
  extended by org.apache.felix.scrplugin.om.AbstractObject
      extended by org.apache.felix.scrplugin.om.Component

public class Component
extends AbstractObject

Component is a described component.


Field Summary
protected  String activate
          Activation method.
protected  String configurationPolicy
          Configuration policy.
protected  String deactivate
          Deactivation method.
protected  Boolean enabled
          Is this component enabled?
protected  String factory
          The factory.
protected  Boolean immediate
          Is this component immediately started.
protected  Implementation implementation
          The implementation.
protected  boolean isAbstract
          Is this an abstract description?
protected  boolean isDs
          Is this a descriptor to be ignored ?
protected  String modified
          Modified method.
protected  String name
          The name of the component.
protected  List<Property> properties
          All properties.
protected  List<Reference> references
          The references.
protected  Service service
          The corresponding service.
protected  int specVersion
          The spec version.
 
Fields inherited from class org.apache.felix.scrplugin.om.AbstractObject
tag
 
Constructor Summary
Component()
          Default constructor.
Component(JavaTag t)
          Constructor from java source.
 
Method Summary
 void addProperty(Property property)
           
 void addReference(Reference ref)
           
protected  void checkLifecycleMethod(int specVersion, JavaClassDescription javaClass, String methodName, boolean isActivate, IssueLog iLog)
          Check for existence of lifecycle methods.
 String getActivate()
          Get the name of the activate method (or null for default)
 String getConfigurationPolicy()
          Return the configuration policy.
 String getDeactivate()
          Get the name of the deactivate method (or null for default)
 String getFactory()
           
 Implementation getImplementation()
           
 JavaClassDescription getJavaClassDescription()
          Return the associated java class description
 String getModified()
          Get the name of the modified method (or null for default)
 String getName()
           
 List<Property> getProperties()
           
 List<Reference> getReferences()
           
 Service getService()
           
 int getSpecVersion()
          Get the spec version.
 boolean isAbstract()
           
 boolean isDs()
           
 Boolean isEnabled()
           
 Boolean isImmediate()
           
 void setAbstract(boolean isAbstract)
           
 void setActivate(String value)
          Set the name of the activate method (or null for default)
 void setConfigurationPolicy(String value)
          Set the configuration policy.
 void setDeactivate(String value)
          Set the name of the deactivate method (or null for default)
 void setDs(boolean isDs)
           
 void setEnabled(Boolean enabled)
           
 void setFactory(String factory)
           
 void setImmediate(Boolean immediate)
           
 void setImplementation(Implementation implementation)
           
 void setModified(String value)
          Set the name of the modified method (or null for default)
 void setName(String name)
           
 void setProperties(List<Property> properties)
           
 void setReferences(List<Reference> references)
           
 void setService(Service service)
           
 void setSpecVersion(int value)
          Set the spec version.
 String toString()
           
 void validate(int specVersion, IssueLog iLog)
          Validate the component description.
 
Methods inherited from class org.apache.felix.scrplugin.om.AbstractObject
getJavaTag, logError, logWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
The name of the component.


enabled

protected Boolean enabled
Is this component enabled?


immediate

protected Boolean immediate
Is this component immediately started.


factory

protected String factory
The factory.


implementation

protected Implementation implementation
The implementation.


properties

protected List<Property> properties
All properties.


service

protected Service service
The corresponding service.


references

protected List<Reference> references
The references.


isAbstract

protected boolean isAbstract
Is this an abstract description?


isDs

protected boolean isDs
Is this a descriptor to be ignored ?


configurationPolicy

protected String configurationPolicy
Configuration policy. (V1.1)


activate

protected String activate
Activation method. (V1.1)


deactivate

protected String deactivate
Deactivation method. (V1.1)


modified

protected String modified
Modified method. (V1.1)


specVersion

protected int specVersion
The spec version.

Constructor Detail

Component

public Component()
Default constructor.


Component

public Component(JavaTag t)
Constructor from java source.

Method Detail

getSpecVersion

public int getSpecVersion()
Get the spec version.


setSpecVersion

public void setSpecVersion(int value)
Set the spec version.


getJavaClassDescription

public JavaClassDescription getJavaClassDescription()
Return the associated java class description


getProperties

public List<Property> getProperties()
Returns:
All properties of this component.

setProperties

public void setProperties(List<Property> properties)

addProperty

public void addProperty(Property property)

getName

public String getName()

setName

public void setName(String name)

getFactory

public String getFactory()

setFactory

public void setFactory(String factory)

isEnabled

public Boolean isEnabled()

setEnabled

public void setEnabled(Boolean enabled)

isImmediate

public Boolean isImmediate()

setImmediate

public void setImmediate(Boolean immediate)

getImplementation

public Implementation getImplementation()

setImplementation

public void setImplementation(Implementation implementation)

getService

public Service getService()

setService

public void setService(Service service)

getReferences

public List<Reference> getReferences()

setReferences

public void setReferences(List<Reference> references)

addReference

public void addReference(Reference ref)

isAbstract

public boolean isAbstract()

setAbstract

public void setAbstract(boolean isAbstract)

isDs

public boolean isDs()

setDs

public void setDs(boolean isDs)

getActivate

public String getActivate()
Get the name of the activate method (or null for default)


setDeactivate

public void setDeactivate(String value)
Set the name of the deactivate method (or null for default)


getDeactivate

public String getDeactivate()
Get the name of the deactivate method (or null for default)


setActivate

public void setActivate(String value)
Set the name of the activate method (or null for default)


setModified

public void setModified(String value)
Set the name of the modified method (or null for default)


getModified

public String getModified()
Get the name of the modified method (or null for default)


validate

public void validate(int specVersion,
                     IssueLog iLog)
              throws SCRDescriptorException
Validate the component description. If errors occur a message is added to the issues list, warnings can be added to the warnings list.

Throws:
SCRDescriptorException

checkLifecycleMethod

protected void checkLifecycleMethod(int specVersion,
                                    JavaClassDescription javaClass,
                                    String methodName,
                                    boolean isActivate,
                                    IssueLog iLog)
                             throws SCRDescriptorException
Check for existence of lifecycle methods.

Parameters:
specVersion - The spec version
javaClass - The java class to inspect.
methodName - The method name.
warnings - The list of warnings used to add new warnings.
Throws:
SCRDescriptorException

getConfigurationPolicy

public String getConfigurationPolicy()
Return the configuration policy.


setConfigurationPolicy

public void setConfigurationPolicy(String value)
Set the configuration policy.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.