gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.lib / org.gvsig.scripting.lib.api / src / main / java / org / gvsig / scripting / ScriptingBaseScript.java @ 441
History | View | Annotate | Download (1.47 KB)
1 |
package org.gvsig.scripting; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import org.gvsig.tools.observer.WeakReferencingObservable; |
6 |
|
7 |
/**
|
8 |
* <p> Interface that represents Scripting elements.</p>
|
9 |
*
|
10 |
* @see ScriptingUnit
|
11 |
*
|
12 |
* @see ScriptingScript
|
13 |
* @see ScriptingDialog
|
14 |
* @see ScriptingProject
|
15 |
*/
|
16 |
public interface ScriptingBaseScript extends ScriptingUnit, WeakReferencingObservable{ |
17 |
|
18 |
/**
|
19 |
* Executes the code of a ScriptBaseScript.
|
20 |
*
|
21 |
*/
|
22 |
public Object run(); |
23 |
|
24 |
/**
|
25 |
* Executes the code of a ScriptBaseScript.
|
26 |
*
|
27 |
* @param args
|
28 |
* Contains the input parameters to run the ScriptBaseScript.
|
29 |
*/
|
30 |
public Object run(Object args[]); |
31 |
|
32 |
/**
|
33 |
* Executes the code of a ScriptBaseScript in a separated thread
|
34 |
*
|
35 |
* @param args
|
36 |
* Contains the input parameters to run the ScriptBaseScript.
|
37 |
*/
|
38 |
public void runAsTask(Object args[]); |
39 |
|
40 |
/**
|
41 |
* Sets the ScriptBaseScript's current status with the saved version.
|
42 |
*
|
43 |
* @param saved
|
44 |
* Indicate if the ScriptBaseScript is up-to-date or not.
|
45 |
*/
|
46 |
public void setSaved(boolean saved); |
47 |
|
48 |
/**
|
49 |
* Indicates if the ScriptBaseScript is modified from last saved version.
|
50 |
*
|
51 |
* @return true if current version is up-to-date, false if not.
|
52 |
*/
|
53 |
public boolean isSaved(); |
54 |
|
55 |
public void compile() throws ScriptingRunningException; |
56 |
|
57 |
public void put(String name, Object value); |
58 |
|
59 |
/**
|
60 |
* Return a resource File that is beside this script.
|
61 |
*
|
62 |
* @return the file which is beside this script
|
63 |
*/
|
64 |
public File getResource(String filename); |
65 |
|
66 |
} |