Interface ScriptingScript

All Superinterfaces:
org.gvsig.tools.observer.Observable, org.gvsig.tools.script.Script, ScriptingBaseScript, ScriptingText, ScriptingUnit, org.gvsig.tools.observer.WeakReferencingObservable
All Known Subinterfaces:
ScriptingDialog

public interface ScriptingScript extends ScriptingText, ScriptingBaseScript, org.gvsig.tools.script.Script

Interface that represents a single script without window dialog.

See Also:
  • Method Details

    • getLangName

      String getLangName()
      Returns the languange in which the ScriptingScript is written.
      Returns:
      a String containing the name of the language
    • getCode

      String getCode()
      Returns the ScriptingScript's code.
      Specified by:
      getCode in interface org.gvsig.tools.script.Script
      Returns:
      a String with the code of the script.
    • setCode

      void setCode(String code)
      Sets a the code associated with a ScriptingScript.
      Specified by:
      setCode in interface org.gvsig.tools.script.Script
      Parameters:
      code - String that contains the new code.
    • getMainName

      String getMainName()
      Returns the name of the main function in the ScriptingScript's code
      Returns:
      a String with main function (default main name is 'main').
    • setMainName

      void setMainName(String mainName)
      Stablishes a new main main function in the ScriptingScript's code.
      Parameters:
      mainName - String that contains the new main function name.
    • save

      void save()
      Persists the current status of a ScriptingScript with the content associated.
      Specified by:
      save in interface ScriptingText
    • invokeMethod

      Object invokeMethod(Object obj, String name, Object[] args) throws NoSuchMethodException
      Executes a method from the Script's code
      Parameters:
      obj - this Object represents the script's code
      name - method's name to execute
      args - input parameters of the method
      Returns:
      An Object that represents the execution
      Throws:
      NoSuchMethodException - If there isn't a main function to begin the execution
    • invokeFunction

      Object invokeFunction(String name, Object[] args) throws NoSuchMethodException
      Executes a function from the Script's code
      Specified by:
      invokeFunction in interface org.gvsig.tools.script.Script
      Parameters:
      name - method's name to execute
      args - input parameters of the method
      Returns:
      An Object that represents the execution
      Throws:
      NoSuchMethodException - If there isn't a main function to begin the execution
    • getMimeType

      String getMimeType()
      Specified by:
      getMimeType in interface ScriptingText
    • registerDataFolder

      void registerDataFolder(String id)