Revision 77ad5e8c
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CloneClassificationOperation.java | ||
---|---|---|
25 | 25 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
26 | 26 |
|
27 | 27 |
/** |
28 |
* |
|
29 | 28 |
* @author pplitzner |
30 |
* |
|
31 | 29 |
*/ |
32 | 30 |
public class CloneClassificationOperation extends AbstractPersistentPostOperation { |
33 | 31 |
|
... | ... | |
52 | 50 |
this.sec = sec; |
53 | 51 |
this.relationType = relationType; |
54 | 52 |
this.service = CdmStore.getService(IClassificationService.class); |
55 |
|
|
56 | 53 |
} |
57 | 54 |
|
58 | 55 |
@Override |
59 | 56 |
public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { |
60 |
|
|
61 |
UpdateResult result = service.cloneClassification(classification.getUuid(), classificationName, sec, relationType); |
|
57 |
|
|
58 |
SubtreeCloneConfigurator cloneConfig = SubtreeCloneConfigurator.NewBaseInstance( |
|
59 |
classification.getRootNode().getUuid(), classificationName); |
|
60 |
cloneConfig.setTaxonSecundum(sec); |
|
61 |
cloneConfig.setRelationTypeToOldTaxon(relationType); |
|
62 |
|
|
63 |
UpdateResult result = service.cloneClassification(cloneConfig, sec, relationType); |
|
62 | 64 |
return postExecute(result.getCdmEntity()); |
63 | 65 |
} |
64 | 66 |
|
Also available in: Unified diff
ref #4866, ref #9228 fix CloneClassificationOperation preliminary in TaxEditor