View Javadoc

1   /*
2    * This file is a part of CAST project.
3    * (c) Copyright 2007, AGH University of Science & Technology
4    * https://caribou.iisg.agh.edu.pl/trac/cast
5    *
6    * Licensed under the Eclipse Public License, Version 1.0 (the "License").
7    * You may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    * http://www.eclipse.org/legal/epl-v10.html
10   */
11  /*
12   * File: IImportWizardStrategy.java
13   * Created: 2009-09-10
14   * Author: entrop
15   * $Id$
16   */
17  
18  package pl.edu.agh.cast.importer.wizard.strategy;
19  
20  import org.eclipse.jface.wizard.Wizard;
21  
22  import pl.edu.agh.cast.importer.wizard.page.AbstractImportWizardPage;
23  
24  /**
25   * Interface used for defining page flow strategy. The main method is
26   * {@link IImportWizardStrategy#getNextPage(AbstractImportWizardPage)}.
27   *
28   * @author AGH CAST Team
29   */
30  public interface IImportWizardStrategy {
31  
32  	/**
33  	 * Calculates which wizard page should be next, and returns reference to next page.
34  	 *
35  	 * @param current
36  	 *            current page
37  	 * @return next page
38  	 */
39  	AbstractImportWizardPage getNextPage(AbstractImportWizardPage current);
40  
41  	/**
42  	 * Creates pages needed for this strategy and adds created pages to wizard.
43  	 *
44  	 * @param wizard
45  	 *            the wizard
46  	 */
47  	void addPages(Wizard wizard);
48  
49  	/**
50  	 * Checks whether the wizard can finish the import process.
51  	 *
52  	 * @return true if the wizard could be finished, and false otherwise
53  	 */
54  	boolean canFinishWizard();
55  
56  	/**
57  	 * Perform any special finish processing for this wizard strategy.
58  	 *
59  	 * @return true if finish code execution was successful
60  	 */
61  	public boolean performFinish();
62  
63  }