Project

General

Profile

Download (1.13 KB) Statistics
| Branch: | Tag: | Revision:
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
import java.util.UUID;
12

    
13
import eu.etaxonomy.vaadin.mvp.AbstractView;
14

    
15
/**
16
 * @author a.kohlbecker
17
 * @since May 10, 2017
18
 *
19
 */
20
public abstract class AbstractEntityEvent<T extends Enum> {
21

    
22
    private UUID entityUuid = null;
23

    
24
    protected T type;
25

    
26
    private AbstractView sourceView = null;
27

    
28
    public AbstractEntityEvent(T type, UUID entityUuid, AbstractView sourceView) {
29
        this.entityUuid = entityUuid;
30
        this.type = type;
31
        this.sourceView = sourceView;
32
        if(type == null){
33
            throw new NullPointerException();
34
        }
35
    }
36

    
37
    /**
38
     * @return the entityId
39
     */
40
    public UUID getEntityUuid() {
41
        return entityUuid;
42
    }
43

    
44
    public T getType() {
45
        return type;
46
    }
47

    
48
    /**
49
     * @return the sourceView
50
     */
51
    public AbstractView getSourceView() {
52
        return sourceView;
53
    }
54

    
55
}
(2-2/29)