Class SpinScriptEnv

java.lang.Object
org.camunda.spin.scripting.SpinScriptEnv

public class SpinScriptEnv extends Object
Spin provides a set of environment scripts for known scripting languages. These scripts make it easier to use spin in a scripting language. Users can execute these scripts before they execute their custom scripts.
Author:
Daniel Meyer
  • Field Details

    • extensions

      public static final Map<String,String> extensions
      Mapping of known ScriptEngine language names and file extensions of corresponding script files.
  • Constructor Details

    • SpinScriptEnv

      public SpinScriptEnv()
  • Method Details

    • getExtension

      public static String getExtension(String language)
      Get file extension for script language.
      Parameters:
      language - the language name
      Returns:
      the file extension as string or null if the language is not in the set of languages supported by spin
    • get

      public static String get(String language)
      Get the spin scripting environment
      Parameters:
      language - the language name
      Returns:
      the environment script as string or null if the language is not in the set of languages supported by spin.
    • loadScriptEnv

      protected static String loadScriptEnv(String language, String extension)