Project

General

Profile

Download (1.42 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2016 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.ui.dialog.selection;
10

    
11
import java.util.List;
12

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

    
15
import eu.etaxonomy.cdm.api.service.IAgentService;
16
import eu.etaxonomy.cdm.model.agent.Person;
17
import eu.etaxonomy.taxeditor.store.CdmStore;
18

    
19
/**
20
 * @author k.luther
21
 * @date 21.06.2016
22
 */
23
public class NomenclaturalPersonAuthorSelectionDialog extends PersonSelectionDialog {
24

    
25
    protected NomenclaturalPersonAuthorSelectionDialog(Shell shell,
26
            String title, boolean multi,
27
            String settings, Person agent) {
28
        super(shell, title, multi, settings, agent);
29
    }
30

    
31
    public static Person select(Shell shell,
32
            Person entity, boolean teamMemberSelection) {
33
        NomenclaturalPersonAuthorSelectionDialog dialog = new NomenclaturalPersonAuthorSelectionDialog(shell,
34
                "Choose Agent", false, NomenclaturalAuthorSelectionDialog.class.getCanonicalName(), entity);
35
        return getSelectionFromDialog(dialog);
36
    }
37

    
38
    @Override
39
    protected void callService(String pattern) {
40
        model = (List)CdmStore.getService(IAgentService.class).getUuidAndAbbrevTitleCache(Person.class, limitOfInitialElements, pattern);
41
    }
42
}
(27-27/46)