Project

General

Profile

Download (1.18 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.cdm.vaadin.presenter.phycobank;
10

    
11
import java.util.Collection;
12

    
13
import org.springframework.beans.factory.annotation.Autowired;
14

    
15
import com.vaadin.spring.annotation.SpringComponent;
16
import com.vaadin.spring.annotation.ViewScope;
17

    
18
import eu.etaxonomy.cdm.mock.RegistrationService;
19
import eu.etaxonomy.cdm.vaadin.view.phycobank.ListView;
20
import eu.etaxonomy.vaadin.mvp.AbstractPresenter;
21

    
22
/**
23
 * @author a.kohlbecker
24
 * @since Mar 3, 2017
25
 *
26
 */
27
@SpringComponent
28
@ViewScope
29
public class ListPresenter extends AbstractPresenter<ListView> {
30

    
31
    @Autowired
32
    private RegistrationService serviceMock;
33

    
34
    @Override
35
    public void onViewEnter() {
36
        super.onViewEnter();
37
        getView().populateTable(listRegistrations());
38
    }
39

    
40
    /**
41
     * @return
42
     */
43
    private Collection<RegistrationDTO> listRegistrations() {
44
        Collection<RegistrationDTO> dtos = serviceMock.listDTOs();
45
        return dtos;
46
    }
47

    
48
}
(1-1/4)