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

Justin Edelson updated SLING-5739:
----------------------------------
    Attachment: SLING-5739.diff

Given the use case in SLING-6778, I would like to revive this issue. I think 
that issue pretty well illustrates how having multiple @Via options is a good 
idea.

Attaching an updated version of the diff. The only significant change between 
this and the original from last year is that a ViaProvider can specify a 
special value to indicate that the original adaptable should be used.

> [Sling Models] Allow for extensible @Via providers
> --------------------------------------------------
>
>                 Key: SLING-5739
>                 URL: https://issues.apache.org/jira/browse/SLING-5739
>             Project: Sling
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Justin Edelson
>         Attachments: SLING-5739.diff
>
>
> Currently, @Via support in Sling Models is limited to JavaBean properties. It 
> would be useful to be able to extend this and allow for downstream projects 
> to add new @Via providers.
> Proposing to support this by extending the @Via annotation
> {code}
> @Via(value = "jcr:content", type = ChildResource.class)
> {code}
> The default type is BeanProperty (the current behavior).
> New providers can be added by implementing a ViaProvider SPI and provide a 
> marker class for use in the annotation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to