Project

General

Profile

Revision 9a4a9149

ID9a4a9149c34dcacfe72cf510bf1f020551d0a309
Parent 4942e63b
Child c256784f

Added by Andreas Kohlbecker over 2 years ago

refacoring popup editors to entity and dto editor

View differences:

src/main/java/eu/etaxonomy/vaadin/mvp/AbstractCdmDTOPopupEditor.java
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;
10

  
11
import java.util.EnumSet;
12

  
13
import com.vaadin.ui.Layout;
14

  
15
import eu.etaxonomy.cdm.model.common.CdmBase;
16
import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
17
import eu.etaxonomy.cdm.vaadin.model.CdmEntityDecoraterDTO;
18
import eu.etaxonomy.cdm.vaadin.view.PerEntityAuthorityGrantingEditor;
19

  
20
/**
21
 * @author a.kohlbecker
22
 * @since May 5, 2017
23
 *
24
 */
25
public abstract class AbstractCdmDTOPopupEditor<DTO extends CdmEntityDecoraterDTO<CDM>, CDM extends CdmBase, P extends CdmEditorPresenterBase<DTO, CDM, ? extends ApplicationView>>
26
    extends AbstractPopupEditor<DTO, P> implements PerEntityAuthorityGrantingEditor {
27

  
28
    /**
29
     * @param layout
30
     * @param dtoType
31
     */
32
    public AbstractCdmDTOPopupEditor(Layout layout, Class<DTO> dtoType) {
33
        super(layout, dtoType);
34
    }
35

  
36
    private static final long serialVersionUID = -5025937489746256070L;
37

  
38
    @Override
39
    public void grantToCurrentUser(EnumSet<CRUD> crud){
40
        getPresenter().setGrantsForCurrentUser(crud);
41
    }
42

  
43

  
44

  
45
}
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractCdmPopupEditor.java
21 21
 * @since May 5, 2017
22 22
 *
23 23
 */
24
public abstract class AbstractCdmPopupEditor<DTO extends CdmBase, P extends AbstractCdmEditorPresenter<DTO, ? extends ApplicationView>>
25
    extends AbstractPopupEditor<DTO, P> implements PerEntityAuthorityGrantingEditor {
24
public abstract class AbstractCdmPopupEditor<CDM extends CdmBase, P extends CdmEditorPresenterBase<CDM, CDM, ? extends ApplicationView>>
25
    extends AbstractPopupEditor<CDM, P> implements PerEntityAuthorityGrantingEditor {
26 26

  
27 27
    /**
28 28
     * @param layout
29 29
     * @param dtoType
30 30
     */
31
    public AbstractCdmPopupEditor(Layout layout, Class<DTO> dtoType) {
31
    public AbstractCdmPopupEditor(Layout layout, Class<CDM> dtoType) {
32 32
        super(layout, dtoType);
33 33
    }
34 34

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)