Class GroovyEvaluationServiceImpl
java.lang.Object
ch.tocco.nice2.scripting.impl.groovy.GroovyEvaluationServiceImpl
- All Implemented Interfaces:
GroovyEvaluationService
@Component
public class GroovyEvaluationServiceImpl
extends Object
implements GroovyEvaluationService
-
Nested Class Summary
Nested classes/interfaces inherited from interface GroovyEvaluationService
GroovyEvaluationService.ScriptResult -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Supplier<ClassLoader> static final ThreadLocal<ScriptExecutionContext> static final ThreadLocal<SecurityConfiguration> -
Constructor Summary
ConstructorsConstructorDescriptionGroovyEvaluationServiceImpl(SecurityManager securityManager, Context context, PersistenceService persistenceService, DefaultDisplayService defaultDisplayService) -
Method Summary
Modifier and TypeMethodDescriptionEvaluate a groovy string with the given binding.@Nullable ScriptExecutionContextvoidsetAllowedMethodContributions(List<AllowedMethodContribution> allowedMethodContributions) voidsetScriptVariableProviders(List<ScriptVariableProvider> scriptVariableProviders)
-
Field Details
-
SECURITY_CONFIGURATION
-
EXECUTION_CONTEXT
-
CLASS_LOADER_SUPPLIER
-
-
Constructor Details
-
GroovyEvaluationServiceImpl
public GroovyEvaluationServiceImpl(SecurityManager securityManager, Context context, PersistenceService persistenceService, DefaultDisplayService defaultDisplayService)
-
-
Method Details
-
setScriptVariableProviders
@Autowired public void setScriptVariableProviders(List<ScriptVariableProvider> scriptVariableProviders) -
setAllowedMethodContributions
@Autowired public void setAllowedMethodContributions(List<AllowedMethodContribution> allowedMethodContributions) -
evaluate
public GroovyEvaluationService.ScriptResult evaluate(String script, groovy.lang.Binding binding) throws ScriptEvaluationException Description copied from interface:GroovyEvaluationServiceEvaluate a groovy string with the given binding.- Specified by:
evaluatein interfaceGroovyEvaluationService- Throws:
ScriptEvaluationException
-
getContextForCurrentThread
- Specified by:
getContextForCurrentThreadin interfaceGroovyEvaluationService
-