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.presenter.phycobank;
|
10
|
|
11
|
import org.springframework.context.event.EventListener;
|
12
|
|
13
|
import com.vaadin.spring.annotation.SpringComponent;
|
14
|
import com.vaadin.spring.annotation.ViewScope;
|
15
|
|
16
|
import eu.etaxonomy.cdm.vaadin.event.phycobank.RegistrationStartEvent;
|
17
|
import eu.etaxonomy.cdm.vaadin.view.phycobank.RegistrationWorkflowView;
|
18
|
import eu.etaxonomy.vaadin.mvp.AbstractPresenter;
|
19
|
|
20
|
/**
|
21
|
* @author a.kohlbecker
|
22
|
* @since Mar 3, 2017
|
23
|
*
|
24
|
*/
|
25
|
@SpringComponent
|
26
|
@ViewScope
|
27
|
public class RegistrationWorkflowPresenter extends AbstractPresenter<RegistrationWorkflowView> {
|
28
|
|
29
|
private RegistrationType registrationType = null;
|
30
|
|
31
|
/**
|
32
|
*
|
33
|
*/
|
34
|
public RegistrationWorkflowPresenter() {
|
35
|
}
|
36
|
|
37
|
@EventListener
|
38
|
protected void onRegistrationStartEvent(RegistrationStartEvent e){
|
39
|
this.registrationType = e.getType();
|
40
|
getView().getTitle().setValue(getView().getTitle().getValue() + " " + registrationType.name());
|
41
|
getView().openNameEditor(null);
|
42
|
}
|
43
|
|
44
|
}
|