Merge branch 'release/5.19.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.printpublisher / src / main / java / eu / etaxonomy / taxeditor / printpublisher / wizard / DirectPublishingWizard.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.printpublisher.wizard;
10
11 import eu.etaxonomy.cdm.print.PublishConfigurator;
12 import eu.etaxonomy.cdm.print.out.IPublishOutputModule;
13
14 /**
15 * <p>DirectPublishingWizard class.</p>
16 *
17 * @author n.hoffmann
18 * @created Aug 6, 2010
19 */
20 public class DirectPublishingWizard extends AbstractPublishWizard {
21
22 public DirectPublishingWizard(PublishConfigurator configurator) {
23 setConfigurator(configurator);
24 IPublishOutputModule module = configurator.getOutputModules().iterator().next();
25 setOutputModule(module);
26 }
27
28 @Override
29 public void addPages() {
30 pageOptions = new SelectOptionsWizardPage(PAGE_OPTIONS);
31 addPage(pageOptions);
32
33 pageFeatureTree = new SelectFeatureTreeWizardPage(PAGE_FEATURETREE);
34 addPage(pageFeatureTree);
35
36 pageStylesheet = new SelectStylesheetWizardPage(PAGE_STYLESHEET);
37 addPage(pageStylesheet);
38
39 pageFolder = new SelectDirectoryWizardPage(PAGE_FOLDER);
40 addPage(pageFolder);
41 }
42
43 @Override
44 public boolean performFinish() {
45 return super.performFinish();
46 }
47
48 public boolean canFinish() {
49 return pageFeatureTree.isPageComplete()
50 && pageFolder.isPageComplete();
51 }
52 }