org.szegedi.spring.web.jsflow
Interface LibraryCustomizer


public interface LibraryCustomizer

A class implementing this interface can hook into the initialization of the global library scope and manipulate it in any way it desires. The global library scope is the prototype for the top-level scopes of all executing flows, thus exposing some common global functions to all flowscripts. Its contents are defined by a JavaScript program found in the classpath under /org/szegedi/spring/web/jsflow/library.js.

Version:
$Id: $
Author:
Attila Szegedi

Method Summary
 void customizeLibrary(org.mozilla.javascript.Context cx, org.mozilla.javascript.ScriptableObject libraryScope)
          Invoked by ScriptStorage as part of the initialization of the global library scope, after it was already populated with the global Rhino-in-Spring functions.
 

Method Detail

customizeLibrary

void customizeLibrary(org.mozilla.javascript.Context cx,
                      org.mozilla.javascript.ScriptableObject libraryScope)
Invoked by ScriptStorage as part of the initialization of the global library scope, after it was already populated with the global Rhino-in-Spring functions. The method can manipulate the library scope in any way it wishes. After this method returns, the scope will be sealed and no further modification will be possible.

Parameters:
cx - the active Rhino context for the current thread
libraryScope - the library scope to manipulate