commit 154f5e573c065a28463532e8441a97113626649b
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Wed May 10 14:50:07 2017 +0200

    ref #6169 renaming EntityEvents into EditorEvents to better express the purpose

diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java b/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java
index 9899f5f1..fa099904 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItem.java
@@ -26,8 +26,8 @@ import com.vaadin.ui.Link;
 import com.vaadin.ui.themes.ValoTheme;
 
 import eu.etaxonomy.cdm.model.common.TimePeriod;
-import eu.etaxonomy.cdm.vaadin.event.EntityEventType;
-import eu.etaxonomy.cdm.vaadin.event.ReferenceEvent;
+import eu.etaxonomy.cdm.vaadin.event.EditorActionType;
+import eu.etaxonomy.cdm.vaadin.event.ReferenceEditorAction;
 import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent;
 import eu.etaxonomy.cdm.vaadin.model.registration.RegistrationWorkingSet;
 import eu.etaxonomy.cdm.vaadin.util.formatter.DateTimeFormat;
@@ -166,11 +166,11 @@ public class RegistrationItem extends GridLayout {
 
     public void setWorkingSet(RegistrationWorkingSet workingSet, AbstractView<?> parentView){
         this.parentView = parentView;
-        ReferenceEvent openButtonEvent;
+        ReferenceEditorAction openButtonEvent;
         if(workingSet.getCitationId() != null){
-            openButtonEvent = new ReferenceEvent(EntityEventType.EDIT, workingSet.getCitationId());
+            openButtonEvent = new ReferenceEditorAction(EditorActionType.EDIT, workingSet.getCitationId());
         } else {
-            openButtonEvent = new ReferenceEvent(EntityEventType.ADD);
+            openButtonEvent = new ReferenceEditorAction(EditorActionType.ADD);
         }
         TimePeriod datePublished = workingSet.getRegistrationDTOs().get(0).getDatePublished();
         updateUI(workingSet.getCitation(), workingSet.getCreated(), datePublished, workingSet.messagesCount(),
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEditorAction.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEditorAction.java
new file mode 100644
index 00000000..61368184
--- /dev/null
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEditorAction.java
@@ -0,0 +1,63 @@
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.vaadin.event;
+
+/**
+ * @author a.kohlbecker
+ * @since Mar 22, 2017
+ *
+ */
+public abstract class AbstractEditorAction {
+
+
+    private EditorActionType actionType;
+
+    private Integer entityId = null;
+
+    public AbstractEditorAction(EditorActionType eventType, Integer entityId) {
+        this.actionType = eventType;
+        if(eventType == null){
+            throw new NullPointerException();
+        }
+        this.setEntityId(entityId);
+    }
+
+    public AbstractEditorAction(EditorActionType actionType) {
+        this(actionType, null);
+    }
+
+    public EditorActionType getActionType() {
+        return actionType;
+    }
+
+    public boolean isAddAction() {
+        return actionType.equals(EditorActionType.ADD);
+    }
+    public boolean isEditAction() {
+        return actionType.equals(EditorActionType.EDIT);
+    }
+    public boolean isRemoveAction() {
+        return actionType.equals(EditorActionType.REMOVE);
+    }
+
+    /**
+     * @return the entityId
+     */
+    public Integer getEntityId() {
+        return entityId;
+    }
+
+    /**
+     * @param entityId the entityId to set
+     */
+    private void setEntityId(Integer entityId) {
+        this.entityId = entityId;
+    }
+
+}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEntityEvent.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEntityEvent.java
deleted file mode 100644
index ffa7b569..00000000
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEntityEvent.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
-* Copyright (C) 2017 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.vaadin.event;
-
-/**
- * @author a.kohlbecker
- * @since Mar 22, 2017
- *
- */
-public abstract class AbstractEntityEvent {
-
-
-    private EntityEventType eventType;
-
-    private Integer entityId = null;
-
-    public AbstractEntityEvent(EntityEventType eventType, Integer entityId) {
-        this.eventType = eventType;
-        if(eventType == null){
-            throw new NullPointerException();
-        }
-        this.setEntityId(entityId);
-    }
-
-    public AbstractEntityEvent(EntityEventType eventType) {
-        this(eventType, null);
-    }
-
-    public EntityEventType getEventType() {
-        return eventType;
-    }
-
-    public boolean isAddEvent() {
-        return eventType.equals(EntityEventType.ADD);
-    }
-    public boolean isEditEvent() {
-        return eventType.equals(EntityEventType.EDIT);
-    }
-    public boolean isRemoveEvent() {
-        return eventType.equals(EntityEventType.REMOVE);
-    }
-
-    /**
-     * @return the entityId
-     */
-    public Integer getEntityId() {
-        return entityId;
-    }
-
-    /**
-     * @param entityId the entityId to set
-     */
-    private void setEntityId(Integer entityId) {
-        this.entityId = entityId;
-    }
-
-}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionType.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionType.java
new file mode 100644
index 00000000..cd86b685
--- /dev/null
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionType.java
@@ -0,0 +1,22 @@
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.vaadin.event;
+
+/**
+ * @author a.kohlbecker
+ * @since Mar 22, 2017
+ *
+ */
+public enum EditorActionType {
+
+    ADD,
+    EDIT,
+    REMOVE;
+
+}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/EntityEventType.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/EntityEventType.java
deleted file mode 100644
index ad3d1805..00000000
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/event/EntityEventType.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
-* Copyright (C) 2017 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.vaadin.event;
-
-/**
- * @author a.kohlbecker
- * @since Mar 22, 2017
- *
- */
-public enum EntityEventType {
-
-    ADD,
-    EDIT,
-    REMOVE;
-
-}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/ReferenceEditorAction.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/ReferenceEditorAction.java
new file mode 100644
index 00000000..e6bf6857
--- /dev/null
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/event/ReferenceEditorAction.java
@@ -0,0 +1,36 @@
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.vaadin.event;
+
+/**
+ * @author a.kohlbecker
+ * @since Mar 22, 2017
+ *
+ */
+public class ReferenceEditorAction extends AbstractEditorAction {
+
+    /**
+     * @param eventType
+     */
+    public ReferenceEditorAction(EditorActionType eventType) {
+        super(eventType);
+    }
+
+    /**
+     * @param eventType
+     * @param entityId
+     */
+    public ReferenceEditorAction(EditorActionType eventType, Integer entityId) {
+        super(eventType, entityId);
+    }
+
+
+
+
+}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/ReferenceEvent.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/ReferenceEvent.java
deleted file mode 100644
index 8799bad1..00000000
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/event/ReferenceEvent.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
-* Copyright (C) 2017 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.vaadin.event;
-
-/**
- * @author a.kohlbecker
- * @since Mar 22, 2017
- *
- */
-public class ReferenceEvent extends AbstractEntityEvent {
-
-    /**
-     * @param eventType
-     */
-    public ReferenceEvent(EntityEventType eventType) {
-        super(eventType);
-    }
-
-    /**
-     * @param eventType
-     * @param entityId
-     */
-    public ReferenceEvent(EntityEventType eventType, Integer entityId) {
-        super(eventType, entityId);
-    }
-
-
-
-
-}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/TaxonNameEditorAction.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/TaxonNameEditorAction.java
new file mode 100644
index 00000000..62930278
--- /dev/null
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/event/TaxonNameEditorAction.java
@@ -0,0 +1,23 @@
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.vaadin.event;
+
+/**
+ * @author a.kohlbecker
+ * @since Mar 22, 2017
+ *
+ */
+public class TaxonNameEditorAction extends AbstractEditorAction {
+
+
+    public TaxonNameEditorAction(EditorActionType eventType) {
+        super(eventType);
+    }
+
+}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/TaxonNameEvent.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/TaxonNameEvent.java
deleted file mode 100644
index 714d060e..00000000
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/event/TaxonNameEvent.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
-* Copyright (C) 2017 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.vaadin.event;
-
-/**
- * @author a.kohlbecker
- * @since Mar 22, 2017
- *
- */
-public class TaxonNameEvent extends AbstractEntityEvent {
-
-
-    public TaxonNameEvent(EntityEventType eventType) {
-        super(eventType);
-    }
-
-}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/TypeDesignationEditorAction.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/TypeDesignationEditorAction.java
new file mode 100644
index 00000000..3c2be569
--- /dev/null
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/event/TypeDesignationEditorAction.java
@@ -0,0 +1,23 @@
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.vaadin.event;
+
+/**
+ * @author a.kohlbecker
+ * @since Mar 22, 2017
+ *
+ */
+public class TypeDesignationEditorAction extends AbstractEditorAction {
+
+
+    public TypeDesignationEditorAction(EditorActionType eventType) {
+        super(eventType);
+    }
+
+}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/TypeDesignationEvent.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/TypeDesignationEvent.java
deleted file mode 100644
index 580437b1..00000000
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/event/TypeDesignationEvent.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
-* Copyright (C) 2017 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.vaadin.event;
-
-/**
- * @author a.kohlbecker
- * @since Mar 22, 2017
- *
- */
-public class TypeDesignationEvent extends AbstractEntityEvent {
-
-
-    public TypeDesignationEvent(EntityEventType eventType) {
-        super(eventType);
-    }
-
-}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowPresenter.java
index 245961c6..4e110561 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowPresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowPresenter.java
@@ -27,7 +27,7 @@ import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
 import eu.etaxonomy.cdm.service.IRegistrationWorkingSetService;
-import eu.etaxonomy.cdm.vaadin.event.ReferenceEvent;
+import eu.etaxonomy.cdm.vaadin.event.ReferenceEditorAction;
 import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent;
 import eu.etaxonomy.cdm.vaadin.event.registration.RegistrationWorkflowEvent;
 import eu.etaxonomy.cdm.vaadin.model.registration.RegistrationWorkingSet;
@@ -91,14 +91,14 @@ public class RegistrationWorkflowPresenter extends AbstractPresenter<Registratio
     }
 
     @EventListener(condition = "#event.eventType ==T(eu.etaxonomy.cdm.vaadin.event.EntityEventType).ADD")
-    public void onReferenceAddEvent(ReferenceEvent event) {
+    public void onReferenceAddEvent(ReferenceEditorAction event) {
         Reference reference = ReferenceFactory.newGeneric();
         ReferencePopupEditor popup = getNavigationManager().showInPopup(ReferencePopupEditor.class);
         popup.showInEditor(reference);
     }
 
     @EventListener(condition = "#event.eventType ==T(eu.etaxonomy.cdm.vaadin.event.EntityEventType).EDIT")
-    public void onReferenceEditEvent(ReferenceEvent event) {
+    public void onReferenceEditEvent(ReferenceEditorAction event) {
         Reference reference = getRepo().getReferenceService().find(event.getEntityId());
         ReferencePopupEditor popup = getNavigationManager().showInPopup(ReferencePopupEditor.class);
         popup.showInEditor(reference);
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowViewBean.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowViewBean.java
index 4352044a..c1d98a43 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowViewBean.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkflowViewBean.java
@@ -38,10 +38,10 @@ import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationItem;
 import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationStyles;
 import eu.etaxonomy.cdm.vaadin.component.registration.TypeStateLabel;
 import eu.etaxonomy.cdm.vaadin.component.registration.WorkflowSteps;
-import eu.etaxonomy.cdm.vaadin.event.EntityEventType;
-import eu.etaxonomy.cdm.vaadin.event.ReferenceEvent;
+import eu.etaxonomy.cdm.vaadin.event.EditorActionType;
+import eu.etaxonomy.cdm.vaadin.event.ReferenceEditorAction;
 import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent;
-import eu.etaxonomy.cdm.vaadin.event.TaxonNameEvent;
+import eu.etaxonomy.cdm.vaadin.event.TaxonNameEditorAction;
 import eu.etaxonomy.cdm.vaadin.event.registration.RegistrationWorkflowEvent;
 import eu.etaxonomy.cdm.vaadin.model.registration.RegistrationWorkingSet;
 import eu.etaxonomy.cdm.vaadin.model.registration.WorkflowStep;
@@ -232,9 +232,9 @@ public class RegistrationWorkflowViewBean extends AbstractPageView<RegistrationW
    private void addBulletWorkflowName() {
        WorkflowSteps steps = new WorkflowSteps();
        steps.appendNewWorkflowItem(1, "Publication details including the publisher.",
-               e -> eventBus.publishEvent(new ReferenceEvent(EntityEventType.EDIT)));
+               e -> eventBus.publishEvent(new ReferenceEditorAction(EditorActionType.EDIT)));
        steps.appendNewWorkflowItem(2, "One or multiple published scientific new names.",
-               e -> eventBus.publishEvent(new TaxonNameEvent(EntityEventType.EDIT)));
+               e -> eventBus.publishEvent(new TaxonNameEditorAction(EditorActionType.EDIT)));
        steps.appendNewWorkflowItem(3, "Request for data curation and await approval.", null);
        steps.appendNewWorkflowItem(4, "Awaiting publication", null);
        getWorkflow().addComponent(steps);
@@ -246,9 +246,9 @@ public class RegistrationWorkflowViewBean extends AbstractPageView<RegistrationW
   private void addBulletWorkflowTypification() {
       WorkflowSteps steps = new WorkflowSteps();
       steps.appendNewWorkflowItem(1, "Publication details including the publisher.",
-              e -> eventBus.publishEvent(new ReferenceEvent(EntityEventType.EDIT)));
+              e -> eventBus.publishEvent(new ReferenceEditorAction(EditorActionType.EDIT)));
       steps.appendNewWorkflowItem(2, "One or multiple published typifications.",
-              e -> eventBus.publishEvent(new TaxonNameEvent(EntityEventType.EDIT)));
+              e -> eventBus.publishEvent(new TaxonNameEditorAction(EditorActionType.EDIT)));
       steps.appendNewWorkflowItem(3, "Request for data curation and await approval.", null);
       steps.appendNewWorkflowItem(4, "Awaiting publication", null);
       getWorkflow().addComponent(steps);
