Project

General

Profile

Download (1.67 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2017 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.taxeditor.ui.dialog.configurator;
11

    
12
import org.eclipse.jface.wizard.Wizard;
13

    
14
import eu.etaxonomy.cdm.api.service.config.PublishForSubtreeConfigurator;
15
import eu.etaxonomy.taxeditor.l10n.Messages;
16

    
17
/**
18
 * @author k.luther
19
 * @date 11.10.2017
20
 *
21
 */
22
public class SetPublishForSubtreeWizard extends Wizard {
23

    
24
    private final PublishForSubtreeConfigurator configurator;
25
    private PublishSubTreeConfiguratorWizardPage page;
26

    
27

    
28
    /**
29
     * @param parentShell
30
     * @param dialogTitle
31
     * @param dialogTitleImage
32
     * @param dialogMessage
33
     * @param dialogImageType
34
     * @param dialogButtonLabels
35
     * @param defaultIndex
36
     * @param config
37
     */
38
    public SetPublishForSubtreeWizard(PublishForSubtreeConfigurator config) {
39
        super();
40
        this.configurator = config;
41
        setNeedsProgressMonitor(true);
42
        this.setWindowTitle(Messages.SetPublishConfiguration_Title);
43

    
44
    }
45

    
46

    
47

    
48
    /**
49
     * {@inheritDoc}
50
     */
51
    @Override
52
    public boolean performFinish() {
53
       if (!(configurator.isIncludeAcceptedTaxa() || configurator.isIncludeSynonyms())){
54
           return false;
55
       }else{
56
           return true;
57
       }
58
    }
59

    
60
    /* (non-Javadoc)
61
     * @see org.eclipse.jface.wizard.Wizard#addPages()
62
     */
63
    /** {@inheritDoc} */
64
    @Override
65
    public void addPages() {
66
        page = new PublishSubTreeConfiguratorWizardPage(configurator);
67
        addPage(page);
68
    }
69

    
70

    
71

    
72
}
(3-3/5)