Project

General

Profile

Download (2.19 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 org.eclipse.swt.widgets.Shell;
12

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

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

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

    
41

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

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

    
62
}
(26-26/44)