[jira] [Created] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Bertrand Delacretaz (JIRA)
Bertrand Delacretaz created SLING-3267: -- Summary: ResourceDecorator returning null should cause Resources to be ignored Key: SLING-3267 URL: https://issues.apache.org/jira/browse/SLING-3267

Re: [OT] Feature flag influence on Resource access (Was: FYI: feature flags prototype)

2013-12-06 Thread Bertrand Delacretaz
Hi, On Fri, Nov 15, 2013 at 8:40 AM, Felix Meschberger fmesc...@adobe.com wrote: So, finally, I agree that baking the feature flag support directly into the ResourceResolver implementation is suboptimal, it is probably still the most comprehensive and complete solution to the

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Bertrand Delacretaz (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841192#comment-13841192 ] Bertrand Delacretaz commented on SLING-3267: I have added tests that clarify

[jira] [Commented] (SLING-3265) Implement suggestions from SLING-3223 in Sling replication

2013-12-06 Thread Tommaso Teofili (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841206#comment-13841206 ] Tommaso Teofili commented on SLING-3265: I'll create a new patch in a short while,

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Justin Edelson (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841233#comment-13841233 ] Justin Edelson commented on SLING-3267: --- Agreed - a ResourceDecorator returning null

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Simone Tripodi (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841238#comment-13841238 ] Simone Tripodi commented on SLING-3267: --- {quote} * listChildren() - returns an

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Felix Meschberger (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841242#comment-13841242 ] Felix Meschberger commented on SLING-3267: -- Please don't apply this change.

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Bertrand Delacretaz (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841259#comment-13841259 ] Bertrand Delacretaz commented on SLING-3267: My http://svn.apache.org/r1548491

[jira] [Updated] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Bertrand Delacretaz (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bertrand Delacretaz updated SLING-3267: --- Attachment: SLING-3267.patch Here's my suggested patch where a null

[jira] [Comment Edited] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Bertrand Delacretaz (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841272#comment-13841272 ] Bertrand Delacretaz edited comment on SLING-3267 at 12/6/13 1:45 PM:

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Justin Edelson (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841276#comment-13841276 ] Justin Edelson commented on SLING-3267: --- To be clear, my comment above was not about

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Simone Tripodi (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841281#comment-13841281 ] Simone Tripodi commented on SLING-3267: --- just my 0.002 cents: rather than

Re: [OT] Feature flag influence on Resource access (Was: FYI: feature flags prototype)

2013-12-06 Thread Felix Meschberger
Hi Please don't mingle resource decoration with the feature flag. The use cases are different and returning null from the ResourceDecorator is clearly defined to be same as returning the same resource, i.e. no decoration at all. If this results in NPEs the calling code must be fixed. Feature

RE: [OT] Feature flag influence on Resource access (Was: FYI: feature flags prototype)

2013-12-06 Thread Mike Müller
Hi I'm not sure if it is a good idea that a ResourceDecorator could return null. IMHO it's not what someone would expect from a Decorator. All the more that decorator is the name of a well known pattern, which would never be a null object (only a null object could be decorated but not vice

FYI, request setup script prototype

2013-12-06 Thread Bertrand Delacretaz
Hi, From the funky prototypes department: I was talking to a colleague this week about how to minimize the amount of code in presentation templates, and we came up with the idea of having a setup script run at the beginning of the request processing, to prepare values, functions, iterators etc.

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Simone Tripodi (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841404#comment-13841404 ] Simone Tripodi commented on SLING-3267: --- bq, NonExistingResources are still

[jira] [Comment Edited] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Simone Tripodi (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841404#comment-13841404 ] Simone Tripodi edited comment on SLING-3267 at 12/6/13 4:46 PM:

Re: FYI, request setup script prototype

2013-12-06 Thread Justin Edelson
Hi Bertrand, This looks a bit too magical to me :) All you're avoiding is a single include line, right? Or am I missing something? You could also do the same thing (more or less) with a BindingsValuesProvider. Justin On Fri, Dec 6, 2013 at 11:40 AM, Bertrand Delacretaz bdelacre...@apache.org

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Justin Edelson (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841435#comment-13841435 ] Justin Edelson commented on SLING-3267: --- bq. But please take in consideration that

Re: [OT] Feature flag influence on Resource access (Was: FYI: feature flags prototype)

2013-12-06 Thread Alexander Klimetschek
On 06.12.2013, at 08:08, Felix Meschberger fmesc...@adobe.com wrote: Think back and forth I really think that we should put feature flag support into the ResourceResolver proper. I agree. Another completely open question is: the resource resolver is not tied to a request, backend services

Re: FYI, request setup script prototype

2013-12-06 Thread Daniel Klco
Actually, I've been batting this around in my head for awhile. Make it possible to create BindingsValuesProviders which are constrained by resource type. And a simple service for getting the various default Sling properties from the existing bindings. Does that make sense? Then you could just

[jira] [Commented] (SLING-3267) ResourceDecorator returning null should cause Resources to be ignored

2013-12-06 Thread Simone Tripodi (JIRA)
[ https://issues.apache.org/jira/browse/SLING-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13841445#comment-13841445 ] Simone Tripodi commented on SLING-3267: --- bq. ResourceDecorators are not the right

Re: FYI, request setup script prototype

2013-12-06 Thread Alexander Klimetschek
Right. Sightly has the concept of a Use class (*). It is triggered from the template using a certain command/include. This use class can be either a) next to the script in the resource type folder (using the Java script engine if it's in Java, I think it could also be written in Javascript, in

Re: FYI, request setup script prototype

2013-12-06 Thread Justin Edelson
Hi Dan, Conceptually this makes sense to me. Obviously you can do that check inside the BVP, but moving it to a more declarative model would I'm sure be useful. One thing to think about is resource type inhiertance. I assume we would want BVPs to be inherited. Justin On Fri, Dec 6, 2013 at 12:11

Re: FYI, request setup script prototype

2013-12-06 Thread Justin Edelson
Hi Alex, One minor point - IIUC, the Use directive defines have a specific scope *within* a Sightly template. In this regard, they are slightly different than what Bertrand is doing or what a BVP does which operate around the template as a whole. To me, a Use class is more like an AngularJS

Re: [OT] Feature flag influence on Resource access (Was: FYI: feature flags prototype)

2013-12-06 Thread Justin Edelson
On Fri, Dec 6, 2013 at 12:10 PM, Alexander Klimetschek aklim...@adobe.com wrote: On 06.12.2013, at 08:08, Felix Meschberger fmesc...@adobe.com wrote: Think back and forth I really think that we should put feature flag support into the ResourceResolver proper. I agree. +1 Henry wrote it

Re: [OT] Feature flag influence on Resource access (Was: FYI: feature flags prototype)

2013-12-06 Thread Ruben Reusser
it may be worth it revisiting the tenant api in regards to feature flags as well and have some sort of way to have feature flag dependent osgi properties. Ruben On 12/6/2013 12:51 PM, Justin Edelson wrote: On Fri, Dec 6, 2013 at 12:10 PM, Alexander Klimetschek aklim...@adobe.com wrote: On

Build failed in Jenkins: sling-trunk-1.6 #2052

2013-12-06 Thread Apache Jenkins Server
See https://builds.apache.org/job/sling-trunk-1.6/2052/changes Changes: [bdelacretaz] SLING-3267 - add tests that clarify the current behavior -- [...truncated 6428 lines...] [INFO] Compiling 53 source files to