Project

General

Profile

Download (1.16 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.vaadin.mvp.event;
10

    
11
import eu.etaxonomy.vaadin.mvp.AbstractView;
12

    
13
/**
14
 * Usually a notification to a presenter to
15
 * prepare for a save operation by starting a transaction
16
 *
17
 * @author a.kohlbecker
18
 * @since Apr 5, 2017
19
 *
20
 */
21
public class EditorPreSaveEvent<DTO extends Object> implements EditorViewEvent, EditorBeanEvent<DTO>{
22

    
23
    // FIXME this is only a iterim solution for the problem described in https://dev.e-taxonomy.eu/redmine/issues/6562
24
    private AbstractView<?> view;
25

    
26
    private DTO bean;
27

    
28
    /**
29
     * @param commitEvent
30
     */
31
    public EditorPreSaveEvent(AbstractView<?> view, DTO bean) {
32
        this.bean = bean;
33
        this.view = view;
34
    }
35

    
36

    
37
    /**
38
     * @return the view
39
     */
40
    @Override
41
    public AbstractView<?> getView() {
42
        return view;
43
    }
44

    
45

    
46
    /**
47
     * {@inheritDoc}
48
     */
49
    @Override
50
    public DTO getBean() {
51
        return bean;
52
    }
53

    
54
}
(3-3/5)