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

History | View | Annotate | Download (1.43 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
         * Gets a String with the ScriptBaseScript's file path.
20
         *
21
         * @return a string with the path of the ScriptBaseScript main file path.
22
         */
23
        public String getPath();
24
        
25
        /**
26
         * Executes the code of a ScriptBaseScript.
27
         * 
28
         */
29
        public Object run();
30
        
31
        /**
32
         * Executes the code of a ScriptBaseScript.
33
         * 
34
         * @param args
35
         *                         Contains the input parameters to run the ScriptBaseScript.   
36
         */
37
        public Object run(Object args[]);
38
        
39
        /**
40
         * Sets the ScriptBaseScript's current status with the saved version.
41
         *
42
         * @param saved 
43
         *                         Indicate if the ScriptBaseScript is up-to-date or not.
44
         */
45
        public void setSaved(boolean saved);
46
        
47
        /**
48
         * Indicates if the ScriptBaseScript is modified from last saved version.
49
         * 
50
         * @return true if current version is up-to-date, false if not.
51
         */
52
        public boolean isSaved();
53

    
54
        public void compile() throws ScriptingRunningException;
55
        
56
        public void put(String name, Object value);
57
        
58
        /**
59
         * Return a resource File that is beside this script.
60
         * 
61
         * @return the file which is beside this script
62
         */
63
        public File getResource(String filename);
64

    
65
}