Project

General

Profile

Download (2.32 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2018 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.preference.wizard;
10

    
11
import java.util.List;
12

    
13
import org.eclipse.swt.widgets.Composite;
14

    
15
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
16
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
17
import eu.etaxonomy.cdm.model.term.TermType;
18
import eu.etaxonomy.cdm.persistence.dto.TermDto;
19
import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
20
import eu.etaxonomy.taxeditor.l10n.Messages;
21
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
22

    
23

    
24

    
25
/**
26
 * @author k.luther
27
 * @since 05.10.2018
28
 *
29
 */
30
public class AvailableDistributionStatusPage extends AbstractTermSelectionWizardPage<TermDto> {
31

    
32

    
33

    
34
    public AvailableDistributionStatusPage(String pageName, CdmPreference pref, boolean localPref) {
35
        super(pageName, TermType.PresenceAbsenceTerm);
36
        this.pref = pref;
37
        this.localPref = localPref;
38
    }
39

    
40
    @Override
41
    public void createControl(Composite parent) {
42
        setTitle(Messages.AvailableDistributionStatusPage_PAGE_TITLE);
43
        setDescription(Messages.AvailableDistributionStatusPage_PAGE_DESCRIPTION);
44
        //if (!localPref){
45
        override = PreferencesUtil.getBooleanValue(PreferencesUtil.createOverridePreferenceString(PreferencePredicate.AvailableDistributionStatus.getKey()));
46
        createAllowOverrideButton(parent);
47
        //}
48
        super.createControl(parent);
49

    
50
    }
51

    
52
    @Override
53
    protected String getCheckedValuesFromPreferences() {
54
       String checkedValues = null;
55
        if (localPref){
56
           checkedValues = PreferencesUtil.getStringValue(PreferencePredicate.AvailableDistributionStatus.getKey(), true);
57
        }else if(pref != null){
58
            checkedValues = pref.getValue();
59
        }
60
        return checkedValues;
61
    }
62

    
63

    
64

    
65
    /**
66
     * {@inheritDoc}
67
     */
68
    @Override
69
    protected List<TermVocabularyDto> getVocabulariesFromPreference() {
70
        // TODO Auto-generated method stub
71
        return null;
72
    }
73

    
74
    @Override
75
    protected List<TermDto> getTermsFromStringValues(List<String> listValue) {
76
        // TODO Auto-generated method stub
77
        return null;
78
    }
79

    
80

    
81
}
(9-9/17)