2 * Copyright (C) 2016 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.ui
.dialog
.selection
;
11 import org
.eclipse
.swt
.widgets
.Shell
;
13 import eu
.etaxonomy
.cdm
.api
.service
.IAgentService
;
14 import eu
.etaxonomy
.cdm
.model
.agent
.Person
;
15 import eu
.etaxonomy
.cdm
.model
.agent
.TeamOrPersonBase
;
16 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
23 public class NomenclaturalPersonAuthorSelectionDialog
extends NomenclaturalAuthorSelectionDialog
{
33 protected NomenclaturalPersonAuthorSelectionDialog(Shell shell
, //ConversationHolder conversation,
35 boolean multi
, String settings
, TeamOrPersonBase agent
, boolean teamMemberSelection
) {
36 super(shell
, //conversation,
37 title
, multi
, settings
, agent
, teamMemberSelection
);
38 // TODO Auto-generated constructor stub
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.
50 public static TeamOrPersonBase
select(Shell shell
, //ConversationHolder conversation,
51 TeamOrPersonBase entity
, boolean teamMemberSelection
) {
52 NomenclaturalPersonAuthorSelectionDialog dialog
= new NomenclaturalPersonAuthorSelectionDialog(shell
, //conversation,
53 "Choose Agent", false, NomenclaturalAuthorSelectionDialog
.class.getCanonicalName(), entity
,teamMemberSelection
);
54 return (TeamOrPersonBase
)getSelectionFromDialog(dialog
);
58 protected void callService(String pattern
) {
59 model
= CdmStore
.getService(IAgentService
.class).getUuidAndAbbrevTitleCache(Person
.class, limitOfInitialElements
, pattern
);