Hmm, why not turning this around and ammed the BindingsValueProvider interface ?
> public interface BindingsValuesProvider2 extends BindingsValueProvider { > void addBindings(Bindings bindings, ScriptEngineFactory, String context); > } > The BindingsValuesProvider2 is a marker interface to the BindginsValuesProvider service interface. A consumer would do > BindingsValuesProvider[] bvps = getProviders(); > foreach (BindingsValuesProvider bvp: bvps) { > if (bvp instanceof BindingsValuesProvider2) { > // use with scope > } else { > // use without scope > } > } > Regards Felix Am 06.09.2013 um 06:04 schrieb Bertrand Delacretaz: > On Thu, Sep 5, 2013 at 1:28 PM, Bertrand Delacretaz > <bdelacre...@apache.org> wrote: >> ...Maybe >> >> addContextBindings(Bindings b, ScriptEngineFactory f, String context) >> ... > > FYI I didn't do it like that in the end, as that would have caused > more changes than I like to existing code. The new service API is at > https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/api/src/main/java/org/apache/sling/scripting/api/BindingsValuesProvidersByContext.java > > Apart from that this is now done, see SLING-3038 for details, > > -Bertrand
smime.p7s
Description: S/MIME cryptographic signature