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.view.PerEntityAuthorityGrantingEditor;
|
18
|
|
19
|
/**
|
20
|
* @author a.kohlbecker
|
21
|
* @since May 5, 2017
|
22
|
*
|
23
|
*/
|
24
|
public abstract class AbstractCdmPopupEditor<CDM extends CdmBase, P extends CdmEditorPresenterBase<CDM, CDM, ? extends ApplicationView>>
|
25
|
extends AbstractPopupEditor<CDM, P> implements PerEntityAuthorityGrantingEditor {
|
26
|
|
27
|
/**
|
28
|
* @param layout
|
29
|
* @param dtoType
|
30
|
*/
|
31
|
public AbstractCdmPopupEditor(Layout layout, Class<CDM> dtoType) {
|
32
|
super(layout, dtoType);
|
33
|
}
|
34
|
|
35
|
private static final long serialVersionUID = -5025937489746256070L;
|
36
|
|
37
|
@Override
|
38
|
public void grantToCurrentUser(EnumSet<CRUD> crud){
|
39
|
getPresenter().setGrantsForCurrentUser(crud);
|
40
|
}
|
41
|
|
42
|
}
|