2 * Copyright (C) 2007 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 java
.util
.List
;
12 import java
.util
.UUID
;
14 import org
.eclipse
.swt
.widgets
.Shell
;
16 import eu
.etaxonomy
.cdm
.api
.service
.IAgentService
;
17 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
18 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
19 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
20 import eu
.etaxonomy
.taxeditor
.newWizard
.NewTeamWizard
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * FilteredNomenclaturalAuthorTeamSelectionDialog class.
27 * @created Jun 22, 2010
29 public class NomenclaturalAuthorTeamSelectionDialog
30 extends AbstractFilteredCdmResourceSelectionDialog
<Team
> {
32 public static Team
select(Shell shell
,
34 NomenclaturalAuthorTeamSelectionDialog dialog
= new NomenclaturalAuthorTeamSelectionDialog(shell
, //conversation,
35 "Choose Author Team", false, NomenclaturalAuthorTeamSelectionDialog
.class.getCanonicalName(), team
);
36 return getSelectionFromDialog(dialog
);
39 protected NomenclaturalAuthorTeamSelectionDialog(Shell shell
,
41 boolean multi
, String settings
, Team agent
) {
43 title
, multi
, settings
, agent
);
47 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {
48 return new NewTeamWizard(true, false);
52 protected String
[] getNewWizardText() {
53 return new String
[]{"new Team"};
57 protected Team
getPersistentObject(UUID uuid
) {
58 return CdmBase
.deproxy(CdmStore
.getService(IAgentService
.class).load(uuid
), Team
.class) ;
62 protected void callService(String pattern
) {
63 model
= (List
)CdmStore
.getService(IAgentService
.class).getUuidAndAbbrevTitleCache(Team
.class, limitOfInitialElements
, pattern
);