You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2016/04/18 11:08:25 UTC

[jira] [Updated] (ARIES-1537) Support Metatype 1.3 annotations for injecting configurations

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

Guillaume Nodet updated ARIES-1537:
-----------------------------------
    Description: 
The CM namespace would have a new element

{code}
<bean class="MyBean">
  <cm:config name="config" />
</bean>

public class MyBean {

    public void setConfig(MyConfig config) {
        ...
    }

    @ObjectClassDefinition(pid = "my.pid")
    public @interface MyConfig {
        String name() default "foo";
    }
}
{code}

This would also be reused by the maven-blueprint-plugin to support configuration injection.

{code}
@Singleton
public class MyBean {

    @Inject
    private MyConfig config;

    @ObjectClassDefinition(pid = "my.pid")
    public @interface MyConfig {
        String name() default "foo";
    }
}
{code}

  was:
The CM namespace would have a new element

{code}
<bean class="MyBean">
  <cm:config name="config" />
</bean>

public class MyBean {

    public void setConfig(MyConfig config) {
        ...
    }

    @ObjectClassDefinition(pid = "my.pid")
    public @interface MyConfig {
        String name() default "foo";
    }
}
{code}

This would also be reused by the maven-blueprint-plugin to support configuration injection.

{code}
public class MyBean {

    @Inject
    private MyConfig config;

    @ObjectClassDefinition(pid = "my.pid")
    public @interface MyConfig {
        String name() default "foo";
    }
}
{code}


> Support Metatype 1.3 annotations for injecting configurations
> -------------------------------------------------------------
>
>                 Key: ARIES-1537
>                 URL: https://issues.apache.org/jira/browse/ARIES-1537
>             Project: Aries
>          Issue Type: New Feature
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: blueprint-core-1.7.0, blueprint-cm-1.1.0
>
>
> The CM namespace would have a new element
> {code}
> <bean class="MyBean">
>   <cm:config name="config" />
> </bean>
> public class MyBean {
>     public void setConfig(MyConfig config) {
>         ...
>     }
>     @ObjectClassDefinition(pid = "my.pid")
>     public @interface MyConfig {
>         String name() default "foo";
>     }
> }
> {code}
> This would also be reused by the maven-blueprint-plugin to support configuration injection.
> {code}
> @Singleton
> public class MyBean {
>     @Inject
>     private MyConfig config;
>     @ObjectClassDefinition(pid = "my.pid")
>     public @interface MyConfig {
>         String name() default "foo";
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)