added a readme file
[taxeditor.git] / taxeditor-editor / src / main / java / eu / etaxonomy / taxeditor / dialogs / filteredSelection / FilteredClassificationSelectionDialog.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
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.
9 */
10
11 package eu.etaxonomy.taxeditor.dialogs.filteredSelection;
12
13 import java.util.UUID;
14
15 import org.eclipse.swt.widgets.Composite;
16 import org.eclipse.swt.widgets.Control;
17 import org.eclipse.swt.widgets.Shell;
18
19 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
20 import eu.etaxonomy.cdm.model.taxon.Classification;
21 import eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard;
22 import eu.etaxonomy.taxeditor.store.CdmStore;
23
24 /**
25 * <p>FilteredClassificationSelectionDialog class.</p>
26 *
27 * @author n.hoffmann
28 * @created Sep 21, 2009
29 * @version 1.0
30 */
31 public class FilteredClassificationSelectionDialog extends
32 AbstractFilteredCdmResourceSelectionDialog<Classification> {
33
34 /**
35 * <p>select</p>
36 *
37 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
38 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
39 * @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
40 */
41 public static Classification select(Shell shell, ConversationHolder conversation) {
42 FilteredClassificationSelectionDialog dialog = new FilteredClassificationSelectionDialog(shell, conversation,
43 "Choose a Classification", false, "", null);
44 return getSelectionFromDialog(dialog);
45 }
46
47 /**
48 * <p>Constructor for FilteredClassificationSelectionDialog.</p>
49 *
50 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
51 * @param title a {@link java.lang.String} object.
52 * @param multi a boolean.
53 * @param settings a {@link java.lang.String} object.
54 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
55 * @param classification a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
56 */
57 protected FilteredClassificationSelectionDialog(Shell shell, ConversationHolder conversation, String title,
58 boolean multi, String settings, Classification classification) {
59 super(shell, conversation, title, multi, settings, classification);
60 }
61
62 /* (non-Javadoc)
63 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
64 */
65 /** {@inheritDoc} */
66 @Override
67 protected Control createExtendedContentArea(Composite parent) {
68 // TODO Auto-generated method stub
69 return null;
70 }
71
72 /* (non-Javadoc)
73 * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
74 */
75 /** {@inheritDoc} */
76 @Override
77 protected Classification getPersistentObject(UUID cdmUuid) {
78 return CdmStore.getClassificationService().getClassificationByUuid(cdmUuid);
79 }
80
81 /* (non-Javadoc)
82 * @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel()
83 */
84 /** {@inheritDoc} */
85 @Override
86 protected void initModel() {
87 model = CdmStore.getClassificationService().getUuidAndTitleCache();
88 }
89
90 /** {@inheritDoc} */
91 @Override
92 protected AbstractNewEntityWizard getNewEntityWizard() {
93 // TODO Auto-generated method stub
94 return null;
95 }
96
97 /** {@inheritDoc} */
98 @Override
99 protected String getNewWizardLinkText() {
100 // TODO Auto-generated method stub
101 return null;
102 }
103 }