Class ScriptExecutor
- java.lang.Object
-
- org.wso2.carbon.mediator.datamapper.engine.core.executors.ScriptExecutor
-
-
Field Summary
Fields Modifier and Type Field Description static String
INPUT_VARIABLE_IDENTIFIER
static String
OPENJDK_NASHORN_CLASSNAME
static String
PROPERTIES_IDENTIFIER
-
Constructor Summary
Constructors Constructor Description ScriptExecutor(ScriptExecutorType scriptExecutorType)
Create a script executor of the provided script executor type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Model
execute(MappingResource mappingResource, String inputVariable, String properties)
Method to execute the mapping config in theMappingResource
on input variable and returns the output model
-
-
-
Field Detail
-
PROPERTIES_IDENTIFIER
public static final String PROPERTIES_IDENTIFIER
- See Also:
- Constant Field Values
-
INPUT_VARIABLE_IDENTIFIER
public static final String INPUT_VARIABLE_IDENTIFIER
- See Also:
- Constant Field Values
-
OPENJDK_NASHORN_CLASSNAME
public static final String OPENJDK_NASHORN_CLASSNAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ScriptExecutor
public ScriptExecutor(ScriptExecutorType scriptExecutorType)
Create a script executor of the provided script executor type- Parameters:
scriptExecutorType
-
-
-
Method Detail
-
execute
public Model execute(MappingResource mappingResource, String inputVariable, String properties) throws JSException, SchemaException
Description copied from interface:Executor
Method to execute the mapping config in theMappingResource
on input variable and returns the output model- Specified by:
execute
in interfaceExecutor
- Parameters:
mappingResource
- mapping resource modelinputVariable
- input variable- Returns:
- model output model
- Throws:
JSException
- if mapping throws an exceptionSchemaException
-
-