Hi David,

On Mon, Nov 29, 2010 at 6:28 PM, Levine, David <[email protected]> wrote:
> ...I'd like to now take this a step further and add a few additional 
> scripting variables
> as discussed here: 
> https://cwiki.apache.org/SLING/adding-new-scripting-variables.html
>
> So I want to create a class which implements the BindingsValuesProvider 
> interface.  OK...
> but what do I do with it once I create it?...

There are a few examples in [1] that are used in integration tests [2].

No configuration is needed - all active OSGi services which implement
BindingsValuesProvider  are used by script engines, and the
javax.script.name service property can be used to restrict them to a
specific script engine. I guess the value of that would be "velocity"
in your case, haven't checked.

-Bertrand

[1] 
http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/scripting

[2] 
http://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/ScriptBindingsValuesProviderTest.java

Reply via email to