You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2018/04/30 08:14:00 UTC

[jira] [Closed] (FELIX-5454) [R7] Service properties for ComponentFactory

     [ https://issues.apache.org/jira/browse/FELIX-5454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed FELIX-5454.
-----------------------------------

> [R7] Service properties for ComponentFactory
> --------------------------------------------
>
>                 Key: FELIX-5454
>                 URL: https://issues.apache.org/jira/browse/FELIX-5454
>             Project: Felix
>          Issue Type: Sub-task
>          Components: Declarative Services (SCR)
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: scr-2.1.0
>
>
> To allow the developer to specify service properties for the ComponentFactory service, two new elements are added to the component description schema as child elements of the component element:
>     <choice minOccurs="0" maxOccurs="unbounded">
>         <element name="factoryProperty" type="scr:Tproperty" />
>         <element name="factoryProperties" type="scr:Tproperties" />
>     </choice>
> These elements can be used, when the factory attribute of the component element is specified. If the factory attribute of the component element is not specified, the component is not a factory component and the factoryProperty and factoryProperties elements are ignored if specified. If the factory attribute of the component element is specified, the factoryProperty and factoryProperties elements supply factory  properties which are used as service properties for the ComponentFactory service in addition to the existing component.name and component.factory factory properties which are always set and cannot be overridden.
> Factory properties are separate from component properties and are only specified in the component description. Factory properties are not component properties and are not passed to the component instance and are only used as service properties for the ComponentFactory service.
> To enable factory properties to be specified via annotations, two new elements are added to the Component annotation:
>     String[] factoryProperty() default {};
>     String[] factoryProperties() default {};
> If either of these elements is specified, then the factory element must also be specified to mark the component as a factory component. The values of these elements have the same syntax as the values of the property and properties elements, respectively.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)