public class StaticConfigurableScriptBinding extends AbstractLogEnabled implements ScriptBinding, Configurable, Serviceable
Modifier and Type | Field and Description |
---|---|
protected List<String> |
_functions
List of functions per configuration file
|
protected Map<String,I18nizableText> |
_functionsDescriptions
List of function descriptions
|
protected SourceResolver |
_sourceResolver
Source Resolver
|
Constructor and Description |
---|
StaticConfigurableScriptBinding() |
Modifier and Type | Method and Description |
---|---|
void |
cleanVariables(Map<String,Object> variables)
Allows clean up of variables created during the getVariables call.
|
void |
configure(Configuration configuration) |
String |
getFunctions()
Returns the JavaScript functions to inject at the start of the script, in the form of a single String prepended to the script.
|
Map<String,I18nizableText> |
getFunctionsDescriptions()
Returns the list of functions descriptions, mapped by function name.
|
Map<String,Object> |
getVariables()
Returns the list of variables this ScriptBinding provides, mapped by variable name.
|
Map<String,I18nizableText> |
getVariablesDescriptions()
Returns the list of variables descriptions, mapped by variable name.
|
Object |
processScriptResult(Object result)
Process the script result if there are any specificities for this console data.
|
void |
service(ServiceManager manager) |
getLogger, setLogger
protected SourceResolver _sourceResolver
protected List<String> _functions
protected Map<String,I18nizableText> _functionsDescriptions
public StaticConfigurableScriptBinding()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public String getFunctions()
ScriptBinding
getFunctions
in interface ScriptBinding
public Map<String,I18nizableText> getFunctionsDescriptions()
ScriptBinding
getFunctionsDescriptions
in interface ScriptBinding
public Map<String,Object> getVariables()
ScriptBinding
getVariables
in interface ScriptBinding
public Map<String,I18nizableText> getVariablesDescriptions()
ScriptBinding
getVariablesDescriptions
in interface ScriptBinding
public void cleanVariables(Map<String,Object> variables)
ScriptBinding
cleanVariables
in interface ScriptBinding
variables
- The map of variables.public Object processScriptResult(Object result) throws ScriptException
ScriptBinding
processScriptResult
in interface ScriptBinding
result
- The resultScriptException
- If a processing error occurs.