8ae7af30e0f737f9b8df69fef18f1fc1c7293486
[taxeditor.git] / taxeditor-bulkeditor / src / main / java / eu / etaxonomy / taxeditor / bulkeditor / input / ReferenceEditorInput.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 package eu.etaxonomy.taxeditor.bulkeditor.input;
11
12 import eu.etaxonomy.cdm.model.common.MarkerType;
13
14
15 /**
16 * @author p.ciardelli
17 * @created 25.06.2009
18 * @version 1.0
19 */
20 public class ReferenceEditorInput extends BulkEditorInput {
21
22 public static final String ID = "bulkeditor.input.reference";
23
24 private static ReferenceEditorInput instance;
25
26 /**
27 * @param sourceBean
28 */
29 public ReferenceEditorInput() {
30 super(new Object());
31 }
32
33 /**
34 * @return the iD
35 */
36 public static String getID() {
37 return ID;
38 }
39
40 /* (non-Javadoc)
41 * @see org.eclipse.ui.IEditorInput#getName()
42 */
43 public String getName() {
44 return "Bulk Editor - References";
45 }
46
47 /* (non-Javadoc)
48 * @see org.eclipse.ui.IEditorInput#getToolTipText()
49 */
50 public String getToolTipText() {
51 return getName();
52 }
53
54 /**
55 * @return
56 */
57 public static BulkEditorInput getInstance() {
58 if (instance == null) {
59 instance = new ReferenceEditorInput();
60 }
61 return instance;
62 }
63
64 /* (non-Javadoc)
65 * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMergingEnabled()
66 */
67 @Override
68 public boolean isMergingEnabled() {
69 return true;
70 }
71
72 /* (non-Javadoc)
73 * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMarkerTypeEditingEnabled(eu.etaxonomy.cdm.model.common.MarkerType)
74 */
75 @Override
76 public boolean isMarkerTypeEditingEnabled(MarkerType markerType) {
77 if (MarkerType.PUBLISH().equals(markerType)) {
78 return true;
79 }
80 return super.isMarkerTypeEditingEnabled(markerType);
81 }
82 }