[
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14234789#comment-14234789
]
Stefan Seifert commented on SLING-4212:
---------------------------------------
the patch looks fine for me.
(two really cosmetic notes: 1. move 2x3 redundant codelines for getting
resource for resourcepath into a single new method, 2. eliminate unused imports)
concerning the API change for supporting multiple paths as well on the @Path
and @ResourcePath annotation: it would be more consistent to allow lists of
resources for them as well if we apply this patch. but we have to ensure
backward-compatibility, so we would need to add an additional "paths" array
property to each of them, which makes them a bit more complex with two
alternatives accepting paths. another option would be to introduce a new
annotation e.g. @Paths.
i'm personally not using the resource path injector in my projects, so i have
currently no feeling how useful such an extension is. but if you see good
usecases we can add it there as well.
> Sling Models: Allow multiple values from ValueMap in the resource-path
> injector
> -------------------------------------------------------------------------------
>
> Key: SLING-4212
> URL: https://issues.apache.org/jira/browse/SLING-4212
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: santiago garcĂa pimentel
> Attachments: resourcePath.patch
>
>
> The current implementation of the resource-path injector does not support
> multiple values. I think it could be useful to inject a list of paths from
> the valuemap.
> I have created a small patch to allow this. Right now it only allows them
> from the value map since I didn't want to change the API without consulting
> you first. I you agree I can do this change as well. I also added a test case
> for it.
> You can see a pull request in https://github.com/apache/sling/pull/51
> If there anything I can do to improve this patch, please let me know.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)