Class GroovyScriptExecutorFactory
java.lang.Object
org.identityconnectors.common.script.ScriptExecutorFactory
org.identityconnectors.common.script.groovy.GroovyScriptExecutorFactory
Creates a new ScriptExecutorFactory for executing Groovy scripts. Scripts are
compiled at the creation of a new instance of
ScriptExecutor
.-
Constructor Summary
ConstructorDescriptionMake sure we blow up if Groovy does not exist. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the language supported by this factory.newScriptExecutor
(ClassLoader loader, String script, boolean compile) Creates a script executor for the given script.Methods inherited from class org.identityconnectors.common.script.ScriptExecutorFactory
getSupportedLanguages, newInstance
-
Constructor Details
-
GroovyScriptExecutorFactory
public GroovyScriptExecutorFactory()Make sure we blow up if Groovy does not exist.
-
-
Method Details
-
newScriptExecutor
Creates a script executor for the given script.Always compile the script.
- Specified by:
newScriptExecutor
in classScriptExecutorFactory
- Parameters:
loader
- The classloader that contains the java classes that the script should have access to.script
- The script text.compile
- A hint to tell the script executor whether or not to compile the given script. This need not be implemented by all script executors. If true, the caller is saying that they intend to call the script multiple times with different arguments, so compile if possible.- Returns:
- A script executor.
-
getLanguageName
Returns the name of the language supported by this factory.- Specified by:
getLanguageName
in classScriptExecutorFactory
- Returns:
- the name of the language.
-