Project

General

Profile

Download (1.13 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2015 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.session;
10

    
11
import com.vaadin.ui.Component;
12

    
13
/**
14
 * @author cmathew
15
 * @date 21 Apr 2015
16
 *
17
 */
18
public class BasicEvent {
19

    
20
    private final String eventId;
21
    private final Class<? extends Component> sourceType;
22

    
23
    public BasicEvent(String eventId, Class sourceType) {
24
        this.eventId = eventId;
25
        if(eventId == null || eventId.isEmpty()) {
26
            throw new IllegalArgumentException("Event id cannot be null or empty");
27
        }
28
        this.sourceType = sourceType;
29
        if(sourceType == null) {
30
            throw new IllegalArgumentException("Source type cannot be null");
31
        }
32
    }
33

    
34
    /**
35
     * @return the eventId
36
     */
37
    public String getEventId() {
38
        return eventId;
39
    }
40

    
41
    /**
42
     * @return the sourceType
43
     */
44
    public Class<? extends Component> getSourceType() {
45
        return sourceType;
46
    }
47

    
48
}
(1-1/9)