View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2008 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12   
13  package com.eviware.soapui.impl.wsdl.panels.teststeps.support;
14  
15  import javax.swing.Action;
16  
17  import com.eviware.soapui.model.settings.Settings;
18  
19  public abstract class AbstractGroovyEditorModel implements GroovyEditorModel
20  {
21  	private final String[] keywords;
22  	private final Settings settings;
23  	private Action runAction;
24  	private final String name;
25  
26  	public AbstractGroovyEditorModel( String[] keywords, Settings settings, String name )
27  	{
28  		this.keywords = keywords;
29  		this.settings = settings;
30  		this.name = name;
31  		
32  		runAction = createRunAction();
33  	}
34  
35  	public String[] getKeywords()
36  	{
37  		return keywords;
38  	}
39  
40  	public Action getRunAction()
41  	{
42  		return runAction;
43  	}
44  	
45  	public Action createRunAction()
46  	{
47  		return null;
48  	}
49  
50  	public abstract String getScript();
51  
52  	public Settings getSettings()
53  	{
54  		return settings;
55  	}
56  
57  	public abstract void setScript( String text );
58  
59  	public String getScriptName()
60  	{
61  		return name;
62  	}
63  }