Class ScriptValidator

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

public final class ScriptValidator extends Object
Provides Groovy Script validation functions.
Since:
4.3.4
  • Constructor Details

    • ScriptValidator

      public ScriptValidator()
  • Method Details

    • validateLegacyScript

      public static final String validateLegacyScript(String script, boolean checkAllLegacyTokens)
      Validates the provided Groovy script using Legacy mode rules.
      Parameters:
      script - the Groovy script (required)
      checkAllLegacyTokens - if set to true, it will check for all legacy tokens. otherwise, it will skip some tokens that overrides existing APIs.
      Returns:
      null if the script validated successfully, an error message otherwise