Package org.ametys.web.scripts
Class WebScriptBinding
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.core.ui.script.StaticConfigurableScriptBinding
-
- org.ametys.web.scripts.WebScriptBinding
-
- All Implemented Interfaces:
ScriptBinding
,LogEnabled
,PluginAware
,Configurable
,Contextualizable
,Serviceable
public class WebScriptBinding extends StaticConfigurableScriptBinding
Script binding that provides variables
-
-
Field Summary
-
Fields inherited from class org.ametys.plugins.core.ui.script.StaticConfigurableScriptBinding
_context, _functions, _functionsDescriptions, _pluginName, _sourceResolver, _tutorials, _variablesDescriptions, _variablesScripts, _workspacePattern
-
-
Constructor Summary
Constructors Constructor Description WebScriptBinding()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanVariables(Map<String,Object> variables)
Allows clean up of variables created during the getVariables call.Map<String,Object>
getVariables(ScriptExecArguments execArgs)
Returns the list of variables this ScriptBinding provides, mapped by variable name.void
service(ServiceManager serviceManager)
-
Methods inherited from class org.ametys.plugins.core.ui.script.StaticConfigurableScriptBinding
_configureFunctions, _configureTutorials, _configureVariables, configure, contextualize, getFunctions, getFunctionsDescriptions, getTutorials, getVariablesDescriptions, getVariablesScripts, getWorkspacePattern, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
WebScriptBinding
public WebScriptBinding()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticConfigurableScriptBinding
- Throws:
ServiceException
-
getVariables
public Map<String,Object> getVariables(ScriptExecArguments execArgs)
Description copied from interface:ScriptBinding
Returns the list of variables this ScriptBinding provides, mapped by variable name.- Specified by:
getVariables
in interfaceScriptBinding
- Overrides:
getVariables
in classStaticConfigurableScriptBinding
- Parameters:
execArgs
- The The arguments for script execution- Returns:
- The list of variables, or null if no variable is provided.
-
cleanVariables
public void cleanVariables(Map<String,Object> variables)
Description copied from interface:ScriptBinding
Allows clean up of variables created during the getVariables call.- Specified by:
cleanVariables
in interfaceScriptBinding
- Overrides:
cleanVariables
in classStaticConfigurableScriptBinding
- Parameters:
variables
- The map of variables.
-
-