Class ScriptEngineExecutorsManager
java.lang.Object
org.eclipse.dirigible.engine.api.script.ScriptEngineExecutorsManager
public class ScriptEngineExecutorsManager extends Object
The Script Engine Executors Manager.
-
Constructor Summary
Constructors Constructor Description ScriptEngineExecutorsManager() -
Method Summary
Modifier and Type Method Description static ObjectevalModule(String code, Map<Object,Object> executionContext)Evaluate a code snippet.static ObjectexecuteMethodFromModule(String engineType, String module, String memberClass, String memberMethod, Map<Object,Object> executionContext)Execute method from module.static ObjectexecuteServiceCode(String engineType, String code, Map<Object,Object> executionContext)Execute service code.static ObjectexecuteServiceModule(String engineType, String module, Map<Object,Object> executionContext)Execute service module.static Set<String>getEngineTypes()Returns all the registered engine types.static StringgetEngineTypesAsJson()Returns all the registered engine types as JSON.
-
Constructor Details
-
ScriptEngineExecutorsManager
public ScriptEngineExecutorsManager()
-
-
Method Details
-
executeServiceModule
public static Object executeServiceModule(String engineType, String module, Map<Object,Object> executionContext) throws ScriptingExceptionExecute service module.- Parameters:
engineType- the engine typemodule- the moduleexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
evalModule
public static Object evalModule(String code, Map<Object,Object> executionContext) throws ScriptingExceptionEvaluate a code snippet.- Parameters:
code- the code snippetexecutionContext- the execution context- Returns:
- the result object
- Throws:
ScriptingException- in case of exception
-
executeServiceCode
public static Object executeServiceCode(String engineType, String code, Map<Object,Object> executionContext) throws ScriptingExceptionExecute service code.- Parameters:
engineType- the engine typecode- the codeexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
executeMethodFromModule
public static Object executeMethodFromModule(String engineType, String module, String memberClass, String memberMethod, Map<Object,Object> executionContext) throws ScriptingExceptionExecute method from module.- Parameters:
engineType- the engine typemodule- the modulememberClass- the member classmemberMethod- the member methodexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
getEngineTypes
Returns all the registered engine types.- Returns:
- engine types
-
getEngineTypesAsJson
Returns all the registered engine types as JSON.- Returns:
- engine types as JSON
-