Revision 81893f4a
Added by Niels Hoffmann almost 13 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/filteredSelection/ClassificationSelectionDialog.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 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 |
*/ |
|
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 | 10 |
|
11 | 11 |
package eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection; |
12 | 12 |
|
... | ... | |
23 | 23 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
24 | 24 |
|
25 | 25 |
/** |
26 |
* <p>FilteredClassificationSelectionDialog class.</p> |
|
27 |
* |
|
26 |
* <p> |
|
27 |
* FilteredClassificationSelectionDialog class. |
|
28 |
* </p> |
|
29 |
* |
|
28 | 30 |
* @author n.hoffmann |
29 | 31 |
* @created Sep 21, 2009 |
30 | 32 |
* @version 1.0 |
31 | 33 |
*/ |
32 | 34 |
public class ClassificationSelectionDialog extends |
33 | 35 |
AbstractFilteredCdmResourceSelectionDialog<Classification> { |
34 |
|
|
36 |
|
|
35 | 37 |
/** |
36 |
* <p>select</p> |
|
37 |
* |
|
38 |
* @param shell a {@link org.eclipse.swt.widgets.Shell} object. |
|
39 |
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. |
|
38 |
* <p> |
|
39 |
* select |
|
40 |
* </p> |
|
41 |
* |
|
42 |
* @param shell |
|
43 |
* a {@link org.eclipse.swt.widgets.Shell} object. |
|
44 |
* @param conversation |
|
45 |
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} |
|
46 |
* object. |
|
40 | 47 |
* @return a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object. |
41 | 48 |
*/ |
42 |
public static Classification select(Shell shell, ConversationHolder conversation) { |
|
43 |
ClassificationSelectionDialog dialog = new ClassificationSelectionDialog(shell, conversation, |
|
44 |
"Choose a Classification", false, "", null); |
|
49 |
public static Classification select(Shell shell, |
|
50 |
ConversationHolder conversation) { |
|
51 |
ClassificationSelectionDialog dialog = new ClassificationSelectionDialog( |
|
52 |
shell, conversation, "Choose a Classification", false, "", null); |
|
45 | 53 |
return getSelectionFromDialog(dialog); |
46 | 54 |
} |
47 |
|
|
55 |
|
|
48 | 56 |
/** |
49 |
* <p>Constructor for FilteredClassificationSelectionDialog.</p> |
|
50 |
* |
|
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. |
|
57 |
* <p> |
|
58 |
* Constructor for FilteredClassificationSelectionDialog. |
|
59 |
* </p> |
|
60 |
* |
|
61 |
* @param shell |
|
62 |
* a {@link org.eclipse.swt.widgets.Shell} object. |
|
63 |
* @param title |
|
64 |
* a {@link java.lang.String} object. |
|
65 |
* @param multi |
|
66 |
* a boolean. |
|
67 |
* @param settings |
|
68 |
* a {@link java.lang.String} object. |
|
69 |
* @param conversation |
|
70 |
* a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} |
|
71 |
* object. |
|
72 |
* @param classification |
|
73 |
* a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object. |
|
57 | 74 |
*/ |
58 |
protected ClassificationSelectionDialog(Shell shell, ConversationHolder conversation, String title, |
|
59 |
boolean multi, String settings, Classification classification) { |
|
75 |
protected ClassificationSelectionDialog(Shell shell, |
|
76 |
ConversationHolder conversation, String title, boolean multi, |
|
77 |
String settings, Classification classification) { |
|
60 | 78 |
super(shell, conversation, title, multi, settings, classification); |
61 | 79 |
} |
62 |
|
|
63 |
/* (non-Javadoc) |
|
64 |
* @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite) |
|
80 |
|
|
81 |
/* |
|
82 |
* (non-Javadoc) |
|
83 |
* |
|
84 |
* @see |
|
85 |
* org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea |
|
86 |
* (org.eclipse.swt.widgets.Composite) |
|
65 | 87 |
*/ |
66 | 88 |
/** {@inheritDoc} */ |
67 | 89 |
@Override |
... | ... | |
69 | 91 |
return null; |
70 | 92 |
} |
71 | 93 |
|
72 |
/* (non-Javadoc) |
|
73 |
* @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID) |
|
94 |
/* |
|
95 |
* (non-Javadoc) |
|
96 |
* |
|
97 |
* @see |
|
98 |
* eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog |
|
99 |
* #getPersistentObject(java.util.UUID) |
|
74 | 100 |
*/ |
75 | 101 |
/** {@inheritDoc} */ |
76 | 102 |
@Override |
77 | 103 |
protected Classification getPersistentObject(UUID cdmUuid) { |
78 |
return CdmStore.getService(IClassificationService.class).getClassificationByUuid(cdmUuid);
|
|
104 |
return CdmStore.getService(IClassificationService.class).load(cdmUuid);
|
|
79 | 105 |
} |
80 | 106 |
|
81 |
/* (non-Javadoc) |
|
82 |
* @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#initModel() |
|
107 |
/* |
|
108 |
* (non-Javadoc) |
|
109 |
* |
|
110 |
* @see |
|
111 |
* eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog |
|
112 |
* #initModel() |
|
83 | 113 |
*/ |
84 | 114 |
/** {@inheritDoc} */ |
85 | 115 |
@Override |
86 | 116 |
protected void initModel() { |
87 |
model = CdmStore.getService(IClassificationService.class).getUuidAndTitleCache(); |
|
117 |
model = CdmStore.getService(IClassificationService.class) |
|
118 |
.getUuidAndTitleCache(); |
|
88 | 119 |
} |
89 | 120 |
|
90 | 121 |
/** {@inheritDoc} */ |
Also available in: Unified diff
Removing calls of deprecated methods