Class CommandEngineExecutor
java.lang.Object
org.eclipse.dirigible.engine.api.resource.AbstractResourceExecutor
org.eclipse.dirigible.engine.api.script.AbstractScriptExecutor
org.eclipse.dirigible.engine.command.processor.CommandEngineExecutor
- All Implemented Interfaces:
IEngineExecutor,IResourceExecutor,IScriptEngineExecutor
public class CommandEngineExecutor extends AbstractScriptExecutor implements IScriptEngineExecutor
The Command Engine Executor.
-
Field Summary
Fields Modifier and Type Field Description static StringCOMMAND_EXTENSIONThe Constant COMMAND_EXTENSION.static StringENGINE_NAMEThe Constant ENGINE_NAME.static StringENGINE_TYPEThe Constant ENGINE_TYPE_COMMAND.static StringMODULE_EXT_COMMANDThe Constant MODULE_EXT_COMMAND. -
Constructor Summary
Constructors Constructor Description CommandEngineExecutor() -
Method Summary
Modifier and Type Method Description ObjectevalCode(String code, Map<Object,Object> executionContext)Eval code.ObjectevalModule(String module, Map<Object,Object> executionContext)Eval module.StringexecuteCommandLine(String commandLine, Map<String,String> forAdding, List<String> forRemoving, boolean isFileBasedRepository)Execute command line.ObjectexecuteMethodFromModule(String module, String memberClass, String memberClassMethod, Map<Object,Object> executionContext)Execute method from module.ObjectexecuteService(String moduleOrCode, Map<Object,Object> executionContext, boolean isModule)Execute service.ObjectexecuteServiceCode(String code, Map<Object,Object> executionContext)Execute service code.ObjectexecuteServiceModule(String module, Map<Object,Object> executionContext)Execute service module.StringgetName()Gets the name.StringgetType()Gets the type.Methods inherited from class org.eclipse.dirigible.engine.api.script.AbstractScriptExecutor
existsModule, existsModule, generateResourcePath, getResourcePath, retrieveModule, retrieveModuleMethods inherited from class org.eclipse.dirigible.engine.api.resource.AbstractResourceExecutor
createResourcePath, createResourcePath, existResource, existResource, getCollection, getLoadedPredeliveredContent, getRepository, getResource, getResource, getResourceContent, getResourceContentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.dirigible.engine.api.script.IScriptEngineExecutor
existsModule, existsModule, retrieveModule, retrieveModule
-
Field Details
-
ENGINE_TYPE
The Constant ENGINE_TYPE_COMMAND.- See Also:
- Constant Field Values
-
COMMAND_EXTENSION
The Constant COMMAND_EXTENSION.- See Also:
- Constant Field Values
-
MODULE_EXT_COMMAND
The Constant MODULE_EXT_COMMAND.- See Also:
- Constant Field Values
-
ENGINE_NAME
The Constant ENGINE_NAME.- See Also:
- Constant Field Values
-
-
Constructor Details
-
CommandEngineExecutor
public CommandEngineExecutor()
-
-
Method Details
-
getType
Gets the type.- Specified by:
getTypein interfaceIEngineExecutor- Returns:
- the type
-
getName
Gets the name.- Specified by:
getNamein interfaceIEngineExecutor- Returns:
- the name
-
executeServiceModule
public Object executeServiceModule(String module, Map<Object,Object> executionContext) throws ScriptingExceptionExecute service module.- Specified by:
executeServiceModulein interfaceIScriptEngineExecutor- Parameters:
module- the moduleexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
executeServiceCode
public Object executeServiceCode(String code, Map<Object,Object> executionContext) throws ScriptingExceptionExecute service code.- Specified by:
executeServiceCodein interfaceIScriptEngineExecutor- Parameters:
code- the codeexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
evalCode
public Object evalCode(String code, Map<Object,Object> executionContext) throws ScriptingExceptionEval code.- Specified by:
evalCodein interfaceIScriptEngineExecutor- Parameters:
code- the codeexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
evalModule
public Object evalModule(String module, Map<Object,Object> executionContext) throws ScriptingExceptionEval module.- Specified by:
evalModulein interfaceIScriptEngineExecutor- Parameters:
module- the moduleexecutionContext- the execution context- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
executeMethodFromModule
public Object executeMethodFromModule(String module, String memberClass, String memberClassMethod, Map<Object,Object> executionContext)Execute method from module.- Specified by:
executeMethodFromModulein interfaceIScriptEngineExecutor- Parameters:
module- the modulememberClass- the member classmemberClassMethod- the member class methodexecutionContext- the execution context- Returns:
- the object
-
executeService
public Object executeService(String moduleOrCode, Map<Object,Object> executionContext, boolean isModule) throws ScriptingExceptionExecute service.- Parameters:
moduleOrCode- the module or codeexecutionContext- the execution contextisModule- the is module- Returns:
- the object
- Throws:
ScriptingException- the scripting exception
-
executeCommandLine
public String executeCommandLine(String commandLine, Map<String,String> forAdding, List<String> forRemoving, boolean isFileBasedRepository) throws ScriptingExceptionExecute command line.- Parameters:
commandLine- the command lineforAdding- the for addingforRemoving- the for removingisFileBasedRepository- the is file based repository- Returns:
- the string
- Throws:
ScriptingException- the scripting exception
-