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 com.vaadin.ui.Component.Event;
|
12
|
|
13
|
/**
|
14
|
* A request to display the details of the <code>property</code> for an object of
|
15
|
* the class <code>entityType</code> which is uniquely identified by the <code>identifier</code>
|
16
|
* This event is usually passed from a view to the according presenter implementation
|
17
|
* which is capable of retrieving the details based on the <code>entityType</code> +
|
18
|
* <code>identifier</code> + <code>property</code> and which should in turn pass the
|
19
|
* extracted details data to the view for display.
|
20
|
*
|
21
|
* @author a.kohlbecker
|
22
|
* @since Mar 24, 2017
|
23
|
*
|
24
|
*/
|
25
|
public class ShowDetailsEvent<T extends Object, I extends Object> {
|
26
|
|
27
|
private Event source;
|
28
|
private Class<T> entityType;
|
29
|
private I identifier;
|
30
|
private String property;
|
31
|
|
32
|
/**
|
33
|
*
|
34
|
* @param sourceEvent
|
35
|
* @param identifier
|
36
|
* @param property
|
37
|
*/
|
38
|
public ShowDetailsEvent(Event sourceEvent, Class<T> entityType , I identifier, String property) {
|
39
|
this.source = sourceEvent;
|
40
|
this.entityType = entityType;
|
41
|
this.identifier = identifier;
|
42
|
this.property = property;
|
43
|
}
|
44
|
|
45
|
/**
|
46
|
* @return the source
|
47
|
*/
|
48
|
public Event getSource() {
|
49
|
return source;
|
50
|
}
|
51
|
|
52
|
/**
|
53
|
* @return the type
|
54
|
*/
|
55
|
public Class<T> getEntityType() {
|
56
|
return entityType;
|
57
|
}
|
58
|
|
59
|
/**
|
60
|
* @return the identifier
|
61
|
*/
|
62
|
public I getIdentifier() {
|
63
|
return identifier;
|
64
|
}
|
65
|
|
66
|
/**
|
67
|
* @return the property
|
68
|
*/
|
69
|
public String getProperty() {
|
70
|
return property;
|
71
|
}
|
72
|
|
73
|
|
74
|
|
75
|
}
|