public class ScriptTransformer extends Object implements org.apache.commons.collections.Transformer
contextParams
Constructor and Description |
---|
ScriptTransformer() |
ScriptTransformer(ScriptFactory scriptFactory,
Object scriptSource) |
Modifier and Type | Method and Description |
---|---|
Map |
getContextParams()
Optional context params to inject into the scripting object (context)
|
String |
getScriptEntryMethod()
The method to execute as the entry point for the script that accepts a single or varargs param
|
ScriptFactory |
getScriptFactory() |
String |
getScriptInitMethod()
An optional no parameter void return method in the script that serves as an initializer
|
Object |
getScriptObject() |
Object |
getScriptSource()
File or Text or
ScriptSource |
void |
init() |
void |
setContextParams(Map contextParams)
Optional context params to inject into the scripting object (context)
|
void |
setScriptEntryMethod(String scriptEntryMethod)
The method to execute as the entry point for the script that accepts a single or varargs param
|
void |
setScriptFactory(ScriptFactory scriptFactory) |
void |
setScriptInitMethod(String scriptInitMethod)
An optional no parameter void return method in the script that serves as an initializer
|
void |
setScriptObject(Object scriptObject) |
void |
setScriptSource(Object scriptSource)
File or Text or
ScriptSource |
Object |
transform(Object input) |
public ScriptTransformer()
public ScriptTransformer(ScriptFactory scriptFactory, Object scriptSource)
@PostConstruct public void init() throws IOException
IOException
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public ScriptFactory getScriptFactory()
public void setScriptFactory(ScriptFactory scriptFactory)
public Object getScriptSource()
ScriptSource
public void setScriptSource(Object scriptSource)
ScriptSource
public Map getContextParams()
public void setContextParams(Map contextParams)
public String getScriptEntryMethod()
public void setScriptEntryMethod(String scriptEntryMethod)
public String getScriptInitMethod()
public void setScriptInitMethod(String scriptInitMethod)
public Object getScriptObject()
public void setScriptObject(Object scriptObject)
Copyright © 2018. All rights reserved.