Provide an interface to allow script extensions to add a global function into
the scripting environment. Any context, like the scripting environment via a
ScriptContextDAO, should be passed to implementers of
GlobalFunction via a constructor.
This is not the recommended way of adding functions to the scripting
enviroment. Instead you should add an object with the function you wish to
call, and use the Object Orientiated way to call the method. (e.g.
object.function(parameter)).
Implementing GlobalFunction is the only way to a new global function to the
scripting environment and exists for backwards compatibility.
Since:
ITIM 5.0
Method Summary
java.lang.Object
call(java.lang.Object[] parameters)
This method will be called when the global function is called from a
script.
This method will be called when the global function is called from a
script. The parameters passed in the script will be passed in via the
parameters argument. It is up to the function to check for the correct
number and types of arguments.
Parameters:
parameters - The parameters passed into the function.
Returns:
The result of the function, or null if there is no return value.