1
|
/**
|
2
|
* Copyright (C) 2020 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.taxeditor.navigation.navigator.e4.handler;
|
10
|
|
11
|
import java.util.EnumSet;
|
12
|
import java.util.Set;
|
13
|
|
14
|
import eu.etaxonomy.cdm.model.permission.CRUD;
|
15
|
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
|
16
|
import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
|
17
|
|
18
|
/**
|
19
|
* @author k.luther
|
20
|
* @since 15.01.2020
|
21
|
*/
|
22
|
public abstract class NavigatorCdmHandler extends RemotingCdmHandlerE4 {
|
23
|
|
24
|
/**
|
25
|
* @param label
|
26
|
*/
|
27
|
public NavigatorCdmHandler(String label) {
|
28
|
super(label);
|
29
|
|
30
|
}
|
31
|
|
32
|
private Set<TaxonNodeDto> treeNodes;
|
33
|
private Set<TaxonNodeDto> classifications;
|
34
|
|
35
|
private EnumSet<CRUD> requiredCrud = null;
|
36
|
@Override
|
37
|
public void onComplete() {
|
38
|
// TODO Auto-generated method stub
|
39
|
|
40
|
}
|
41
|
|
42
|
@Override
|
43
|
protected Object getTrigger() {
|
44
|
// TODO Auto-generated method stub
|
45
|
return null;
|
46
|
}
|
47
|
|
48
|
// public boolean allowExecute(IStructuredSelection selection){
|
49
|
// Iterator<?> selectionIterator = selection.iterator();
|
50
|
// treeNodes = new HashSet();
|
51
|
// classifications = new HashSet();
|
52
|
// while (selectionIterator.hasNext()){
|
53
|
// Object object = selectionIterator.next();
|
54
|
// if (object instanceof TaxonNodeDto && ((TaxonNodeDto)object).getTaxonUuid() == null){
|
55
|
// TaxonNodeDto dto = (TaxonNodeDto)object;
|
56
|
// classifications.add(dto);
|
57
|
//
|
58
|
// }else if(object instanceof TaxonNodeDto) {
|
59
|
// treeNodes.add((TaxonNodeDto) object);
|
60
|
// }
|
61
|
// }
|
62
|
// boolean result = true;
|
63
|
// for (TaxonNodeDto nodeDto: treeNodes){
|
64
|
// CdmStore.currentAuthentiationHasPermission(nodeDto, requiredCrud);
|
65
|
// }
|
66
|
//
|
67
|
// return CdmStore.currentAuthentiationHasPermission(treeNodes, requiredCrud);
|
68
|
// }
|
69
|
|
70
|
}
|