1 |
ea781c57
|
n.hoffmann
|
/**
|
2 |
|
|
* Copyright (C) 2007 EDIT
|
3 |
f30ec5df
|
Katja Luther
|
* European Distributed Institute of Taxonomy
|
4 |
ea781c57
|
n.hoffmann
|
* http://www.e-taxonomy.eu
|
5 |
f30ec5df
|
Katja Luther
|
*
|
6 |
ea781c57
|
n.hoffmann
|
* 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.
|
8 |
|
|
*/
|
9 |
|
|
|
10 |
78222507
|
n.hoffmann
|
package eu.etaxonomy.taxeditor.ui.dialog.selection;
|
11 |
ea781c57
|
n.hoffmann
|
|
12 |
|
|
import java.util.UUID;
|
13 |
|
|
|
14 |
|
|
import org.eclipse.swt.widgets.Shell;
|
15 |
|
|
|
16 |
db5e366d
|
n.hoffmann
|
import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
|
17 |
ea781c57
|
n.hoffmann
|
import eu.etaxonomy.cdm.model.description.PolytomousKey;
|
18 |
f211dd28
|
n.hoffmann
|
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
|
19 |
ea781c57
|
n.hoffmann
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
20 |
|
|
|
21 |
|
|
/**
|
22 |
|
|
* @author n.hoffmann
|
23 |
|
|
* @created Dec 6, 2010
|
24 |
|
|
* @version 1.0
|
25 |
|
|
*/
|
26 |
9a0f58cd
|
n.hoffmann
|
public class PolytomousKeySelectionDialog extends
|
27 |
ea781c57
|
n.hoffmann
|
AbstractFilteredCdmResourceSelectionDialog<PolytomousKey> {
|
28 |
|
|
|
29 |
f5979052
|
Katja Luther
|
public static PolytomousKey select(Shell shell, //ConversationHolder conversation,
|
30 |
|
|
PolytomousKey key){
|
31 |
|
|
PolytomousKeySelectionDialog dialog = new PolytomousKeySelectionDialog(shell, //conversation,
|
32 |
9a0f58cd
|
n.hoffmann
|
"Choose Polytomous Key", false, PolytomousKeySelectionDialog.class.getCanonicalName(), key);
|
33 |
ea781c57
|
n.hoffmann
|
return getSelectionFromDialog(dialog);
|
34 |
|
|
}
|
35 |
f30ec5df
|
Katja Luther
|
|
36 |
ea781c57
|
n.hoffmann
|
/**
|
37 |
|
|
* @param shell
|
38 |
|
|
* @param conversation
|
39 |
|
|
* @param title
|
40 |
|
|
* @param multi
|
41 |
|
|
* @param settings
|
42 |
|
|
* @param cdmObject
|
43 |
|
|
*/
|
44 |
f5979052
|
Katja Luther
|
protected PolytomousKeySelectionDialog(Shell shell,//ConversationHolder conversation,
|
45 |
|
|
String title, boolean multi,
|
46 |
ea781c57
|
n.hoffmann
|
String settings, PolytomousKey cdmObject) {
|
47 |
f5979052
|
Katja Luther
|
super(shell, //conversation,
|
48 |
|
|
title, multi, settings, cdmObject);
|
49 |
ea781c57
|
n.hoffmann
|
}
|
50 |
|
|
|
51 |
|
|
/* (non-Javadoc)
|
52 |
|
|
* @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
|
53 |
|
|
*/
|
54 |
|
|
@Override
|
55 |
|
|
protected PolytomousKey getPersistentObject(UUID uuid) {
|
56 |
db5e366d
|
n.hoffmann
|
return CdmStore.getService(IPolytomousKeyService.class).load(uuid);
|
57 |
ea781c57
|
n.hoffmann
|
}
|
58 |
|
|
|
59 |
|
|
/* (non-Javadoc)
|
60 |
d41c6a72
|
Katja Luther
|
* @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#search
|
61 |
ea781c57
|
n.hoffmann
|
*/
|
62 |
|
|
@Override
|
63 |
0ce80af9
|
Katja Luther
|
protected void callService(String pattern) {
|
64 |
|
|
model = CdmStore.getService(IPolytomousKeyService.class).getUuidAndTitleCache(limitOfInitialElements, pattern);
|
65 |
ea781c57
|
n.hoffmann
|
}
|
66 |
|
|
|
67 |
|
|
/* (non-Javadoc)
|
68 |
|
|
* @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewWizardLinkText()
|
69 |
|
|
*/
|
70 |
|
|
@Override
|
71 |
5aeccadc
|
Katja Luther
|
protected String[] getNewWizardText() {
|
72 |
ea781c57
|
n.hoffmann
|
return null;
|
73 |
|
|
}
|
74 |
|
|
|
75 |
|
|
/* (non-Javadoc)
|
76 |
|
|
* @see eu.etaxonomy.taxeditor.dialogs.filteredSelection.AbstractFilteredCdmResourceSelectionDialog#getNewEntityWizard()
|
77 |
|
|
*/
|
78 |
|
|
@Override
|
79 |
9a0f58cd
|
n.hoffmann
|
protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
|
80 |
ea781c57
|
n.hoffmann
|
return null;
|
81 |
|
|
}
|
82 |
|
|
|
83 |
|
|
}
|