Project

General

Profile

« Previous | Next » 

Revision 83a1a479

Added by Cherian Mathew almost 9 years ago

TaxonNavigator : added refresh of navigator on data change
TaxonNavigatorLabels : new interface with label strings used by taxon navigator handlers
RemotingChangeAcceptedTaxonToSynonymHandler : using TaxonNavigatorLabels
RemotingMoveFactualDataHandler : remoting version of move factual data handler
RemotingMoveFactualDataOperation : remoting version of move factual data operation
RemotingMoveTaxonHandler : remoting version of move taxon handler
RemotingMoveTaxonOperation : remoting version of move taxon operation
RemotingChangeAcceptedTaxonToSynonymOperation : replaced constructor input cdm entities to their uuids
RemotingCdmHandler : updated to handle other status severities and to handle warning status in post operation
RemotingCdmUpdateOperation : updated for warning status
TaxonNavigatorTest : added move taxon and move factual data tests

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingChangeAcceptedTaxonToSynonymOperation.java
9 9
*/
10 10
package eu.etaxonomy.taxeditor.navigation.navigator.operation;
11 11

  
12
import java.util.UUID;
13

  
12 14
import org.eclipse.core.runtime.IAdaptable;
13 15
import org.eclipse.core.runtime.IProgressMonitor;
14 16

  
......
16 18
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
17 19
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
18 20
import eu.etaxonomy.cdm.api.service.UpdateResult;
19
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
20
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
21 21
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
22 22

  
23 23

  
......
28 28
 */
29 29
public class RemotingChangeAcceptedTaxonToSynonymOperation extends RemotingCdmUpdateOperation {
30 30

  
31
    private final TaxonNode newAcceptedTaxonNode;
32
    private final ITaxonTreeNode oldTaxonNode;
31
    private final UUID oldTaxonNodeUuid;
32
    private final UUID newAcceptedTaxonNodeUuid;
33

  
33 34

  
34
    private final static String LABEL = "ChangeAcceptedTaxonToSynonymOperation";
35
    private final static String LABEL = "Change Accepted Taxon to Synonym operation";
35 36

  
36 37
    /**
37 38
     * @param label
38 39
     */
39 40
    public RemotingChangeAcceptedTaxonToSynonymOperation(Object source,
40 41
            boolean async,
41
            ITaxonTreeNode oldTaxonNode,
42
            TaxonNode newAcceptedTaxonNode) {
42
            UUID oldTaxonNodeUuid,
43
            UUID newAcceptedTaxonNodeUuid) {
43 44
        super(LABEL, Action.Update, source, async);
44
        this.oldTaxonNode = oldTaxonNode;
45
        this.newAcceptedTaxonNode = newAcceptedTaxonNode;
45
        this.oldTaxonNodeUuid = oldTaxonNodeUuid;
46
        this.newAcceptedTaxonNodeUuid = newAcceptedTaxonNodeUuid;
46 47
    }
47 48

  
48 49
    /* (non-Javadoc)
......
50 51
     */
51 52
    @Override
52 53
    protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
53
        return CdmApplicationState.getService(ITaxonNodeService.class).makeTaxonNodeASynonymOfAnotherTaxonNode(oldTaxonNode.getUuid(), newAcceptedTaxonNode.getUuid(), null, null, null);
54
        return CdmApplicationState.getService(ITaxonNodeService.class).makeTaxonNodeASynonymOfAnotherTaxonNode(oldTaxonNodeUuid,
55
                newAcceptedTaxonNodeUuid,
56
                null,
57
                null,
58
                null);
54 59
    }
55 60

  
56 61
}

Also available in: Unified diff