You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2013/09/06 15:02:51 UTC

[jira] [Resolved] (SLING-3038) Take "context" service property into account when using BindingsValuesProvider

     [ https://issues.apache.org/jira/browse/SLING-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Delacretaz resolved SLING-3038.
----------------------------------------

    Resolution: Fixed

Implemented in http://svn.apache.org/r1520565 , the SlingScriptAdapterFactory now takes the context service property into account, tested in BindingsValuesProvidersByContextIT.

The new BindingsValuesProvidersByContext service can be used for other code that wants context-specific BindingsValuesProviders, and the implementation also takes the scripting language into account to include BVPs or not, and to provide them in the appropriate order.

One can also just select BindingsValuesProviders based on their context service property, which avoids depending on the latest scripting.api bundle version, but you won't get the language-specific selection when doing that.

All integration tests pass after this change.
                
> Take "context" service property into account when using BindingsValuesProvider
> ------------------------------------------------------------------------------
>
>                 Key: SLING-3038
>                 URL: https://issues.apache.org/jira/browse/SLING-3038
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting Core 2.0.24
>            Reporter: Bertrand Delacretaz
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>         Attachments: SLING-3038.patch
>
>
> As discussed at http://sling.markmail.org/thread/dzdgfx3n6i5ftkjw , being able to restrict BindingsValuesProvider (BVP) services to specific contexts (request processing, health checks, workflow etc) would be useful.
> The first step is to modify the scripting setup in DefaultSlingScript so that any BVP which has a "context" service property which doesn't include a "request" value is ignored.
> Other components which use BVPs can then select then based on the value of their "context" service property.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira