Project

General

Profile

Download (1.79 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
 * Copyright (C) 2007 EDIT
3
 * European Distributed Institute of Taxonomy
4
 * http://www.e-taxonomy.eu
5
 *
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.
8
 */
9

    
10
package eu.etaxonomy.taxeditor.ui.dialog.selection;
11

    
12
import java.util.UUID;
13

    
14
import org.eclipse.swt.widgets.Shell;
15

    
16
import eu.etaxonomy.cdm.api.service.IClassificationService;
17
import eu.etaxonomy.cdm.model.taxon.Classification;
18
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
19
import eu.etaxonomy.taxeditor.store.CdmStore;
20

    
21
/**
22
 * <p>
23
 * FilteredClassificationSelectionDialog class.
24
 * </p>
25
 *
26
 * @author n.hoffmann
27
 * @created Sep 21, 2009
28
 */
29
public class ClassificationSelectionDialog extends
30
		AbstractFilteredCdmResourceSelectionDialog<Classification> {
31

    
32
	public static Classification select(Shell shell,
33
	        Classification curentSelection) {
34
		ClassificationSelectionDialog dialog = new ClassificationSelectionDialog(shell,
35
		        "Choose a Classification", false, "", null);
36
		return getSelectionFromDialog(dialog);
37
	}
38

    
39
	protected ClassificationSelectionDialog(Shell shell,
40
	        String title, boolean multi,
41
			String settings, Classification classification) {
42
		super(shell, title, multi, settings, classification);
43
	}
44

    
45
	@Override
46
	protected Classification getPersistentObject(UUID cdmUuid) {
47
		return CdmStore.getService(IClassificationService.class).load(cdmUuid);
48
	}
49

    
50
	@Override
51
	protected void callService(String pattern) {
52
	    model = CdmStore.getService(IClassificationService.class).getUuidAndTitleCache(limitOfInitialElements, pattern);
53
    }
54

    
55
	@Override
56
	protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
57
		return null;
58
	}
59

    
60
	@Override
61
	protected String[] getNewWizardText() {
62
		return null;
63
	}
64
}
(7-7/46)