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.
10 package eu
.etaxonomy
.taxeditor
.ui
.dialog
.selection
;
12 import java
.util
.UUID
;
14 import org
.eclipse
.swt
.widgets
.Shell
;
16 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
17 import eu
.etaxonomy
.cdm
.api
.service
.IPolytomousKeyService
;
18 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
19 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
20 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * @created Dec 6, 2010
27 public class PolytomousKeySelectionDialog
extends
28 AbstractFilteredCdmResourceSelectionDialog
<PolytomousKey
> {
30 public static PolytomousKey
select(Shell shell
, ConversationHolder conversation
, PolytomousKey key
){
31 PolytomousKeySelectionDialog dialog
= new PolytomousKeySelectionDialog(shell
, conversation
,
32 "Choose Polytomous Key", false, PolytomousKeySelectionDialog
.class.getCanonicalName(), key
);
33 return getSelectionFromDialog(dialog
);
44 protected PolytomousKeySelectionDialog(Shell shell
,
45 ConversationHolder conversation
, String title
, boolean multi
,
46 String settings
, PolytomousKey cdmObject
) {
47 super(shell
, conversation
, title
, multi
, settings
, cdmObject
);
51 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
54 protected PolytomousKey
getPersistentObject(UUID uuid
) {
55 return CdmStore
.getService(IPolytomousKeyService
.class).load(uuid
);
59 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#initModel()
62 protected void initModel() {
63 model
= CdmStore
.getService(IPolytomousKeyService
.class).getUuidAndTitleCache(null, null);
67 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
70 protected String
getNewWizardLinkText() {
75 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewEntityWizard()
78 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {