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 Details

  • 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 id
      classname - 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 id
      serverId - The script server id
      classname - 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

      public String getId()
      The script id.
      Returns:
      The script id. Can not be null nor empty.
    • getServerId

      public String 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.