[
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14237866#comment-14237866
]
santiago garcía pimentel edited comment on SLING-4212 at 12/8/14 1:48 PM:
--------------------------------------------------------------------------
I'm attaching a new patch with the updated API. Most of the injector was
rewritten as well.
The pull request is also updated if you prefer it.
in the API
-Added field {{Path.paths}}, gave default value to {{Path.value}}
-Added field{{ResourcePath.paths}}
-bump package version to 1.2 as suggested by the baseline
in the implementation
- Most of {{ResourcePathInjector}} was rewritten
- {{Path}} has priority over {{ResourcePath}} as it was before, also,
{{Path.value}} has priority over {{Path.paths}} and
{{ResourcePathInjector.path}} over {{ResourcePathInjector.paths}}
-return null if there is a mismatch in the number of resources to inject vs the
declared field.
-added test cases to test injecting multiple resources from both {{Path}} and
{{ResourcePath}}
[[email protected]], [~kwin]
was (Author: santiagozky):
I'm attaching a new patch with the updated API. Most of the injector was
rewritten as well.
The pull request is also updated if you prefer it.
in the API
-Added field {{Path.paths}}, gave default value to {{PAth.value}}
-Added field{{ResourcePath.paths}}
-bump package version to 1.2 as suggested by the baseline
in the implementation
- Most of {{ResourcePathInjector}} was rewritten
- {{Path}} has priority over {{ResourcePath}} as it was before, also,
{{Path.value}} has priority over {{Path.paths}} and
{{ResourcePathInjector.path}} over {{ResourcePathInjector.paths}}
-return null if there is a mismatch in the number of resources to inject vs the
declared field.
[[email protected]] [~kwin]
> 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-API.patch, 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)