Class GroovyScriptExecutorFactory

java.lang.Object
org.identityconnectors.common.script.ScriptExecutorFactory
org.identityconnectors.common.script.groovy.GroovyScriptExecutorFactory

public class GroovyScriptExecutorFactory extends ScriptExecutorFactory
Creates a new ScriptExecutorFactory for executing Groovy scripts. Scripts are compiled at the creation of a new instance of ScriptExecutor.
  • Constructor Details

    • GroovyScriptExecutorFactory

      public GroovyScriptExecutorFactory()
      Make sure we blow up if Groovy does not exist.
  • Method Details

    • newScriptExecutor

      public ScriptExecutor newScriptExecutor(ClassLoader loader, String script, boolean compile)
      Creates a script executor for the given script.

      Always compile the script.

      Specified by:
      newScriptExecutor in class ScriptExecutorFactory
      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

      public String getLanguageName()
      Returns the name of the language supported by this factory.
      Specified by:
      getLanguageName in class ScriptExecutorFactory
      Returns:
      the name of the language.