ref #6190 removing svn property place holder in first line of code - java files
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / dialog / selection / OriginalSourceTypeSelectionDialog.java
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.ArrayList;
13 import java.util.EnumSet;
14
15 import org.eclipse.swt.widgets.Shell;
16
17 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
18 import eu.etaxonomy.cdm.model.common.OriginalSourceType;
19 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
20
21 /**
22 * <p>OriginalSourceTypeSelectionDialog class.</p>
23 *
24 * @author c.mathew
25 * @created 18.07.2013
26 * @version 1.0
27 */
28 public class OriginalSourceTypeSelectionDialog extends
29 AbstractFilteredCdmEnumSelectionDialog<OriginalSourceType> {
30
31 /**
32 * <p>select</p>
33 *
34 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
35 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
36 * @return a {@link eu.etaxonomy.cdm.model.common.OriginalSourceType} object.
37 */
38 public static OriginalSourceType select(Shell shell, ConversationHolder conversation){
39 OriginalSourceTypeSelectionDialog dialog =
40 new OriginalSourceTypeSelectionDialog(shell,
41 conversation,
42 "Choose Original Source Type",
43 false,
44 OriginalSourceTypeSelectionDialog.class.getCanonicalName());
45 return getSelectionFromDialog(dialog);
46 }
47
48 /**
49 * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
50 *
51 * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
52 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
53 * @param title a {@link java.lang.String} object.
54 * @param multi a boolean.
55 * @param settings a {@link java.lang.String} object.
56 */
57 protected OriginalSourceTypeSelectionDialog(Shell shell,
58 ConversationHolder conversation,
59 String title,
60 boolean multi,
61 String settings) {
62 super(shell, conversation, title, multi, settings, OriginalSourceType.PrimaryTaxonomicSource);
63 }
64
65
66 /** {@inheritDoc} */
67 @Override
68 protected void initModel() {
69 model = new ArrayList<OriginalSourceType>();
70 model.addAll(EnumSet.allOf(OriginalSourceType.class));
71 }
72
73 /** {@inheritDoc} */
74 @Override
75 protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
76 return null;
77 }
78
79 /** {@inheritDoc} */
80 @Override
81 protected String getNewWizardLinkText() {
82 return null;
83 }
84 }