View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2007 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  package com.eviware.x.form;
13  
14  /***
15   * 
16   * @author lars
17   */
18  public abstract class WizardPage
19  {
20     private String name;
21     private String description;
22     
23     public WizardPage(String name, String description)
24     {
25        this.name = name;
26        this.description = description;
27     }
28     
29     public String getName()
30     {
31        return name;
32     }
33     
34     public String getDescription()
35     {
36        return description;
37     }
38     
39     public boolean canGoBack()
40     {
41        return false;
42     }
43  
44     /***
45      * Initialize the page. Note that this can be called multiple times if going Back and Next.
46      * @return true if the page was initialized ok, false to end the wizard.
47      * @throws Exception
48      */
49     public abstract boolean init() throws Exception;
50     
51     /***
52      * 
53      * @return true if the page finished ok, false to end the wizard.
54      * @throws Exception
55      */
56     public abstract boolean run() throws Exception;
57  }