Package org.ametys.core.ui
Class ClientSideElement.Script
java.lang.Object
org.ametys.core.ui.ClientSideElement.Script
- Enclosing interface:
- ClientSideElement
This class represents a script
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The script class name of the scriptprotected List<ClientSideElement.ScriptFile>
The css files of the script (url is relative to webapp context)protected String
The id associated with this scriptThe parameters objects of the scriptprotected List<ClientSideElement.ScriptFile>
The script files of the script (url is relative to webapp context)protected String
The server element id for this script -
Constructor Summary
ConstructorDescriptionScript
(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
Modifier and TypeMethodDescriptionThe list of css files needed to correctly display the script.getId()
The script id.This method returns the parameters initially given to the control script class.The script classname.The list of files needed to execute the classname.The id server-side associated with this script
-
Field Details
-
_id
The id associated with this script -
_classname
The script class name of the script -
_scriptFiles
The script files of the script (url is relative to webapp context) -
_cssFiles
The css files of the script (url is relative to webapp context) -
_parameters
The parameters objects of the script -
_serverId
The server element id for this script
-
-
Constructor Details
-
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
Clone a script- Parameters:
script
- The script to clone
-
-
Method Details
-
getId
The script id.- Returns:
- The script id. Can not be null nor empty.
-
getServerId
The id server-side associated with this script- Returns:
- The server id;
-
getScriptClassname
The script classname.- Returns:
- The script classname. Can not be null nor empty.
-
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
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
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.
-