Project

General

Profile

Download (2.4 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.Collection;
12
import java.util.List;
13
import java.util.Map;
14

    
15
import org.eclipse.swt.widgets.Composite;
16

    
17
import eu.etaxonomy.cdm.model.common.CdmBase;
18
import eu.etaxonomy.cdm.model.common.TermType;
19
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
20
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
21
import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
22
import eu.etaxonomy.taxeditor.l10n.Messages;
23
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
24
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
25
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
26

    
27
/**
28
 * @author k.luther
29
 * @since 05.10.2018
30
 *
31
 */
32
public class AvailableDistributionStatusPage extends AbstractAdminTermSelectionWizardPage implements ICdmEntitySessionEnabled{
33

    
34

    
35

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

    
41
    @Override
42
    public void createControl(Composite parent) {
43
        setTitle(Messages.AvailableDistributionStatusPage_PAGE_TITLE);
44
        setDescription(Messages.AvailableDistributionStatusPage_PAGE_DESCRIPTION);
45
        //if (!localPref){
46
            createAllowOverrideButton(parent);
47
        //}
48
        super.createControl(parent);
49

    
50
    }
51

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

    
63
    @Override
64
    public ICdmEntitySession getCdmEntitySession() {
65
        return null;
66
    }
67

    
68
    @Override
69
    public <T extends CdmBase> Collection<T> getRootEntities() {
70
        return null;
71
    }
72

    
73
    @Override
74
    public Map<Object, List<String>> getPropertyPathsMap() {
75
        return null;
76
    }
77

    
78
    @Override
79
    protected  List<TermVocabularyDto> getVocabulariesFromPreference(){
80
     return null;
81
    }
82

    
83
}
(7-7/14)