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
.Composite
;
16 import org
.eclipse
.swt
.widgets
.Control
;
17 import org
.eclipse
.swt
.widgets
.Shell
;
19 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
20 import eu
.etaxonomy
.cdm
.api
.service
.IClassificationService
;
21 import eu
.etaxonomy
.cdm
.model
.taxon
.Classification
;
22 import eu
.etaxonomy
.taxeditor
.newWizard
.AbstractNewEntityWizard
;
23 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
26 * <p>FilteredClassificationSelectionDialog class.</p>
29 * @created Sep 21, 2009
32 public class ClassificationSelectionDialog
extends
33 AbstractFilteredCdmResourceSelectionDialog
<Classification
> {
38 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
39 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
40 * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
42 public static Classification
select(Shell shell
, ConversationHolder conversation
) {
43 ClassificationSelectionDialog dialog
= new ClassificationSelectionDialog(shell
, conversation
,
44 "Choose a Classification", false, "", null);
45 return getSelectionFromDialog(dialog
);
49 * <p>Constructor for FilteredClassificationSelectionDialog.</p>
51 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
52 * @param title a {@link java.lang.String} object.
53 * @param multi a boolean.
54 * @param settings a {@link java.lang.String} object.
55 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
56 * @param classification a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
58 protected ClassificationSelectionDialog(Shell shell
, ConversationHolder conversation
, String title
,
59 boolean multi
, String settings
, Classification classification
) {
60 super(shell
, conversation
, title
, multi
, settings
, classification
);
64 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
68 protected Control
createExtendedContentArea(Composite parent
) {
73 * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
77 protected Classification
getPersistentObject(UUID cdmUuid
) {
78 return CdmStore
.getService(IClassificationService
.class).getClassificationByUuid(cdmUuid
);
82 * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
86 protected void initModel() {
87 model
= CdmStore
.getService(IClassificationService
.class).getUuidAndTitleCache();
92 protected AbstractNewEntityWizard
getNewEntityWizard(String parameter
) {
98 protected String
getNewWizardLinkText() {