On 1/6/10 4:33 PM, Felix Meschberger wrote:
Hi,
On 06.01.2010 22:16, Justin Edelson wrote:
3) I've been kicking around the idea that it would be nice for the scripting
binding to be expandable. Given a service interface like this:
public interface SlingScriptBindingValuesProvider {
void addBindings(Bindings bindings);
}
DefaultSlingScript could then find all services and invoke them. A service
property could be used to limit the scope of a provider to one or more
scripting languages (for example, the JSONGroovyBuilder should only go into
the binding for Groovy scripts).
If this was done, then currentNode could be kept in the binding by creating
a SlingScriptBindingValuesProvider in one of the jcr bundles and the jcr
dependency could be removed from scripting core. Of course now there's a
dependency between a jcr bundle and scripting API, but perhaps that could be
optional (or, at least, acceptable).
This sounds like an interesting approach, indeed !
Regards
Felix
interesting == good or interesting == bad?