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
.service
.ITermService
;
17 import eu
.etaxonomy
.cdm
.model
.term
.DefinedTermBase
;
18 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
19 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
20 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * @created Dec 6, 2010
27 public class FeatureSelectionDialog
extends
28 AbstractFilteredCdmResourceSelectionDialog
<Feature
> {
30 public static Feature
select(Shell shell
, //ConversationHolder conversation,
32 FeatureSelectionDialog dialog
= new FeatureSelectionDialog(shell
, //conversation,
33 "Choose Feature", false, FeatureSelectionDialog
.class.getCanonicalName(), feature
);
34 return getSelectionFromDialog(dialog
);
45 protected FeatureSelectionDialog(Shell shell
,//ConversationHolder conversation,
46 String title
, boolean multi
,
47 String settings
, Feature cdmObject
) {
48 super(shell
,//conversation,
49 title
, multi
, settings
, cdmObject
);
53 protected Feature
getPersistentObject(UUID uuid
) {
55 DefinedTermBase
<?
> term
= CdmStore
.getService(ITermService
.class).load(uuid
);
57 if(term
instanceof Feature
){
58 return (Feature
) term
;
65 protected void callService(String pattern
) {
66 model
= CdmStore
.getService(ITermService
.class).getUuidAndTitleCache(Feature
.class, limitOfInitialElements
, pattern
);
70 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
73 protected String
[] getNewWizardText() {
78 * @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewEntityWizard()
81 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {