Class SecureStaticConsoleScriptBuilder

java.lang.Object
com.avoka.core.groovy.runtime.SecureStaticConsoleScriptBuilder

public class SecureStaticConsoleScriptBuilder extends Object
Provides a type checked groovy script builder.
Since:
5.0.0
  • Constructor Details

    • SecureStaticConsoleScriptBuilder

      public SecureStaticConsoleScriptBuilder()
  • Method Details

    • setParameter

      public SecureStaticConsoleScriptBuilder setParameter(Map<String,Object> parameters)
      Set the script parameters
      Parameters:
      parameters - the script parameters
      Returns:
      the typed script builder
    • setImportCustomizer

      public SecureStaticConsoleScriptBuilder setImportCustomizer(org.codehaus.groovy.control.customizers.ImportCustomizer importCustomizer)
      Set the import customizer.
      Parameters:
      importCustomizer - the script parameters
      Returns:
      the typed script builder
    • setIsCaptureOutput

      public SecureStaticConsoleScriptBuilder setIsCaptureOutput(boolean isCaptureOutput)
      Set the is script output captured flag
      Parameters:
      isCaptureOutput - the is script output captured flag
      Returns:
      the typed script builder
    • setScript

      public SecureStaticConsoleScriptBuilder setScript(String script)
      The groovy script to process
      Parameters:
      script - the groovy script to process
      Returns:
      the typed script builder
    • build

      public String build()
      Build the type checked groovy script
      Returns:
      the type checked groovy script
    • getImportsSize

      public int getImportsSize()
      Returns:
      the number of imports added to the groovy script after calling build().