You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2014/06/30 23:13:26 UTC

[jira] [Commented] (SLING-3716) Sling Models: Add support for constructor dependency injection

    [ https://issues.apache.org/jira/browse/SLING-3716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14048171#comment-14048171 ] 

Stefan Seifert commented on SLING-3716:
---------------------------------------

in order to support constructor-based injection with the same features like the field injection, several sling models annotations have to be extended to be supported as constructor parameters as well:
* Default
* Filter
* Optional
* Required
* Source
* Via

> Sling Models: Add support for constructor dependency injection
> --------------------------------------------------------------
>
>                 Key: SLING-3716
>                 URL: https://issues.apache.org/jira/browse/SLING-3716
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Stefan Seifert
>            Priority: Minor
>
> Currently, Sling Models only supports dependency injection for fields (or interface getter methods), but not for constructor arguments. This ticket is for discussing what this constructor dependency injection should support, and perhaps finally provide a patch to implement it.
> This is somewhat related to SLING-3715 for class-based dependency injection, because this would come in especially handy for constructor injection.



--
This message was sent by Atlassian JIRA
(v6.2#6252)