Dependency Descriptor
Description
A dependency declaration defines the key that the component will use to access a service via a service or component manager and the expected service type. A dependecy may be declared as optional by setting the optional attribute value to TRUE. The default value for optional is FALSE.
Attributes
Attribute | Required | Description |
---|---|---|
key | no | The key that the component will use as the argument to lookup on the supplied service or component manager. The default value is the value is equal to the service classname. |
type | yes | Declaration of an interface classname. |
version | no | Declaration of service version. If not declarared a version of 1.0 is assumed. |
optional | no | If TRUE, the dependency may not be fulfilled by a container. If FALSE (the default) the container shall ensure that the depdendency is fulfilled before component deployment. |
Nested Elements
Element | Occurance | Description |
---|---|---|
attributes | 0..1 | A set of attribute declarations. |
Example XML
<dependency optional="FALSE" key="my-transformer" type="org.apache.cocoon.api.Transformer" version="1.1"/>