|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.scr.impl.metadata.ComponentMetadata
public class ComponentMetadata
This class holds the information associated to a component in the descriptor *
Field Summary | |
---|---|
static String |
CONFIGURATION_POLICY_IGNORE
|
static String |
CONFIGURATION_POLICY_OPTIONAL
|
static String |
CONFIGURATION_POLICY_REQUIRE
|
Constructor Summary | |
---|---|
ComponentMetadata(int namespaceCode)
|
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 |
String |
getActivate()
Returns the name of the activate method |
String |
getConfigurationPolicy()
Returns the configuration Policy |
String |
getDeactivate()
Returns the name of the deactivate method |
List |
getDependencies()
Returns the dependency descriptors |
String |
getFactoryIdentifier()
Returns the factory identifier |
String |
getImplementationClassName()
Returns the name of the implementation class |
String |
getModified()
Returns the name of the modified method |
String |
getName()
Returns the name of the component |
int |
getNamespaceCode()
Returns the namespace code of the namespace of the component element declaring this component. |
Dictionary |
getProperties()
Returns the properties. |
ServiceMetadata |
getServiceMetadata()
Returns the associated ServiceMetadata |
boolean |
isActivateDeclared()
Returns whether the activate method has been declared in the descriptor or not. |
boolean |
isConfigurationIgnored()
Returns true if the configuration policy is configured to
CONFIGURATION_POLICY_IGNORE . |
boolean |
isConfigurationOptional()
Returns true if the configuration policy is configured to
CONFIGURATION_POLICY_OPTIONAL . |
boolean |
isConfigurationRequired()
Returns true if the configuration policy is configured to
CONFIGURATION_POLICY_REQUIRE . |
boolean |
isDeactivateDeclared()
Returns whether the deactivate method has been declared in the descriptor or not. |
boolean |
isDS11()
Returns true if the metadata declaration has used the
Declarative Services version 1.1 namespace or a later namespace. |
boolean |
isDS11Felix()
Returns true if the metadata declaration has used the
Declarative Services version 1.1-felixnamespace or a later namespace. |
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 |
setActivate(String activate)
Sets the name of the activate method |
void |
setConfigurationPolicy(String configurationPolicy)
Sets the configuration policy |
void |
setDeactivate(String deactivate)
Sets the name of the deactivate method |
void |
setEnabled(boolean enabled)
Setter for the enabled property |
void |
setFactoryIdentifier(String factoryIdentifier)
|
void |
setImmediate(boolean immediate)
Setter for the immediate property |
void |
setImplementationClassName(String implementationClassName)
Sets the name of the implementation class |
void |
setModified(String modified)
Sets the name of the modified method |
void |
setName(String name)
Setter for the name |
void |
setService(ServiceMetadata service)
Used to set a ServiceMetadata object. |
void |
validate(Logger logger)
Method used to verify if the semantics of this metadata are correct |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONFIGURATION_POLICY_REQUIRE
public static final String CONFIGURATION_POLICY_IGNORE
public static final String CONFIGURATION_POLICY_OPTIONAL
Constructor Detail |
---|
public ComponentMetadata(int namespaceCode)
Method Detail |
---|
public void setName(String name)
name
- public void setEnabled(boolean enabled)
enabled
- public void setFactoryIdentifier(String factoryIdentifier)
factoryIdentifier
- public void setImmediate(boolean immediate)
immediate
- public void setImplementationClassName(String implementationClassName)
implementationClassName
- a class namepublic void setConfigurationPolicy(String configurationPolicy)
configurationPolicy
- configuration policypublic void setActivate(String activate)
activate
- a method namepublic void setDeactivate(String deactivate)
deactivate
- a method namepublic void setModified(String modified)
modified
- a method namepublic void addProperty(PropertyMetadata newProperty)
newProperty
- a property metadata objectpublic void setService(ServiceMetadata service)
service
- a ServiceMetadatapublic void addDependency(ReferenceMetadata newReference)
newReference
- a new ReferenceMetadata to be addedpublic int getNamespaceCode()
public boolean isDS11()
true
if the metadata declaration has used the
Declarative Services version 1.1 namespace or a later namespace.
public boolean isDS11Felix()
true
if the metadata declaration has used the
Declarative Services version 1.1-felixnamespace or a later namespace.
public String getName()
public boolean isEnabled()
public String getFactoryIdentifier()
public boolean isImmediate()
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 or the factory attribute is set or true otherwise. This latter
default value deduction may be unsafe while the descriptor has not been
completely read.
public String getImplementationClassName()
public String getConfigurationPolicy()
public String getActivate()
public boolean isActivateDeclared()
public String getDeactivate()
public boolean isDeactivateDeclared()
public String getModified()
public ServiceMetadata getServiceMetadata()
public Dictionary getProperties()
public List getDependencies()
public boolean isFactory()
public boolean isConfigurationRequired()
true
if the configuration policy is configured to
CONFIGURATION_POLICY_REQUIRE
.
public boolean isConfigurationIgnored()
true
if the configuration policy is configured to
CONFIGURATION_POLICY_IGNORE
.
public boolean isConfigurationOptional()
true
if the configuration policy is configured to
CONFIGURATION_POLICY_OPTIONAL
.
public void validate(Logger logger)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |