[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2015-12-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SLING-4212:
---

Github user santiagozky closed the pull request at:

https://github.com/apache/sling/pull/51


> 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
>Assignee: Stefan Seifert
> Fix For: Sling Models API 1.2.0, Sling Models Impl 1.2.0
>
> Attachments: resourcePath-API.patch, 
> resourcePath-API_noRequiredCheck.patch, resourcePath-API_updated.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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2015-01-24 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14290662#comment-14290662
 ] 

santiago garcía pimentel commented on SLING-4212:
-

great. thank you

 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
Assignee: Stefan Seifert
 Fix For: Sling Models API 1.2.0, Sling Models Impl 1.2.0

 Attachments: resourcePath-API.patch, 
 resourcePath-API_noRequiredCheck.patch, resourcePath-API_updated.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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2015-01-23 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14289967#comment-14289967
 ] 

santiago garcía pimentel commented on SLING-4212:
-

[~sseif...@pro-vision.de] thank you, that will be great!

 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
Assignee: Stefan Seifert
 Fix For: Sling Models API 1.2.0, Sling Models Impl 1.2.0

 Attachments: resourcePath-API.patch, 
 resourcePath-API_noRequiredCheck.patch, resourcePath-API_updated.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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2015-01-23 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14289232#comment-14289232
 ] 

santiago garcía pimentel commented on SLING-4212:
-

[~sseif...@pro-vision.de] Yes, the code to check if it is required or optional 
is a bit messy, but I could not find any other way.
An all or nothing approach would not be ideally for me, but I think it'll work 
good enough. I think that adding a new interface is too much struggle for only 
one feature.

I can make some additional changes later (I'm not sure I'll have a lot of time 
recently) and update the patch. Maybe I would just have to check a previous 
commit. Im not sure.


 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
Assignee: Stefan Seifert
 Fix For: Sling Models API 1.2.0, Sling Models Impl 1.2.0

 Attachments: resourcePath-API.patch, resourcePath-API_updated.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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2015-01-22 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14288488#comment-14288488
 ] 

Stefan Seifert commented on SLING-4212:
---

a simple solution would be: always try to resolve all paths. if it least one 
path resolving fails the whole injection fails, regardless of required or 
optional settings. then we do not have the described problems and the code 
would be simplified.
does this still fulfill your requirements on the injector?

 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
Assignee: Stefan Seifert
 Fix For: Sling Models API 1.2.0, Sling Models Impl 1.2.0

 Attachments: resourcePath-API.patch, resourcePath-API_updated.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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2015-01-19 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14282502#comment-14282502
 ] 

santiago garcía pimentel commented on SLING-4212:
-

[~sseif...@pro-vision.de] do you think we can integrate this or is there 
anything else that you think can be improved?

 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


 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-15 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14246879#comment-14246879
 ] 

Stefan Seifert commented on SLING-4212:
---

i my view this would be most consistent:
# field injection = mandatory: succeeds when all items could be injected, fails 
if only some or none could be injected
# field injection = optional: succeeds always, may inject none, some or all 
items

whether the mandatory/optional status is controlled on field level with 
@Optional or @Required, or via custom annotation, or via default injection 
strategy should be irrelevant.

 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-11 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14242542#comment-14242542
 ] 

santiago garcía pimentel commented on SLING-4212:
-

[~sseif...@pro-vision.de] :
I actually hadn't thought about it. maybe we can use the 
DefaultInjectionStrategy to differentiate between both behaviours? 
I'll check the intetration tests, I had only checked the unit tests.

 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-09 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14239294#comment-14239294
 ] 

Stefan Seifert commented on SLING-4212:
---

the API changes look or for me.

some notes on the implementation (ResourcehPathInjector):
# if you specify multiple paths, and some of them cannot be resolved you get 
just a list with those that could be resolved. only if none of the paths could 
be resolved the injection failed. is this the expected behavior? i would expect 
that the injection fails if at least one of the paths could not be resolved.
# perhaps we should add some debug logging which prints out which paths tried 
to be resolved and which failed - so if the injections fails you have an option 
to find out which of the paths failed.
# the integration test fail currently (SimpleTest). this is because the 
injector implements the interface AcceptsNullName, but fails on line 76 when 
accesing the valuemap with name = null. you have to check all code paths to 
proper handling name=null (not check valuemap in this case)

 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-08 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237825#comment-14237825
 ] 

santiago garcía pimentel commented on SLING-4212:
-

while changing this I found myself a bit confused with a specific test for the 
injector.
ResourcePathInjectionTest.testOptionalPathInjectionWithNonResourceAdaptable 
adapts a request to ResourcePathAllOptionalModel and expects property 
'fromPath' to be null. why is this? it is possible to obtain a resourceResolver 
from the request and find a resource from a path set in the annotation.

 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-08 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237836#comment-14237836
 ] 

santiago garcía pimentel commented on SLING-4212:
-

[~kwin], [~sseif...@pro-vision.de] another question. what would be the behavior 
if several paths are to be injected but the field was not declared as a list? 
Should the first resource be injected or some exception should be thrown?



 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-08 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14237844#comment-14237844
 ] 

Konrad Windszus commented on SLING-4212:


[~santiagozky] 
{{ResourcePathInjectionTest.testOptionalPathInjectionWithNonResourceAdaptable}} 
expects null for all model fields, because you act on a mocked 
{{SlingHttpServletRequest}}. That will return {{null}} for all getters. 
Therefore the injector is not able to find out the according 
{{ResourceResolver}}. Regarding the other question, Injectors are not 
allowed/expected to throw exceptions. Therefore please log that accordingly in 
the Injector and rather return {{null}} (i.e. no injection should take plae). 
If you would just inject the first resource, then the error is not that obvious 
to the developer any more.

 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-05 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14235286#comment-14235286
 ] 

Konrad Windszus commented on SLING-4212:


For me changing the annotations {{@Path}} and {{@ResourcePath}} to accept a 
String array instead of a simple string is still backwards compatible 
(instantiation works in the same way). I don't know what the baseline plugin is 
thinking of that, though...
[~sseif...@pro-vision.de] Do you agree?

 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-05 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14235290#comment-14235290
 ] 

Stefan Seifert commented on SLING-4212:
---

it has to be _binary_ backwards compatible, which is i assume not the case if 
we change the annotation field from string to array.
if you compile your code against sling models 1.1 you expect it will run with 
sling models 1.2 without recompilation 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-04 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-03 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232837#comment-14232837
 ] 

santiago garcía pimentel commented on SLING-4212:
-

btw, [~sseif...@pro-vision.de] will it make sense for you to change the api to 
allow multiple paths from the annotation directly? We probably would need 
changes in org.apache.sling.models.annotations.Path and 
org.apache.sling.models.annotations.injectorspecific.ResourcePath

 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-02 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232082#comment-14232082
 ] 

Stefan Seifert commented on SLING-4212:
---

i had only a brief look at the patch - it seems you (or your IDE) reformatted a 
lot of lines, so its difficult to tell what has changed, and what is only 
reformatted (esp. in ResourcePathInjector.java).
can you reproduce the patch and make sure only the lines really changed are 
included?

 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

 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)


[jira] [Commented] (SLING-4212) Sling Models: Allow multiple values from ValueMap in the resource-path injector

2014-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14229753#comment-14229753
 ] 

ASF GitHub Bot commented on SLING-4212:
---

GitHub user santiagozky opened a pull request:

https://github.com/apache/sling/pull/51

Resource path list support

SLING-4212

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/santiagozky/sling resourcePathMultiple

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/sling/pull/51.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #51


commit be0ccd651ddea99c5be8e76a96c1252e82ce0e5d
Author: santiago garcia pimentel santiago.pimen...@netcentric.biz
Date:   2014-12-01T12:34:58Z

make resourcePath injector accept multiple paths from valuemap

commit 5fdc9b855b15cf7db7816c0ad5804ee28e496fe0
Author: santiago garcia pimentel santiago.pimen...@netcentric.biz
Date:   2014-12-01T12:43:16Z

fix formating




 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

 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.
 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)