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 ch.tocco.nice2.scripting.api.groovy.GroovyEvaluationService
GroovyEvaluationService.ScriptResult
-
Field Summary
Modifier and TypeFieldDescriptionstatic Supplier
<ClassLoader> static final ThreadLocal
<ScriptExecutionContext> static final ThreadLocal
<SecurityConfiguration> -
Constructor Summary
ConstructorDescriptionGroovyEvaluationServiceImpl
(SecurityManager securityManager, Context context, PersistenceService persistenceService, DefaultDisplayService defaultDisplayService) -
Method Summary
Modifier and TypeMethodDescriptionEvaluate a groovy string with the given binding.@Nullable ScriptExecutionContext
void
setAllowedMethodContributions
(List<AllowedMethodContribution> allowedMethodContributions) void
setScriptVariableProviders
(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:GroovyEvaluationService
Evaluate a groovy string with the given binding.- Specified by:
evaluate
in interfaceGroovyEvaluationService
- Throws:
ScriptEvaluationException
-
getContextForCurrentThread
- Specified by:
getContextForCurrentThread
in interfaceGroovyEvaluationService
-