Revision b13da0b9
Added by Cherian Mathew almost 9 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewClassificationWizard.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 2 |
/** |
3 | 3 |
* Copyright (C) 2007 EDIT |
4 |
* European Distributed Institute of Taxonomy
|
|
4 |
* European Distributed Institute of Taxonomy |
|
5 | 5 |
* http://www.e-taxonomy.eu |
6 |
*
|
|
6 |
* |
|
7 | 7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
8 | 8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
9 | 9 |
*/ |
10 | 10 |
|
11 | 11 |
package eu.etaxonomy.taxeditor.newWizard; |
12 | 12 |
|
13 |
import eu.etaxonomy.cdm.api.application.CdmApplicationState; |
|
14 |
import eu.etaxonomy.cdm.api.application.CdmChangeEvent; |
|
15 |
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action; |
|
13 | 16 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
14 | 17 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
15 | 18 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
... | ... | |
36 | 39 |
entity = CdmStore.getService(IClassificationService.class).load(entity.getUuid()); |
37 | 40 |
super.setEntity(entity); |
38 | 41 |
} |
39 |
|
|
42 |
|
|
40 | 43 |
@Override |
41 | 44 |
public void addPages() { |
42 | 45 |
classificationWizardPage = new ClassificationWizardPage(formFactory, getConversationHolder(), getEntity()); |
43 | 46 |
addPage(classificationWizardPage); |
44 | 47 |
} |
45 |
|
|
48 |
|
|
46 | 49 |
@Override |
47 | 50 |
protected void saveEntity() { |
48 |
CdmStore.getService(IClassificationService.class).saveOrUpdate(getEntity()); |
|
51 |
//CdmStore.getService(IClassificationService.class).saveOrUpdate(getEntity()); |
|
52 |
Classification classification = getEntity(); |
|
53 |
CdmStore.getService(IClassificationService.class).merge(getEntity()); |
|
54 |
|
|
55 |
CdmApplicationState.getCurrentDataChangeService() |
|
56 |
.fireChangeEvent(new CdmChangeEvent(Action.Create, classification, NewTaxonNodeWizard.class), true); |
|
57 |
|
|
49 | 58 |
} |
50 | 59 |
|
51 | 60 |
@Override |
Also available in: Unified diff
#5007 : Add remoting handler / operations for the taxon navigator