public class ComponentMetadata extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONFIGURATION_POLICY_IGNORE |
static String |
CONFIGURATION_POLICY_OPTIONAL |
static String |
CONFIGURATION_POLICY_REQUIRE |
Constructor and Description |
---|
ComponentMetadata(DSVersion dsVersion) |
Modifier and Type | Method and Description |
---|---|
void |
addDependency(ReferenceMetadata newReference)
Used to add a reference metadata to the component
|
void |
addFactoryProperty(PropertyMetadata newProperty)
Used to add a factory property to the instance
|
void |
addProperty(PropertyMetadata newProperty)
Used to add a property to the instance
|
String |
getActivate()
Returns the name of the activate method
|
List<String> |
getActivationFields()
Returns the names of the activation fields
|
List<String> |
getConfigurationPid()
Returns the configuration pid for the component.
|
String |
getConfigurationPolicy()
Returns the configuration Policy
|
String |
getDeactivate()
Returns the name of the deactivate method
|
List<ReferenceMetadata> |
getDependencies()
Returns the dependency descriptors
|
DSVersion |
getDSVersion()
Returns the namespace code of the namespace of the component element
declaring this component.
|
String |
getFactoryIdentifier()
Returns the factory identifier
|
Map<String,Object> |
getFactoryProperties()
Returns the factory properties.
|
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 |
getNumberOfConstructorParameters()
Returns the number of constructor parameters (0 is default)
|
int |
getPidIndex(TargetedPID pid) |
Map<String,Object> |
getProperties()
Returns the properties.
|
ServiceMetadata |
getServiceMetadata()
Returns the associated ServiceMetadata
|
ServiceMetadata.Scope |
getServiceScope() |
boolean |
isActivateDeclared()
Returns whether the activate method has been declared in the descriptor
or not.
|
boolean |
isConfigurableServiceProperties() |
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 |
isConfigurationPidDeclared()
Returns whether the configuration-pid has been declared in the descriptor
or not.
|
boolean |
isConfigurationRequired()
Returns
true if the configuration policy is configured to
CONFIGURATION_POLICY_REQUIRE . |
boolean |
isConfigureWithInterfaces() |
boolean |
isDeactivateDeclared()
Returns whether the deactivate method has been declared in the descriptor
or not.
|
boolean |
isDelayedKeepInstances() |
boolean |
isDeleteCallsModify() |
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.
|
boolean |
isObsoleteFactoryComponentFactory() |
boolean |
isPersistentFactoryComponent() |
void |
setActivate(String activate)
Sets the name of the activate method
|
void |
setActivationFields(String[] fields) |
void |
setConfigurableServiceProperties(boolean configurableServiceProperties) |
void |
setConfigurationPid(String[] configurationPid)
Setter for the configuration-pid component (since DS 1.2)
|
void |
setConfigurationPolicy(String configurationPolicy)
Sets the configuration policy
|
void |
setConfigureWithInterfaces(boolean configureWithInterfaces) |
void |
setDeactivate(String deactivate)
Sets the name of the deactivate method
|
void |
setDelayedKeepInstances(boolean delayedKeepInstances) |
void |
setDeleteCallsModify(boolean deleteCallsModify) |
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 |
setInit(String value) |
void |
setModified(String modified)
Sets the name of the modified method
|
void |
setName(String name)
Setter for the name
|
void |
setObsoleteFactoryComponentFactory(boolean obsoleteFactoryComponentFactory) |
void |
setPersistentFactoryComponent(boolean persistentFactoryComponent) |
void |
setService(ServiceMetadata service)
Used to set a ServiceMetadata object.
|
void |
validate()
Method used to verify if the semantics of this metadata are correct
|
public static final String CONFIGURATION_POLICY_REQUIRE
public static final String CONFIGURATION_POLICY_IGNORE
public static final String CONFIGURATION_POLICY_OPTIONAL
public ComponentMetadata(DSVersion dsVersion)
public void setConfigurationPid(String[] configurationPid)
configurationPid
- 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 addFactoryProperty(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 void setConfigurableServiceProperties(boolean configurableServiceProperties)
public void setPersistentFactoryComponent(boolean persistentFactoryComponent)
public void setDeleteCallsModify(boolean deleteCallsModify)
public void setObsoleteFactoryComponentFactory(boolean obsoleteFactoryComponentFactory)
public void setConfigureWithInterfaces(boolean configureWithInterfaces)
public void setDelayedKeepInstances(boolean delayedKeepInstances)
public void setActivationFields(String[] fields)
public void setInit(String value)
public DSVersion getDSVersion()
public String getName()
public List<String> getConfigurationPid()
public int getPidIndex(TargetedPID pid)
public boolean isConfigurationPidDeclared()
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 int getNumberOfConstructorParameters()
public List<String> getActivationFields()
null
public String getDeactivate()
public boolean isDeactivateDeclared()
public String getModified()
public ServiceMetadata getServiceMetadata()
public ServiceMetadata.Scope getServiceScope()
public Map<String,Object> getProperties()
public Map<String,Object> getFactoryProperties()
public List<ReferenceMetadata> 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 boolean isConfigurableServiceProperties()
public boolean isPersistentFactoryComponent()
public boolean isDeleteCallsModify()
public boolean isObsoleteFactoryComponentFactory()
public boolean isConfigureWithInterfaces()
public boolean isDelayedKeepInstances()
public void validate()
Copyright © 2006–2020 The Apache Software Foundation. All rights reserved.