Package org.gvsig.scripting
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:
-
Field Summary
Fields inherited from interface org.gvsig.scripting.ScriptingBaseScript
ISOLATION_HIGH, ISOLATION_LOW -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Returns the ScriptingScript's code.Returns the languange in which the ScriptingScript is written.Returns the name of the main function in the ScriptingScript's codeinvokeFunction(String name, Object[] args) Executes a function from the Script's codeinvokeMethod(Object obj, String name, Object[] args) Executes a method from the Script's codevoidvoidsave()Persists the current status of a ScriptingScript with the content associated.voidSets a the code associated with a ScriptingScript.voidsetMainName(String mainName) Stablishes a new main main function in the ScriptingScript's code.Methods inherited from interface org.gvsig.tools.observer.Observable
addObserver, deleteObserver, deleteObserversMethods inherited from interface org.gvsig.tools.script.Script
equals, getName, getNames, getTypeName, getURL, hashCode, putMethods inherited from interface org.gvsig.scripting.ScriptingBaseScript
addStderrWriter, addStdoutWriter, compile, getIsolationGroup, getLibrarySuffix, getResource, getScriptFile, isEnabled, put, removeStderrWriter, removeStdoutWriter, run, run, runAsTask, setEnabled, setIsolationGroup, setLibrarySuffixMethods inherited from interface org.gvsig.scripting.ScriptingText
getText, setTextMethods inherited from interface org.gvsig.scripting.ScriptingUnit
addPropertyChangeListener, getCreatedBy, getDescription, getFile, getFileResource, getFiles, getIconNames, getId, getName, getParent, getProperties, getProperty, getTypeName, getUserPath, getVersion, isASystemUnit, isSaved, move, reload, remove, rename, setCreatedBy, setDescription, setName, setProperty, setSaved, setVersion
-
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:
getCodein interfaceorg.gvsig.tools.script.Script- Returns:
- a String with the code of the script.
-
setCode
Sets a the code associated with a ScriptingScript.- Specified by:
setCodein interfaceorg.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
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:
savein interfaceScriptingText
-
invokeMethod
Executes a method from the Script's code- Parameters:
obj- this Object represents the script's codename- method's name to executeargs- 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
Executes a function from the Script's code- Specified by:
invokeFunctionin interfaceorg.gvsig.tools.script.Script- Parameters:
name- method's name to executeargs- 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:
getMimeTypein interfaceScriptingText
-
registerDataFolder
-