Project

General

Profile

« Previous | Next » 

Revision c4f5e696

Added by Andreas Kohlbecker almost 7 years ago

ref #6621 new RegistrationWorkingSetService can create missing Registations for IAPT records

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/ListPresenter.java
11 11
import java.util.Collection;
12 12

  
13 13
import org.springframework.beans.factory.annotation.Autowired;
14
import org.springframework.beans.factory.annotation.Qualifier;
14 15
import org.springframework.context.event.EventListener;
15 16

  
16 17
import com.vaadin.spring.annotation.SpringComponent;
17 18
import com.vaadin.spring.annotation.ViewScope;
18 19

  
19
import eu.etaxonomy.cdm.mock.RegistrationService;
20
import eu.etaxonomy.cdm.mock.IRegistrationWorkingSetService;
20 21
import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent;
21 22
import eu.etaxonomy.vaadin.mvp.AbstractPresenter;
22 23

  
......
32 33
    private static final long serialVersionUID = 5419947244621450665L;
33 34

  
34 35
    @Autowired
35
    private RegistrationService serviceMock;
36
    @Qualifier(IRegistrationWorkingSetService.ACTIVE_IMPL)
37
    private IRegistrationWorkingSetService workingSetService;
36 38

  
37 39
    @Override
38 40
    public void onViewEnter() {
......
44 46
     * @return
45 47
     */
46 48
    private Collection<RegistrationDTO> listRegistrations() {
47
        Collection<RegistrationDTO> dtos = serviceMock.listDTOs();
49
        Collection<RegistrationDTO> dtos = workingSetService.listDTOs();
48 50
        return dtos;
49 51
    }
50 52

  
51 53
    @EventListener(classes=ShowDetailsEvent.class, condition = "#event.entityType == T(eu.etaxonomy.cdm.vaadin.view.registration.RegistrationDTO)")
52 54
    public void onShowDetailsEvent(ShowDetailsEvent<?,?> event) { // WARNING don't use more specific generic type arguments
53
        RegistrationDTO regDto = serviceMock.loadDtoById((Integer)event.getIdentifier());
55
        RegistrationDTO regDto = workingSetService.loadDtoById((Integer)event.getIdentifier());
54 56
        if(event.getProperty().equals("messages")){
55 57
            if(getView() != null){
56 58
                getView().openDetailsPopup("Messages", regDto.getMessages());

Also available in: Unified diff