1
|
/**
|
2
|
* Copyright (C) 2017 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
|
package eu.etaxonomy.cdm.vaadin.event;
|
10
|
|
11
|
/**
|
12
|
* @author a.kohlbecker
|
13
|
* @since Mar 22, 2017
|
14
|
*
|
15
|
*/
|
16
|
public abstract class AbstractEditorAction extends AbstractEntityEvent<AbstractEditorAction.Type> {
|
17
|
|
18
|
public enum Type {
|
19
|
ADD,
|
20
|
EDIT,
|
21
|
REMOVE;
|
22
|
}
|
23
|
|
24
|
public AbstractEditorAction(Type type) {
|
25
|
super(type, null);
|
26
|
}
|
27
|
|
28
|
/**
|
29
|
* @param type
|
30
|
* @param citationId
|
31
|
*/
|
32
|
public AbstractEditorAction(Type type, Integer entityId) {
|
33
|
super(type, entityId);
|
34
|
}
|
35
|
|
36
|
public boolean isAddAction() {
|
37
|
return type.equals(Type.ADD);
|
38
|
}
|
39
|
public boolean isEditAction() {
|
40
|
return type.equals(Type.EDIT);
|
41
|
}
|
42
|
public boolean isRemoveAction() {
|
43
|
return type.equals(Type.REMOVE);
|
44
|
}
|
45
|
|
46
|
|
47
|
}
|