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
.dialog
.selection
;
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
.IPolytomousKeyService
;
19 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
20 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
25 * @created Dec 6, 2010
28 public class PolytomousKeySelectionDialog
extends
29 AbstractFilteredCdmResourceSelectionDialog
<PolytomousKey
> {
31 public static PolytomousKey
select(Shell shell
, ConversationHolder conversation
, PolytomousKey key
){
32 PolytomousKeySelectionDialog dialog
= new PolytomousKeySelectionDialog(shell
, conversation
,
33 "Choose Polytomous Key", false, PolytomousKeySelectionDialog
.class.getCanonicalName(), key
);
34 return getSelectionFromDialog(dialog
);
45 protected PolytomousKeySelectionDialog(Shell shell
,
46 ConversationHolder conversation
, String title
, boolean multi
,
47 String settings
, PolytomousKey cdmObject
) {
48 super(shell
, conversation
, title
, multi
, settings
, cdmObject
);
52 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
55 protected PolytomousKey
getPersistentObject(UUID uuid
) {
56 return CdmStore
.getService(IPolytomousKeyService
.class).load(uuid
);
60 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#initModel()
63 protected void initModel() {
64 model
= CdmStore
.getService(IPolytomousKeyService
.class).getUuidAndTitleCache(null, null);
68 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
71 protected String
getNewWizardLinkText() {
76 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewEntityWizard()
79 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {