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
.taxeditor
.operation
.RemotingCdmUpdateOperation
;
22 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
29 public class RemotingDeletePolytomousKeyOperation
extends RemotingCdmUpdateOperation
{
31 private final static String LABEL
= "Delete Polytomous Key operation";
33 private final List
<UUID
> keysToDelete
;
40 public RemotingDeletePolytomousKeyOperation(Object source
,
42 List
<UUID
> keysToDelete
) {
43 super(LABEL
, Action
.Delete
, source
, async
);
44 this.keysToDelete
= keysToDelete
;
48 * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
51 protected UpdateResult
doUpdateExecute(IProgressMonitor monitor
, IAdaptable info
) throws Exception
{
52 return CdmStore
.getService(IPolytomousKeyService
.class).delete(keysToDelete
);