Statistics
| Revision:

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 @ 478

History | View | Annotate | Download (1.59 KB)

1
package org.gvsig.scripting;
2

    
3
import java.io.File;
4

    
5
import org.gvsig.tools.observer.WeakReferencingObservable;
6

    
7
/**
8
 * <p>
9
 * Interface that represents Scripting elements.</p>
10
 *
11
 * @see ScriptingUnit
12
 *
13
 * @see ScriptingScript
14
 * @see ScriptingDialog
15
 * @see ScriptingProject
16
 */
17
public interface ScriptingBaseScript extends ScriptingUnit, WeakReferencingObservable {
18

    
19
    /**
20
     * Executes the code of a ScriptBaseScript.
21
     *
22
     * @return
23
     */
24
    public Object run();
25

    
26
    /**
27
     * Executes the code of a ScriptBaseScript.
28
     *
29
     * @param args Contains the input parameters to run the ScriptBaseScript.
30
     * @return
31
     */
32
    public Object run(Object args[]);
33

    
34
    /**
35
     * Executes the code of a ScriptBaseScript in a separated thread
36
     *
37
     * @param args Contains the input parameters to run the ScriptBaseScript.
38
     */
39
    public void runAsTask(Object args[]);
40

    
41
    /**
42
     * Sets the ScriptBaseScript's current status with the saved version.
43
     *
44
     * @param saved 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
     * @param filename
63
     * @return the file which is beside this script
64
     */
65
    public File getResource(String filename);
66

    
67
}