3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.navigation
.key
.polytomous
.operation
;
12 import java
.util
.List
;
13 import java
.util
.UUID
;
15 import org
.eclipse
.core
.runtime
.IAdaptable
;
16 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
18 import eu
.etaxonomy
.cdm
.api
.application
.CdmChangeEvent
.Action
;
19 import eu
.etaxonomy
.cdm
.api
.service
.IPolytomousKeyService
;
20 import eu
.etaxonomy
.cdm
.api
.service
.UpdateResult
;
21 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
22 import eu
.etaxonomy
.taxeditor
.operation
.RemotingCdmUpdateOperation
;
23 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
30 public class RemotingDeletePolytomousKeyOperation
extends RemotingCdmUpdateOperation
{
32 private final static String LABEL
= "Delete Polytomous Key operation";
34 private final List
<UUID
> keysToDelete
;
41 public RemotingDeletePolytomousKeyOperation(Object source
,
43 List
<UUID
> keysToDelete
) {
44 super(LABEL
, Action
.Delete
, source
, async
);
45 this.keysToDelete
= keysToDelete
;
49 * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
52 protected UpdateResult
doUpdateExecute(IProgressMonitor monitor
, IAdaptable info
) throws Exception
{
53 entityType
= PolytomousKey
.class;
54 return CdmStore
.getService(IPolytomousKeyService
.class).delete(keysToDelete
);