01: /*
02: * SalomeTMF is a Test Management Framework
03: * Copyright (C) 2005 France Telecom R&D
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: *
19: * @author Fayçal SOUGRATI, Vincent Pautret, Marche Mikael
20: *
21: * Contact: mikael.marche@rd.francetelecom.com
22: */
23:
24: package org.objectweb.salome_tmf.plugins.core;
25:
26: import java.net.URL;
27: import java.util.Hashtable;
28: import org.objectweb.salome_tmf.data.Script;
29:
30: /**
31: *
32: * @author marchemi
33: */
34: public interface ScriptEngine {
35:
36: final static int ENV_SCRIPT = 1;
37: final static int PRE_SCRIPT = 2;
38: final static int POST_SCRIPT = 3;
39:
40: /*
41: * initialisation du plugin
42: */
43: public void initScriptEngine(URL urlSalome);
44:
45: /**
46: * Lancemement du script.
47: * @param type de script ENV_SCRIPT, PRE_SCRIPT, POST_SCRIPT
48: * @return Valeur de terminaison du script (0 : OK, <>0 code d'erreur)
49: */
50: public int runScript(int type, String urlScriptFile,
51: Script pScript, Hashtable arg, String plugParam)
52: throws Exception;
53:
54: /**
55: * Odre d'édition du script
56: * @param type de script ENV_SCRIPT, PRE_SCRIPT, POST_SCRIPT
57: */
58: public void editScript(String urlScriptFile, int type,
59: Script pScript, Hashtable arg, String plugParam)
60: throws Exception;;
61:
62: /**
63: * This method is called when user want to modify/set free arg of script
64: * @return a string represented arg for test the testDriver
65: */
66: public String modifyEngineAgument(Script pScript);
67:
68: public void stopScript() throws Exception;
69:
70: public String getScriptLog();
71: }
|