Project

General

Profile

Download (2.07 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
 */
24
public class NomenclaturalPersonAuthorSelectionDialog extends PersonSelectionDialog {
25

    
26
    /**
27
     * @param shell
28
     * @param conversation
29
     * @param title
30
     * @param multi
31
     * @param settings
32
     * @param agent
33
     */
34
    protected NomenclaturalPersonAuthorSelectionDialog(Shell shell, //ConversationHolder conversation,
35
            String title, boolean multi,
36
            String settings, Person agent) {
37
        super(shell, //conversation,
38
                title, multi, settings, agent);
39
        // TODO Auto-generated constructor stub
40
    }
41

    
42

    
43
    /**
44
     * <p>select</p>
45
     *
46
     * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
47
     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
48
     * @param entity a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
49
     * @return a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
50
     */
51
    public static Person select(Shell shell, //ConversationHolder conversation,
52
            Person entity, boolean teamMemberSelection) {
53
        NomenclaturalPersonAuthorSelectionDialog dialog = new NomenclaturalPersonAuthorSelectionDialog(shell,
54
                "Choose Agent", false, NomenclaturalAuthorSelectionDialog.class.getCanonicalName(), entity);
55
        return getSelectionFromDialog(dialog);
56
    }
57

    
58
    @Override
59
    protected void callService(String pattern) {
60
        model = (List)CdmStore.getService(IAgentService.class).getUuidAndAbbrevTitleCache(Person.class, limitOfInitialElements, pattern);
61
    }
62

    
63
}
(27-27/46)