Revision 478 org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingBaseScript.java

View differences:

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

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

  
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);
19
    /**
20
     * Executes the code of a ScriptBaseScript.
21
     *
22
     * @return
23
     */
24
    public Object run();
65 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

  
66 67
}

Also available in: Unified diff