You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Peter Donald (JIRA)" <ji...@apache.org> on 2010/09/24 03:08:51 UTC
[jira] Created: (FELIX-2622) Support static service properties that
are not mirrored into fields
Support static service properties that are not mirrored into fields
-------------------------------------------------------------------
Key: FELIX-2622
URL: https://issues.apache.org/jira/browse/FELIX-2622
Project: Felix
Issue Type: Improvement
Components: iPOJO
Affects Versions: iPOJO-1.6.0
Reporter: Peter Donald
Fix For: iPOJO-1.8.0
Sometimes you want to add static service properties to a component that you don't need to mirror in fields. This is of particular use when the component uses a generic specification (i.e. JComponent.class) but uses service properties to further classify the specification (i.e. name=foo;location=toolbar). An example of annotating a class for this would be
@Provides{ specifications = {JComponent.class}, properties = {@ServiceProperty{name="name", value="foo"},@ServiceProperty{name="location", value="toolbar"}}} )
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-2622) Support static service properties that
are not mirrored into fields
Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Clement Escoffier updated FELIX-2622:
-------------------------------------
Assignee: Clement Escoffier
> Support static service properties that are not mirrored into fields
> -------------------------------------------------------------------
>
> Key: FELIX-2622
> URL: https://issues.apache.org/jira/browse/FELIX-2622
> Project: Felix
> Issue Type: Improvement
> Components: iPOJO
> Affects Versions: iPOJO-1.6.0
> Reporter: Peter Donald
> Assignee: Clement Escoffier
> Fix For: iPOJO-1.8.0
>
>
> Sometimes you want to add static service properties to a component that you don't need to mirror in fields. This is of particular use when the component uses a generic specification (i.e. JComponent.class) but uses service properties to further classify the specification (i.e. name=foo;location=toolbar). An example of annotating a class for this would be
> @Provides{ specifications = {JComponent.class}, properties = {@ServiceProperty{name="name", value="foo"},@ServiceProperty{name="location", value="toolbar"}}} )
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2622) Support static service properties
that are not mirrored into fields
Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914819#action_12914819 ]
Clement Escoffier commented on FELIX-2622:
------------------------------------------
This is fixed in the trunk.
Now you can write:
@Component
@Provides(
properties= {
@StaticServiceProperty(name="prop1", value="prop1", type="java.lang.String"),
@StaticServiceProperty(name="prop2", type="java.lang.String"),
@StaticServiceProperty(name="props", value="{prop1, prop2}", type="string[]"),
@StaticServiceProperty(name="mandatory1", mandatory=true, type="string")
})
I've used StaticServiceProperty and no ServiceProperty because the set of attribute is different. Indeed, the type attriubte is mandatory for static properties.
> Support static service properties that are not mirrored into fields
> -------------------------------------------------------------------
>
> Key: FELIX-2622
> URL: https://issues.apache.org/jira/browse/FELIX-2622
> Project: Felix
> Issue Type: Improvement
> Components: iPOJO
> Affects Versions: iPOJO-1.6.0
> Reporter: Peter Donald
> Assignee: Clement Escoffier
> Fix For: iPOJO-1.8.0
>
>
> Sometimes you want to add static service properties to a component that you don't need to mirror in fields. This is of particular use when the component uses a generic specification (i.e. JComponent.class) but uses service properties to further classify the specification (i.e. name=foo;location=toolbar). An example of annotating a class for this would be
> @Provides{ specifications = {JComponent.class}, properties = {@ServiceProperty{name="name", value="foo"},@ServiceProperty{name="location", value="toolbar"}}} )
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (FELIX-2622) Support static service properties
that are not mirrored into fields
Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Clement Escoffier resolved FELIX-2622.
--------------------------------------
Resolution: Fixed
> Support static service properties that are not mirrored into fields
> -------------------------------------------------------------------
>
> Key: FELIX-2622
> URL: https://issues.apache.org/jira/browse/FELIX-2622
> Project: Felix
> Issue Type: Improvement
> Components: iPOJO
> Affects Versions: iPOJO-1.6.0
> Reporter: Peter Donald
> Assignee: Clement Escoffier
> Fix For: iPOJO-1.8.0
>
>
> Sometimes you want to add static service properties to a component that you don't need to mirror in fields. This is of particular use when the component uses a generic specification (i.e. JComponent.class) but uses service properties to further classify the specification (i.e. name=foo;location=toolbar). An example of annotating a class for this would be
> @Provides{ specifications = {JComponent.class}, properties = {@ServiceProperty{name="name", value="foo"},@ServiceProperty{name="location", value="toolbar"}}} )
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.