Package org.ametys.core.ui
Class ClientSideElement.Script
- java.lang.Object
-
- org.ametys.core.ui.ClientSideElement.Script
-
- Enclosing interface:
- ClientSideElement
public static class ClientSideElement.Script extends Object
This class represents a script
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_classname
The script class name of the scriptprotected List<ClientSideElement.ScriptFile>
_cssFiles
The css files of the script (url is relative to webapp context)protected String
_id
The id associated with this scriptprotected Map<String,Object>
_parameters
The parameters objects of the scriptprotected List<ClientSideElement.ScriptFile>
_scriptFiles
The script files of the script (url is relative to webapp context)protected String
_serverId
The server element id for this script
-
Constructor Summary
Constructors Constructor Description Script(String id, String serverId, String classname, List<ClientSideElement.ScriptFile> scriptFiles, List<ClientSideElement.ScriptFile> cssFiles, Map<String,Object> parameters)
Creates a scriptScript(String id, String classname, List<ClientSideElement.ScriptFile> scriptFiles, List<ClientSideElement.ScriptFile> cssFiles, Map<String,Object> parameters)
Creates a scriptScript(ClientSideElement.Script script)
Clone a script
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ClientSideElement.ScriptFile>
getCSSFiles()
The list of css files needed to correctly display the script.String
getId()
The script id.Map<String,Object>
getParameters()
This method returns the parameters initially given to the control script class.String
getScriptClassname()
The script classname.List<ClientSideElement.ScriptFile>
getScriptFiles()
The list of files needed to execute the classname.String
getServerId()
The id server-side associated with this script
-
-
-
Field Detail
-
_classname
protected String _classname
The script class name of the script
-
_scriptFiles
protected List<ClientSideElement.ScriptFile> _scriptFiles
The script files of the script (url is relative to webapp context)
-
_cssFiles
protected List<ClientSideElement.ScriptFile> _cssFiles
The css files of the script (url is relative to webapp context)
-
_parameters
protected Map<String,Object> _parameters
The parameters objects of the script
-
-
Constructor Detail
-
Script
public Script(String id, String classname, List<ClientSideElement.ScriptFile> scriptFiles, List<ClientSideElement.ScriptFile> cssFiles, Map<String,Object> parameters)
Creates a script- Parameters:
id
- The script idclassname
- The script classname. Can not be null nor empty.scriptFiles
- The list of files needed to execute the classname. Must not be null.cssFiles
- The list of css files needed to correctly display the script. Must not be null.parameters
- The parameters associated with this Script.
-
Script
public Script(String id, String serverId, String classname, List<ClientSideElement.ScriptFile> scriptFiles, List<ClientSideElement.ScriptFile> cssFiles, Map<String,Object> parameters)
Creates a script- Parameters:
id
- The script idserverId
- The script server idclassname
- The script classname. Can not be null nor empty.scriptFiles
- The list of files needed to execute the classname. Must not be null.cssFiles
- The list of css files needed to correctly display the script. Must not be null.parameters
- The parameters associated with this Script.
-
Script
public Script(ClientSideElement.Script script)
Clone a script- Parameters:
script
- The script to clone
-
-
Method Detail
-
getServerId
public String getServerId()
The id server-side associated with this script- Returns:
- The server id;
-
getScriptClassname
public String getScriptClassname()
The script classname.- Returns:
- The script classname. Can not be null nor empty.
-
getScriptFiles
public List<ClientSideElement.ScriptFile> getScriptFiles()
The list of files needed to execute the classname.- Returns:
- The list of files needed to execute the classname. Must not be null.
-
getCSSFiles
public List<ClientSideElement.ScriptFile> getCSSFiles()
The list of css files needed to correctly display the script.- Returns:
- The list of css files needed to correctly display the script. Must not be null.
-
getParameters
public Map<String,Object> getParameters()
This method returns the parameters initially given to the control script class. Initial parameters must be sufficient to allow the script to render the control without waiting for a refresh by the current parameters.- Returns:
- a map of parameters. Key represents ids of the parameters and values represents its values. Can not be null.
-
-