Revision 36fdf767
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditorPart.java | ||
---|---|---|
63 | 63 |
/** |
64 | 64 |
* @author k.luther |
65 | 65 |
* @since 28.11.2018 |
66 |
* |
|
67 | 66 |
*/ |
68 |
public class DistributionEditorPart implements IE4SavablePart, IConversationEnabled, IDirtyMarkable, |
|
69 |
ICdmEntitySessionEnabled<DescriptionBase>, IPartContentHasSupplementalData, IPartContentHasDetails, |
|
70 |
IDistributionEditorPart { |
|
67 |
public class DistributionEditorPart |
|
68 |
implements IE4SavablePart, IConversationEnabled, IDirtyMarkable, |
|
69 |
ICdmEntitySessionEnabled<DescriptionBase>, IPartContentHasSupplementalData, |
|
70 |
IPartContentHasDetails, IDistributionEditorPart { |
|
71 | 71 |
|
72 | 72 |
private static final List<String> TAXONNODE_PROPERTY_PATH = Arrays.asList(new String[] { |
73 | 73 |
"taxon", //$NON-NLS-1$ |
... | ... | |
127 | 127 |
} |
128 | 128 |
|
129 | 129 |
public void init(UuidAndTitleCache nodeDto) { |
130 |
List<UUID> uuidList = new ArrayList(); |
|
130 |
List<UUID> uuidList = new ArrayList<>();
|
|
131 | 131 |
uuidList.add(nodeDto.getUuid()); |
132 | 132 |
this.taxonList = CdmStore.getService(ITaxonNodeService.class).getTaxonDistributionDTO(uuidList, TAXONNODE_PROPERTY_PATH, true); |
133 | 133 |
// taxonList.stream().filter(taxonDistribution -> CdmStore.currentAuthentiationHasPermission(taxonDistribution.getTaxonUuid(), RequiredPermissions.TAXONNODE_EDIT)); |
... | ... | |
162 | 162 |
sortMode = TaxonNodeSortMode.RankAndAlphabeticalOrder; |
163 | 163 |
} |
164 | 164 |
this.taxonList = CdmStore.getService(ITaxonNodeService.class).getTaxonDistributionDTO(nodeUuids, TAXONNODE_PROPERTY_PATH,null, true, sortMode); |
165 |
// taxonList.stream().filter(taxonDistribution -> CdmStore.currentAuthentiationHasPermission(taxonDistribution.getTaxonUuid(), RequiredPermissions.TAXONNODE_EDIT)); |
|
166 |
|
|
165 |
// taxonList.stream().filter(taxonDistribution -> CdmStore.currentAuthentiationHasPermission(taxonDistribution.getTaxonUuid(), RequiredPermissions.TAXONNODE_EDIT)); |
|
167 | 166 |
|
168 | 167 |
if(taxonList!=null){ |
169 | 168 |
editor.loadDistributions(taxonList); |
... | ... | |
187 | 186 |
cdmEntitySession.bind(); |
188 | 187 |
} |
189 | 188 |
EditorUtil.checkAndCloseFactsAndMediaParts(partService); |
190 |
|
|
191 | 189 |
} |
192 | 190 |
|
193 | 191 |
@Override |
... | ... | |
221 | 219 |
|
222 | 220 |
@Override |
223 | 221 |
public List<DescriptionBase> getRootEntities() { |
224 |
List<DescriptionBase> rootEntities = new ArrayList(); |
|
222 |
List<DescriptionBase> rootEntities = new ArrayList<>();
|
|
225 | 223 |
editor.taxonList.forEach(dto -> rootEntities.addAll(dto.getDescriptionsWrapper().getDescriptions())); |
226 | 224 |
return rootEntities; |
227 | 225 |
} |
Also available in: Unified diff
cleanup