[jira] [Commented] (SLING-5682) special json array import for sling post servlet to post orderered structures

2016-06-22 Thread Bertrand Delacretaz (JIRA)

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

Bertrand Delacretaz commented on SLING-5682:


Are the changes to {{JsonReader.java}} in your patch required to implement 
this? 

At a quick glance they look more like refactoring, if that's correct I'd prefer 
a minimal patch just to support the {{OrderedJsonReader}}.

> special json array import for sling post servlet to post orderered structures
> -
>
> Key: SLING-5682
> URL: https://issues.apache.org/jira/browse/SLING-5682
> Project: Sling
>  Issue Type: Improvement
>  Components: Engine
>Reporter: Nicolas Peltier
> Attachments: SLING-5682.patch
>
>
> it is not possible right now to post an ordered structure through json data 
> [0]. this ticket is for implementing [~bdelacretaz] proposal to use JSON 
> Arrays:
> {noformat}
> {
>"title": "The parent node",
>"SLING:ordered": [{
>"SLING:name": "first",
>"title": "This comes first"
>}, {
>"SLING:name": "second",
>"title": "This comes second"
>}]
> }
> {noformat}
> This needs to be triggered by selector or content-type switch so that
> the existing POST behavior is unchanged.
> I suppose having SLING:ordered should then also set the appropriate
> mixin on the parent node.
> [0] http://sling.markmail.org/thread/plov2u7kibscn7sx



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5682) special json array import for sling post servlet to post orderered structures

2016-06-22 Thread Nicolas Peltier (JIRA)

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

Nicolas Peltier commented on SLING-5682:


thx for digging that ticket out of the deads, [~sseif...@pro-vision.de]! 

[~bdelacretaz] problem is that OrderedJsonReader is essentially a JsonReader. 
Changes brought to JsonReader were done so it can be extended (and overriden) 
with minimum of code duplication, basically not touching the logic, just 
cutting things differently, with different visibility. 
The only other alternative i see is to increase code duplication, if you prefer.

> special json array import for sling post servlet to post orderered structures
> -
>
> Key: SLING-5682
> URL: https://issues.apache.org/jira/browse/SLING-5682
> Project: Sling
>  Issue Type: Improvement
>  Components: Engine
>Reporter: Nicolas Peltier
> Attachments: SLING-5682.patch
>
>
> it is not possible right now to post an ordered structure through json data 
> [0]. this ticket is for implementing [~bdelacretaz] proposal to use JSON 
> Arrays:
> {noformat}
> {
>"title": "The parent node",
>"SLING:ordered": [{
>"SLING:name": "first",
>"title": "This comes first"
>}, {
>"SLING:name": "second",
>"title": "This comes second"
>}]
> }
> {noformat}
> This needs to be triggered by selector or content-type switch so that
> the existing POST behavior is unchanged.
> I suppose having SLING:ordered should then also set the appropriate
> mixin on the parent node.
> [0] http://sling.markmail.org/thread/plov2u7kibscn7sx



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5682) special json array import for sling post servlet to post orderered structures

2016-06-22 Thread Bertrand Delacretaz (JIRA)

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

Bertrand Delacretaz commented on SLING-5682:


Ok, I understand, thanks for explaining.

As the contenloader is an old, stable module we need full test coverage of the 
affected code before changing it. Building with {{mvn clean install -P 
jacoco-report}} and looking at {{target/site/jacoco-merged/index.html}} shows 
that the createPrincipal* methods are not tested, IMO we need to add such tests 
before applying your changes.

If your patch does test those methods we might split it and apply the testing 
parts first, otherwise we'll need to add tests for those methods, before making 
any other changes to make sure there are no regressions.

> special json array import for sling post servlet to post orderered structures
> -
>
> Key: SLING-5682
> URL: https://issues.apache.org/jira/browse/SLING-5682
> Project: Sling
>  Issue Type: Improvement
>  Components: Engine
>Reporter: Nicolas Peltier
> Attachments: SLING-5682.patch
>
>
> it is not possible right now to post an ordered structure through json data 
> [0]. this ticket is for implementing [~bdelacretaz] proposal to use JSON 
> Arrays:
> {noformat}
> {
>"title": "The parent node",
>"SLING:ordered": [{
>"SLING:name": "first",
>"title": "This comes first"
>}, {
>"SLING:name": "second",
>"title": "This comes second"
>}]
> }
> {noformat}
> This needs to be triggered by selector or content-type switch so that
> the existing POST behavior is unchanged.
> I suppose having SLING:ordered should then also set the appropriate
> mixin on the parent node.
> [0] http://sling.markmail.org/thread/plov2u7kibscn7sx



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5682) special json array import for sling post servlet to post orderered structures

2016-06-22 Thread Nicolas Peltier (JIRA)

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

Nicolas Peltier commented on SLING-5682:


thanks [~bdelacretaz], i'll do that!

> special json array import for sling post servlet to post orderered structures
> -
>
> Key: SLING-5682
> URL: https://issues.apache.org/jira/browse/SLING-5682
> Project: Sling
>  Issue Type: Improvement
>  Components: Engine
>Reporter: Nicolas Peltier
> Attachments: SLING-5682.patch
>
>
> it is not possible right now to post an ordered structure through json data 
> [0]. this ticket is for implementing [~bdelacretaz] proposal to use JSON 
> Arrays:
> {noformat}
> {
>"title": "The parent node",
>"SLING:ordered": [{
>"SLING:name": "first",
>"title": "This comes first"
>}, {
>"SLING:name": "second",
>"title": "This comes second"
>}]
> }
> {noformat}
> This needs to be triggered by selector or content-type switch so that
> the existing POST behavior is unchanged.
> I suppose having SLING:ordered should then also set the appropriate
> mixin on the parent node.
> [0] http://sling.markmail.org/thread/plov2u7kibscn7sx



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5682) special json array import for sling post servlet to post orderered structures

2016-07-07 Thread Nicolas Peltier (JIRA)

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

Nicolas Peltier commented on SLING-5682:


thx [~bdelacretaz]!

> special json array import for sling post servlet to post orderered structures
> -
>
> Key: SLING-5682
> URL: https://issues.apache.org/jira/browse/SLING-5682
> Project: Sling
>  Issue Type: Improvement
>  Components: Engine
>Reporter: Nicolas Peltier
>Assignee: Bertrand Delacretaz
> Fix For: JCR ContentLoader 2.2.0
>
> Attachments: SLING-5682-before.patch, SLING-5682.patch
>
>
> it is not possible right now to post an ordered structure through json data 
> [0]. this ticket is for implementing [~bdelacretaz] proposal to use JSON 
> Arrays:
> {noformat}
> {
>"title": "The parent node",
>"SLING:ordered": [{
>"SLING:name": "first",
>"title": "This comes first"
>}, {
>"SLING:name": "second",
>"title": "This comes second"
>}]
> }
> {noformat}
> This needs to be triggered by selector or content-type switch so that
> the existing POST behavior is unchanged.
> I suppose having SLING:ordered should then also set the appropriate
> mixin on the parent node.
> [0] http://sling.markmail.org/thread/plov2u7kibscn7sx



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)