3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.ui
.dialogs
.filteredSelection
;
13 import java
.util
.UUID
;
15 import org
.eclipse
.swt
.widgets
.Shell
;
17 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
18 import eu
.etaxonomy
.cdm
.api
.service
.IAgentService
;
19 import eu
.etaxonomy
.cdm
.model
.agent
.Team
;
20 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
21 import eu
.etaxonomy
.taxeditor
.newWizard
.NewTeamWizard
;
22 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
25 * <p>FilteredNomenclaturalAuthorTeamSelectionDialog class.</p>
28 * @created Jun 22, 2010
31 public class NomenclaturalAuthorTeamSelectionDialog
extends
32 AbstractFilteredCdmResourceSelectionDialog
<Team
> {
37 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
38 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
39 * @param team a {@link eu.etaxonomy.cdm.model.agent.Team} object.
40 * @return a {@link eu.etaxonomy.cdm.model.agent.Team} object.
42 public static Team
select(Shell shell
, ConversationHolder conversation
, Team team
){
43 NomenclaturalAuthorTeamSelectionDialog dialog
= new NomenclaturalAuthorTeamSelectionDialog(shell
, conversation
,
44 "Choose Author Team", false, NomenclaturalAuthorTeamSelectionDialog
.class.getCanonicalName(), team
);
45 return getSelectionFromDialog(dialog
);
49 * <p>Constructor for FilteredNomenclaturalAuthorTeamSelectionDialog.</p>
51 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
52 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
53 * @param title a {@link java.lang.String} object.
54 * @param multi a boolean.
55 * @param settings a {@link java.lang.String} object.
56 * @param agent a {@link eu.etaxonomy.cdm.model.agent.Team} object.
58 protected NomenclaturalAuthorTeamSelectionDialog(Shell shell
, ConversationHolder conversation
, String title
,
59 boolean multi
, String settings
, Team agent
) {
60 super(shell
, conversation
, title
, multi
, settings
, agent
);
65 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {
66 return new NewTeamWizard();
71 protected String
getNewWizardLinkText() {
72 return "Click link to create a new <A>Team</A>.";
77 protected void initModel() {
78 model
= CdmStore
.getService(IAgentService
.class).getTeamUuidAndNomenclaturalTitle();
83 protected Team
getPersistentObject(UUID uuid
) {
84 return (Team
) CdmStore
.getService(IAgentService
.class).load(uuid
);