Project

General

Profile

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

    
12
import com.vaadin.ui.Component;
13

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

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

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

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

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

    
49
}
(1-1/9)