Project

General

Profile

« Previous | Next » 

Revision 343457b6

Added by Patrick Plitzner about 9 years ago

  • extracted super class from AbstractPostOperation (same name)
    • created sub class AbstractPost Taxon/Describable Operation

View differences:

.gitattributes
1192 1192
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewUserWizard.java -text
1193 1193
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/PolytomousKeyWizardPage.java -text
1194 1194
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPersistentPostOperation.java -text
1195
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostDescribableOperation.java -text
1195 1196
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostOperation.java -text
1197
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostTaxonOperation.java -text
1196 1198
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/IPostOperationEnabled.java -text
1197 1199
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/MatchStrategyConfigurator.java -text
1198 1200
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java -text
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/derivedunit/operation/AddDerivedUnitFacadeMediaOperation.java
22 22
import eu.etaxonomy.cdm.model.description.SpecimenDescription;
23 23
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
24 24
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
25
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
25
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
26 26
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
27 27

  
28 28
/**
......
31 31
 * @version 1.0
32 32
 */
33 33
public class AddDerivedUnitFacadeMediaOperation extends
34
		AbstractPostOperation {
34
		AbstractPostTaxonOperation {
35 35

  
36 36
	public static final int DERIVED_UNIT_MEDIA = 0;
37 37
	public static final int FIELD_OBJECT_MEDIA = 1;
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/operation/SetMarkerFlagOperation.java
21 21
import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
22 22
import eu.etaxonomy.cdm.model.common.Marker;
23 23
import eu.etaxonomy.cdm.model.common.MarkerType;
24
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
24
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
25 25
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
26 26

  
27 27
/**
......
29 29
 * @created Dec 13, 2010
30 30
 * @version 1.0
31 31
 */
32
public class SetMarkerFlagOperation extends AbstractPostOperation {
32
public class SetMarkerFlagOperation extends AbstractPostTaxonOperation {
33 33

  
34 34
	private Set<IAnnotatableEntity> annotatableEntities;
35 35
	private MarkerType markerType;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/CreateNodeOperation.java
10 10
import org.eclipse.core.runtime.IStatus;
11 11

  
12 12
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
13
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
13
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
14 14
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
15 15

  
16 16
/**
17 17
 * @author n.hoffmann
18 18
 *
19 19
 */
20
public class CreateNodeOperation extends AbstractPostOperation {
20
public class CreateNodeOperation extends AbstractPostTaxonOperation {
21 21

  
22 22
	PolytomousKeyNode parentNode;
23 23
	private PolytomousKeyNode childNode;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/DeleteNodeOperation.java
13 13
import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
14 14
import eu.etaxonomy.cdm.api.service.ITaxonService;
15 15
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
16
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
16
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
17 17
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
18 18
import eu.etaxonomy.taxeditor.store.CdmStore;
19 19

  
......
21 21
 * @author n.hoffmann
22 22
 * 
23 23
 */
24
public class DeleteNodeOperation extends AbstractPostOperation {
24
public class DeleteNodeOperation extends AbstractPostTaxonOperation {
25 25

  
26 26
	private final PolytomousKeyNode parent;
27 27
	private final PolytomousKeyNode node;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/RefreshNodeNumberingOperation.java
7 7
import org.eclipse.core.runtime.IStatus;
8 8

  
9 9
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
10
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
10
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
11 11
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
12 12

  
13 13
/**
......
17 17
 * @author c.mathew
18 18
 *
19 19
 */
20
public class RefreshNodeNumberingOperation extends AbstractPostOperation {
20
public class RefreshNodeNumberingOperation extends AbstractPostTaxonOperation {
21 21

  
22 22
	PolytomousKeyNode node;
23 23
	private PolytomousKeyNode childNode;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptRelationshipTypeOperation.java
20 20
import eu.etaxonomy.cdm.model.taxon.Taxon;
21 21
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
22 22
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
24 24
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
25 25
import eu.etaxonomy.taxeditor.store.StoreUtil;
26 26

  
......
31 31
 * @created 03.02.2009
32 32
 * @version 1.0
33 33
 */
34
public class ChangeConceptRelationshipTypeOperation extends AbstractPostOperation {
34
public class ChangeConceptRelationshipTypeOperation extends AbstractPostTaxonOperation {
35 35
	
36 36
	private Taxon relatedTaxon;
37 37
	
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptToSynonymOperation.java
23 23
import eu.etaxonomy.cdm.model.taxon.Taxon;
24 24
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
25 25
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
26
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
26
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
27 27
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
28 28
import eu.etaxonomy.taxeditor.store.StoreUtil;
29 29

  
......
36 36
 * @version 1.0
37 37
 */
38 38
public class ChangeConceptToSynonymOperation extends
39
		AbstractPostOperation {
39
		AbstractPostTaxonOperation {
40 40
	
41 41
	private Taxon concept;
42 42

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicGroupOperation.java
20 20
import eu.etaxonomy.cdm.model.taxon.Synonym;
21 21
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
22 22
import eu.etaxonomy.cdm.model.taxon.Taxon;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
24 24
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
25 25

  
26 26
/**
......
30 30
 * @created 19.01.2009
31 31
 * @version 1.0
32 32
 */
33
public class ChangeHomotypicGroupOperation extends AbstractPostOperation {
33
public class ChangeHomotypicGroupOperation extends AbstractPostTaxonOperation {
34 34

  
35 35
	/**
36 36
	 * The synonym to be moved.
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicalGroupBasionymOperation.java
18 18
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
19 19
import eu.etaxonomy.cdm.model.taxon.Taxon;
20 20
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
22 22
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
23 23

  
24 24
/**
......
29 29
 * @version 1.0
30 30
 */
31 31
public class ChangeHomotypicalGroupBasionymOperation extends
32
		AbstractPostOperation {
32
		AbstractPostTaxonOperation {
33 33
	private TaxonBase taxonBase;
34 34

  
35 35
	/**
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToConceptOperation.java
19 19
import eu.etaxonomy.cdm.model.taxon.Synonym;
20 20
import eu.etaxonomy.cdm.model.taxon.Taxon;
21 21
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
23 23
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
24 24
import eu.etaxonomy.taxeditor.store.CdmStore;
25 25

  
......
31 31
 * @created 21.01.2009
32 32
 * @version 1.0
33 33
 */
34
public class ChangeSynonymToConceptOperation extends AbstractPostOperation {
34
public class ChangeSynonymToConceptOperation extends AbstractPostTaxonOperation {
35 35
	private Synonym synonym;
36 36
	private TaxonRelationshipType taxonRelationshipType;
37 37
	
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToHomotypicalGroupBasionymOperation.java
17 17

  
18 18
import eu.etaxonomy.cdm.model.taxon.Synonym;
19 19
import eu.etaxonomy.cdm.model.taxon.Taxon;
20
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
20
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
21 21

  
22 22
/**
23 23
 * <p>ChangeSynonymToHomotypicalGroupBasionymOperation class.</p>
......
27 27
 * @version 1.0
28 28
 * @deprecated there will be an operation to set the basionym only that automatically unsets the former basionym
29 29
 */
30
public class ChangeSynonymToHomotypicalGroupBasionymOperation extends AbstractPostOperation {
30
public class ChangeSynonymToHomotypicalGroupBasionymOperation extends AbstractPostTaxonOperation {
31 31
	
32 32
	private Synonym synonym;
33 33

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToMisapplicationOperation.java
23 23
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
24 24
import eu.etaxonomy.cdm.model.taxon.Taxon;
25 25
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
26
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
26
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
27 27
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
28 28
import eu.etaxonomy.taxeditor.store.CdmStore;
29 29

  
......
35 35
 * @created 14.01.2009
36 36
 * @version 1.0
37 37
 */
38
public class ChangeSynonymToMisapplicationOperation extends AbstractPostOperation {
38
public class ChangeSynonymToMisapplicationOperation extends AbstractPostTaxonOperation {
39 39

  
40 40
	private Synonym synonym;
41 41
	private Taxon misapplication;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateNameRelationOperation.java
19 19
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
20 20
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
21 21
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
23 23
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
24 24

  
25 25
/**
......
29 29
 * @created Mar 30, 2010
30 30
 * @version 1.0
31 31
 */
32
public class CreateNameRelationOperation extends AbstractPostOperation {
32
public class CreateNameRelationOperation extends AbstractPostTaxonOperation {
33 33

  
34 34
	private TaxonBase taxonBase;
35 35
	private TaxonNameBase relatedName;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInExistingHomotypicalGroupOperation.java
19 19
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
20 20
import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
21 21
import eu.etaxonomy.cdm.model.taxon.Taxon;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
23 23
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
24 24

  
25 25
/**
......
30 30
 * @version 1.0
31 31
 */
32 32
public class CreateSynonymInExistingHomotypicalGroupOperation extends
33
		AbstractPostOperation {
33
		AbstractPostTaxonOperation {
34 34

  
35 35
	private HomotypicalGroup group;
36 36
	private TaxonNameBase newSynonymName;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInNewGroupOperation.java
19 19
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
20 20
import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
21 21
import eu.etaxonomy.cdm.model.taxon.Taxon;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
23 23
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
24 24

  
25 25
/**
......
34 34
 * @created 16.01.2009
35 35
 * @version 1.0
36 36
 */
37
public class CreateSynonymInNewGroupOperation extends AbstractPostOperation {
37
public class CreateSynonymInNewGroupOperation extends AbstractPostTaxonOperation {
38 38
	
39 39
	// TODO replace this with TaxonNameBase
40 40
	private TaxonNameBase newSynonymName;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperation.java
19 19
import eu.etaxonomy.cdm.model.taxon.Taxon;
20 20
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
21 21
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
23 23
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
24 24

  
25 25
/**
......
29 29
 * @created 16.01.2009
30 30
 * @version 1.0
31 31
 */
32
public class DeleteMisapplicationOperation extends AbstractPostOperation {
32
public class DeleteMisapplicationOperation extends AbstractPostTaxonOperation {
33 33
	
34 34
	private Taxon misapplication;
35 35

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteNameRelationOperation.java
18 18

  
19 19
import eu.etaxonomy.cdm.model.name.NameRelationship;
20 20
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
22 22
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
23 23

  
24 24
/**
......
28 28
 * @created Mar 30, 2010
29 29
 * @version 1.0
30 30
 */
31
public class DeleteNameRelationOperation extends AbstractPostOperation {
31
public class DeleteNameRelationOperation extends AbstractPostTaxonOperation {
32 32

  
33 33
	private NameRelationship nameRelationship;
34 34

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
22 22
import eu.etaxonomy.cdm.model.taxon.Synonym;
23 23
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
24 24
import eu.etaxonomy.cdm.model.taxon.Taxon;
25
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
25
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
26 26
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
27 27
import eu.etaxonomy.taxeditor.store.CdmStore;
28 28

  
......
33 33
 * @created 14.01.2009
34 34
 * @version 1.0
35 35
 */
36
public class DeleteSynonymOperation extends AbstractPostOperation {
36
public class DeleteSynonymOperation extends AbstractPostTaxonOperation {
37 37
	
38 38
	private Synonym synonym;
39 39
	private Set<SynonymRelationshipType> synonymTypes;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteTaxonOperation.java
29 29
import eu.etaxonomy.cdm.model.taxon.Taxon;
30 30
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
31 31
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
32
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
32
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
33 33
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
34 34
import eu.etaxonomy.taxeditor.store.CdmStore;
35 35

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/RemoveHomotypicalGroupBasionymOperation.java
18 18
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
19 19
import eu.etaxonomy.cdm.model.taxon.Taxon;
20 20
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
22 22
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
23 23

  
24 24
/**
......
29 29
 * @version 1.0
30 30
 */
31 31
public class RemoveHomotypicalGroupBasionymOperation extends
32
		AbstractPostOperation {
32
		AbstractPostTaxonOperation {
33 33

  
34 34
	private TaxonBase taxonBase;
35 35

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperation.java
23 23
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
24 24
import eu.etaxonomy.cdm.model.taxon.Taxon;
25 25
import eu.etaxonomy.taxeditor.editor.EditorUtil;
26
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
26
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
27 27
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
28 28
import eu.etaxonomy.taxeditor.store.CdmStore;
29 29
import eu.etaxonomy.taxeditor.store.StoreUtil;
......
35 35
 * @created 23.04.2009
36 36
 * @version 1.0
37 37
 */
38
public class SwapSynonymAndAcceptedOperation extends AbstractPostOperation {
38
public class SwapSynonymAndAcceptedOperation extends AbstractPostTaxonOperation {
39 39
	
40 40
	private Synonym synonym;
41 41
	// TODO store the old relationship for undo reasons
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/operation/CreateConceptRelationOperation.java
18 18
import eu.etaxonomy.cdm.model.taxon.Taxon;
19 19
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
20 20
import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
22 22
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
23 23

  
24 24
/**
......
29 29
 * @created 26.01.2009
30 30
 * @version 1.0
31 31
 */
32
public class CreateConceptRelationOperation extends AbstractPostOperation {
32
public class CreateConceptRelationOperation extends AbstractPostTaxonOperation {
33 33
	
34 34
	private Taxon concept;
35 35
	private TaxonRelationshipTypeInverseContainer taxonRelationshipTypeInverseContainer;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/operation/DeleteConceptRelationOperation.java
19 19

  
20 20
import eu.etaxonomy.cdm.model.taxon.Taxon;
21 21
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
23 23
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
24 24

  
25 25
/**
......
30 30
 * @created 29.01.2009
31 31
 * @version 1.0
32 32
 */
33
public class DeleteConceptRelationOperation extends AbstractPostOperation {
33
public class DeleteConceptRelationOperation extends AbstractPostTaxonOperation {
34 34
	
35 35
	private Set<TaxonRelationship> taxonRelationships;	
36 36

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/CreateDescriptionHandler.java
69 69
		// specimen description
70 70
		else{
71 71
		    //FIXME: no undo and redo supported. Should also use postOperation
72
		    ISelection selection = editor.getSite().getSelectionProvider().getSelection();
72
		    ISelection selection = HandlerUtil.getCurrentSelection(event);
73 73
		    if(selection instanceof IStructuredSelection){
74 74
		        Object selectedElement = ((IStructuredSelection) selection).getFirstElement();
75 75
		        if(selectedElement instanceof SpecimenOrObservationBase<?>){
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/DeleteHandler.java
32 32
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteTaxonDescriptionOperation;
33 33
import eu.etaxonomy.taxeditor.editor.view.media.operation.DeleteMediaOperation;
34 34
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
35
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
35 36
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
36 37
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
37 38

  
......
59 60
		
60 61
			IUndoContext undoContext = EditorUtil.getUndoContext();
61 62
			
62
			List<AbstractPostOperation> operations = new ArrayList<AbstractPostOperation>();
63
			List<AbstractPostTaxonOperation> operations = new ArrayList<AbstractPostTaxonOperation>();
63 64
			
64 65
			for(Object object : selection.toArray()){
65 66
				
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/CreateDescriptionElementOperation.java
26 26
import eu.etaxonomy.cdm.model.description.TaxonInteraction;
27 27
import eu.etaxonomy.cdm.model.description.TextData;
28 28
import eu.etaxonomy.cdm.model.taxon.Taxon;
29
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
29
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
30 30
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
31 31

  
32 32
/**
......
37 37
 * @created 05.02.2009
38 38
 * @version 1.0
39 39
 */
40
public class CreateDescriptionElementOperation extends AbstractPostOperation {
40
public class CreateDescriptionElementOperation extends AbstractPostTaxonOperation {
41 41

  
42 42
	/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.descripti"{trunked}</code> */
43 43
	public static final String ID = "eu.etaxonomy.taxeditor.editor.description.createDescriptionElement";
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/CreateTaxonDescriptionOperation.java
1 1
/**
2 2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
3
* European Distributed Institute of Taxonomy
4 4
* http://www.e-taxonomy.eu
5
* 
5
*
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
......
20 20
import eu.etaxonomy.cdm.model.description.TextData;
21 21
import eu.etaxonomy.cdm.model.media.Media;
22 22
import eu.etaxonomy.cdm.model.taxon.Taxon;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostDescribableOperation;
24 24
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
25 25

  
26 26
/**
......
31 31
 * @created 05.02.2009
32 32
 * @version 1.0
33 33
 */
34
public class CreateTaxonDescriptionOperation extends AbstractPostOperation {
35
	
34
public class CreateTaxonDescriptionOperation extends AbstractPostDescribableOperation{
35

  
36 36
	private TaxonDescription description;
37 37
	private boolean isImageGallery;
38 38

  
......
61 61
	public CreateTaxonDescriptionOperation(String label, IUndoContext undoContext,
62 62
			Taxon taxon, IPostOperationEnabled postOperationEnabled, boolean isImageGallery) {
63 63
		super(label, undoContext, taxon, postOperationEnabled);
64
		
64

  
65 65
		this.isImageGallery  = isImageGallery;
66 66
	}
67
	
67

  
68 68
	/* (non-Javadoc)
69 69
	 * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
70 70
	 */
......
72 72
	@Override
73 73
	public IStatus execute(IProgressMonitor monitor, IAdaptable info)
74 74
			throws ExecutionException {
75
		
75

  
76 76
		description = TaxonDescription.NewInstance(taxon);
77 77
		monitor.worked(20);
78 78

  
......
95 95
	@Override
96 96
	public IStatus redo(IProgressMonitor monitor, IAdaptable info)
97 97
			throws ExecutionException {
98
		
99
		taxon.addDescription(description);
100
		
98

  
99
		describable.addDescription(description);
100

  
101 101
		return postExecute(description);
102 102
	}
103 103

  
......
109 109
	public IStatus undo(IProgressMonitor monitor, IAdaptable info)
110 110
			throws ExecutionException {
111 111

  
112
		taxon.removeDescription(description);
113
		
112
		describable.removeDescription(description);
113

  
114 114
		return postExecute(null);
115 115
	}
116 116
}
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteDescriptionElementOperation.java
17 17

  
18 18
import eu.etaxonomy.cdm.model.description.DescriptionBase;
19 19
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
20
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
20
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
21 21
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
22 22
import eu.etaxonomy.taxeditor.store.StoreUtil;
23 23

  
......
28 28
 * @created 05.02.2009
29 29
 * @version 1.0
30 30
 */
31
public class DeleteDescriptionElementOperation extends AbstractPostOperation {
31
public class DeleteDescriptionElementOperation extends AbstractPostTaxonOperation {
32 32
	
33 33
	private DescriptionElementBase element;
34 34
	private DescriptionBase description = null;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteTaxonDescriptionOperation.java
16 16
import org.eclipse.core.runtime.IStatus;
17 17

  
18 18
import eu.etaxonomy.cdm.model.description.TaxonDescription;
19
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
19
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
20 20
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
21 21

  
22 22
/**
......
27 27
 * @created 05.02.2009
28 28
 * @version 1.0
29 29
 */
30
public class DeleteTaxonDescriptionOperation extends AbstractPostOperation {
30
public class DeleteTaxonDescriptionOperation extends AbstractPostTaxonOperation {
31 31
	
32 32
	private TaxonDescription description;
33 33

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/MoveDescriptionElementsOperation.java
21 21
import eu.etaxonomy.cdm.api.service.IDescriptionService;
22 22
import eu.etaxonomy.cdm.model.description.DescriptionBase;
23 23
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
24
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
24
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
25 25
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
26 26
import eu.etaxonomy.taxeditor.store.CdmStore;
27 27

  
......
30 30
 * @created Feb 8, 2011
31 31
 * @version 1.0
32 32
 */
33
public class MoveDescriptionElementsOperation extends AbstractPostOperation {
33
public class MoveDescriptionElementsOperation extends AbstractPostTaxonOperation {
34 34

  
35 35
	private Collection<DescriptionElementBase> descriptionElements;
36 36
	private DescriptionBase targetDescription;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/AddMediaToImageGalleryOperation.java
18 18
import eu.etaxonomy.cdm.api.utility.ImagesUtility;
19 19
import eu.etaxonomy.cdm.model.description.DescriptionBase;
20 20
import eu.etaxonomy.cdm.model.media.Media;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
22 22
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
23 23
/**
24 24
 * <p>AddMediaToImageGalleryOperation class.</p>
......
28 28
 * @created 05.02.2009
29 29
 * @version 1.0
30 30
 */
31
public class AddMediaToImageGalleryOperation extends AbstractPostOperation {
31
public class AddMediaToImageGalleryOperation extends AbstractPostTaxonOperation {
32 32
	
33 33
	private DescriptionBase description;
34 34
	private Media media;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/CreateImageOperation.java
20 20
import eu.etaxonomy.cdm.model.description.DescriptionBase;
21 21
import eu.etaxonomy.cdm.model.media.ImageFile;
22 22
import eu.etaxonomy.cdm.model.taxon.Taxon;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
24 24
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
25 25

  
26 26
/**
......
30 30
 * @created 31.03.2009
31 31
 * @version 1.0
32 32
 */
33
public class CreateImageOperation extends AbstractPostOperation {
33
public class CreateImageOperation extends AbstractPostTaxonOperation {
34 34
	
35 35
	private ImageFile imageFile;
36 36

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/DeleteMediaOperation.java
19 19
import eu.etaxonomy.cdm.api.utility.ImagesUtility;
20 20
import eu.etaxonomy.cdm.model.description.DescriptionBase;
21 21
import eu.etaxonomy.cdm.model.media.Media;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
23 23
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
24 24

  
25 25
/**
......
30 30
 * @version 1.0
31 31
 */
32 32
@Deprecated // I don't think this is really used anymore
33
public class DeleteMediaOperation extends AbstractPostOperation {
33
public class DeleteMediaOperation extends AbstractPostTaxonOperation {
34 34
	
35 35
	private Media media;
36 36

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/MoveMediaInListOperation.java
23 23
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
24 24
import eu.etaxonomy.cdm.model.media.Media;
25 25
import eu.etaxonomy.cdm.model.taxon.Taxon;
26
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
26
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
27 27
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
28 28
import eu.etaxonomy.taxeditor.store.StoreUtil;
29 29

  
......
34 34
 * @created 05.02.2009
35 35
 * @version 1.0
36 36
 */
37
public class MoveMediaInListOperation extends AbstractPostOperation {
37
public class MoveMediaInListOperation extends AbstractPostTaxonOperation {
38 38
	
39 39
	/** Constant <code>UP=1</code> */
40 40
	public static final int UP = 1;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/operation/RemoveImageFromDescriptionElementOperation.java
19 19
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
20 20
import eu.etaxonomy.cdm.model.media.ImageFile;
21 21
import eu.etaxonomy.cdm.model.taxon.Taxon;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
23 23
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
24 24

  
25 25
/**
......
30 30
 * @created 05.02.2009
31 31
 * @version 1.0
32 32
 */
33
public class RemoveImageFromDescriptionElementOperation extends AbstractPostOperation {
33
public class RemoveImageFromDescriptionElementOperation extends AbstractPostTaxonOperation {
34 34
	
35 35
	private DescriptionElementBase element;
36 36
	private ImageFile image;
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseRecordOperation.java
21 21
import eu.etaxonomy.cdm.model.description.TaxonDescription;
22 22
import eu.etaxonomy.cdm.model.description.TextData;
23 23
import eu.etaxonomy.cdm.model.taxon.Taxon;
24
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
24
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
25 25
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
26 26

  
27 27

  
......
31 31
 * @created mar 13, 2012
32 32
 * @version 1.0
33 33
 */
34
public class CreateUseRecordOperation extends AbstractPostOperation {
34
public class CreateUseRecordOperation extends AbstractPostTaxonOperation {
35 35

  
36 36
	/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.use."{trunked}</code> */
37 37
	public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/operation/CreateUseSummaryOperation.java
20 20
import eu.etaxonomy.cdm.model.description.TaxonDescription;
21 21
import eu.etaxonomy.cdm.model.description.TextData;
22 22
import eu.etaxonomy.cdm.model.taxon.Taxon;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
24 24
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
25 25

  
26 26

  
......
30 30
 * @created mar 13, 2012
31 31
 * @version 1.0
32 32
 */
33
public class CreateUseSummaryOperation extends AbstractPostOperation {
33
public class CreateUseSummaryOperation extends AbstractPostTaxonOperation {
34 34

  
35 35
	public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";
36 36

  
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptToSynonymOperationTest.java
102 102
	}
103 103

  
104 104
	/**
105
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation#postExecute(ICdmBase)}.
105
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
106 106
	 */
107 107
	@Test
108 108
	public void testPostExecute() {
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicGroupOperationTest.java
101 101
	}
102 102

  
103 103
	/**
104
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation#postExecute(ICdmBase)}.
104
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
105 105
	 */
106 106
	@Test
107 107
	public void testPostExecute() {
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicalGroupBasionymOperationTest.java
84 84
	}
85 85

  
86 86
	/**
87
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation#postExecute(ICdmBase)}.
87
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
88 88
	 */
89 89
	@Test
90 90
	public void testPostExecute() {
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToConceptOperationTest.java
98 98
	}
99 99

  
100 100
	/**
101
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation#postExecute(ICdmBase)}.
101
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
102 102
	 */
103 103
	@Test
104 104
	public void testPostExecute() {
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToMisapplicationOperationTest.java
96 96
	}
97 97

  
98 98
	/**
99
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation#postExecute(ICdmBase)}.
99
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
100 100
	 */
101 101
	@Test
102 102
	public void testPostExecute() {
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateConceptRelationOperationTest.java
85 85
	}
86 86

  
87 87
	/**
88
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation#postExecute(ICdmBase)}.
88
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
89 89
	 */
90 90
	@Test
91 91
	public void testPostExecute() {
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteConceptRelationOperationTest.java
85 85
	}
86 86

  
87 87
	/**
88
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation#postExecute(ICdmBase)}.
88
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
89 89
	 */
90 90
	@Test
91 91
	public void testPostExecute() {
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperationTest.java
82 82
	}
83 83

  
84 84
	/**
85
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation#postExecute(ICdmBase)}.
85
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
86 86
	 */
87 87
	@Test
88 88
	public void testPostExecute() {
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperationTest.java
183 183
	}
184 184

  
185 185
	/**
186
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation#postExecute(ICdmBase)}.
186
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
187 187
	 */
188 188
	@Test
189 189
	public void testPostExecute() {
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RefreshNodesOperation.java
14 14
import eu.etaxonomy.cdm.api.service.ITermService;
15 15
import eu.etaxonomy.cdm.model.description.PolytomousKey;
16 16
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
17
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
17
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
18 18
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
19 19
import eu.etaxonomy.taxeditor.store.CdmStore;
20 20

  
......
27 27
 * @version 1.0
28 28
 *
29 29
 */
30
public class RefreshNodesOperation extends AbstractPostOperation {
30
public class RefreshNodesOperation extends AbstractPostTaxonOperation {
31 31

  
32 32
	PolytomousKey key;	
33 33
	
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/CopyOperation.java
19 19
import org.eclipse.swt.dnd.Transfer;
20 20

  
21 21
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
22
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
23 23
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
24 24

  
25 25

  
......
28 28
 * @date 23 Jan 2012
29 29
 *
30 30
 */
31
public class CopyOperation extends AbstractPostOperation {
31
public class CopyOperation extends AbstractPostTaxonOperation {
32 32

  
33 33
	/**
34 34
	 * @param label
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateDefinedTermOperation.java
20 20
import eu.etaxonomy.cdm.model.common.TermBase;
21 21
import eu.etaxonomy.cdm.model.common.TermVocabulary;
22 22
import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
23
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
24 24
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
25 25
import eu.etaxonomy.taxeditor.store.StoreUtil;
26 26

  
......
29 29
 * @date 21 Dec 2011
30 30
 *
31 31
 */
32
public class CreateDefinedTermOperation extends AbstractPostOperation {
32
public class CreateDefinedTermOperation extends AbstractPostTaxonOperation {
33 33

  
34 34
	
35 35

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java
18 18
import eu.etaxonomy.cdm.api.service.IVocabularyService;
19 19
import eu.etaxonomy.cdm.model.common.TermVocabulary;
20 20
import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
21
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
22 22
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
23 23
import eu.etaxonomy.taxeditor.store.CdmStore;
24 24

  
......
27 27
 * @date 21 Dec 2011
28 28
 *
29 29
 */
30
public class CreateTermVocabularyOperation extends AbstractPostOperation {
30
public class CreateTermVocabularyOperation extends AbstractPostTaxonOperation {
31 31

  
32 32
	private TermEditorInput definedEditorInput;
33 33
	
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/DeleteTermBaseOperation.java
25 25
import eu.etaxonomy.cdm.model.common.TermVocabulary;
26 26
import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor;
27 27
import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;
28
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
28
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
29 29
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
30 30
import eu.etaxonomy.taxeditor.store.CdmStore;
31 31
import eu.etaxonomy.taxeditor.store.StoreUtil;
......
35 35
 * @date 22 Dec 2011
36 36
 *
37 37
 */
38
public class DeleteTermBaseOperation extends AbstractPostOperation {
38
public class DeleteTermBaseOperation extends AbstractPostTaxonOperation {
39 39

  
40 40
	private TermEditorInput definedEditorInput;
41 41
	private TermBase termBase;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/MoveDefinedTermOperation.java
21 21
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
22 22
import eu.etaxonomy.cdm.model.common.TermBase;
23 23
import eu.etaxonomy.cdm.model.common.TermVocabulary;
24
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
24
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
25 25
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
26 26
import eu.etaxonomy.taxeditor.store.StoreUtil;
27 27

  
......
30 30
 * @date 10 Jan 2012
31 31
 *
32 32
 */
33
public class MoveDefinedTermOperation extends AbstractPostOperation {
33
public class MoveDefinedTermOperation extends AbstractPostTaxonOperation {
34 34
	
35 35
	private Collection<DefinedTermBase> sourceTerms;// the actual DefinedTermBase(s) we are moving
36 36
	private TermBase targetTermOrVocabulary;// the target VOCABULARY or DefinedTerm we are moving these to
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
452 452
	 *
453 453
	 * @param operation
454 454
	 *            a
455
	 *            {@link eu.etaxonomy.taxeditor.operation.AbstractPostOperation}
455
	 *            {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation}
456 456
	 *            object.
457 457
	 * @return a {@link org.eclipse.core.runtime.IStatus} object.
458 458
	 */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPersistentPostOperation.java
30 30
 * @created 08.05.2009
31 31
 * @version 1.0
32 32
 */
33
public abstract class AbstractPersistentPostOperation extends AbstractPostOperation {
33
public abstract class AbstractPersistentPostOperation extends AbstractPostTaxonOperation {
34 34
	private IConversationEnabled conversationEnabled;
35 35

  
36 36
	protected ITaxonTreeNode parentNode;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostDescribableOperation.java
1
// $Id$
2
/**
3
* Copyright (C) 2013 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
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.
9
*/
10
package eu.etaxonomy.taxeditor.operation;
11

  
12
import eu.etaxonomy.cdm.model.description.IDescribable;
13

  
14
/**
15
 * @author pplitzner
16
 * @date 03.12.2013
17
 *
18
 */
19
public abstract class AbstractPostDescribableOperation extends AbstractPostOperation {
20

  
21
    protected IDescribable describable;
22

  
23
    /**
24
     * @param label
25
     */
26
    public AbstractPostDescribableOperation(String label) {
27
        super(label);
28
    }
29

  
30
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostOperation.java
1
// $Id$
1 2
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

  
3
 * Copyright (C) 2013 EDIT
4
 * European Distributed Institute of Taxonomy
5
 * http://www.e-taxonomy.eu
6
 *
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.
9
 */
10 10
package eu.etaxonomy.taxeditor.operation;
11 11

  
12
import java.util.UUID;
13

  
14 12
import org.eclipse.core.commands.operations.AbstractOperation;
15
import org.eclipse.core.commands.operations.IUndoContext;
16 13
import org.eclipse.core.runtime.IStatus;
17 14
import org.eclipse.core.runtime.Status;
18 15

  
19 16
import eu.etaxonomy.cdm.model.common.CdmBase;
20
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
21
import eu.etaxonomy.cdm.model.taxon.Taxon;
22
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
23 17

  
24 18
/**
25
 * <p>Abstract AbstractPostOperation class.</p>
19
 * @author pplitzner
20
 * @date 03.12.2013
26 21
 *
27
 * @author p.ciardelli
28
 * @author n.hoffmann
29
 * @created 14.01.2009
30
 * @version 1.0
31 22
 */
32 23
public abstract class AbstractPostOperation extends AbstractOperation {
33
	
34
	/**
35
	 * 
36
	 */
37
	protected IPostOperationEnabled postOperationEnabled;
38
	
39
	/** 
40
	 * A reference to the taxon the concrete operation is working on 
41
	 */
42
	protected Taxon taxon;
43

  
44
	/**
45
	 * A reference to the taxons TaxonNode
46
	 */
47
	protected ITaxonTreeNode taxonNode;
48

  
49
	protected UUID parentNodeUuid;
50

  
51
	/**
52
	 * <p>Constructor for AbstractPostOperation.</p>
53
	 *
54
	 * @param label a {@link java.lang.String} object.
55
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
56
	 */
57
	protected AbstractPostOperation(String label, IUndoContext undoContext) {
58
		super(label);
59
		addContext(undoContext);
60
	}
61
	
62
	/**
63
	 * <p>Constructor for AbstractPostOperation.</p>
64
	 *
65
	 * @param label a {@link java.lang.String} object.
66
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
67
	 * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
68
	 */
69
	public AbstractPostOperation(String label, IUndoContext undoContext,
70
			Taxon taxon) {
71
		this(label, undoContext);
72
		
73
		this.taxon = taxon;
74
	}
75
	
76
	/**
77
	 * <p>Constructor for AbstractPostOperation.</p>
78
	 *
79
	 * @param label a {@link java.lang.String} object.
80
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
81
	 * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
82
	 * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
83
	 */
84
	public AbstractPostOperation(String label, IUndoContext undoContext,
85
			Taxon taxon, IPostOperationEnabled postOperationEnabled) {
86
		this(label, undoContext, taxon);
87
		this.postOperationEnabled = postOperationEnabled;
88
	}
89
	
90
	/**
91
	 * <p>Constructor for AbstractPostOperation.</p>
92
	 *
93
	 * @param label a {@link java.lang.String} object.
94
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
95
	 * @param taxonNode a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
96
	 * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
97
	 */
98
	public AbstractPostOperation(String label, IUndoContext undoContext, TaxonNode taxonNode, IPostOperationEnabled postOperationEnabled){
99
		this(label, undoContext, taxonNode.getTaxon(), postOperationEnabled);
100
		this.taxonNode = taxonNode;
101
	}
102
	
103
	/**
104
	 * <p>Constructor for AbstractPostOperation.</p>
105
	 *
106
	 * @param label a {@link java.lang.String} object.
107
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
108
	 * @param parentNodeUuid a {@link java.util.UUID} object.
109
	 * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
110
	 */
111
	public AbstractPostOperation(String label, IUndoContext undoContext, UUID parentNodeUuid, IPostOperationEnabled postOperationEnabled){
112
		this(label, undoContext);
113
		
114
		this.parentNodeUuid = parentNodeUuid;
115
		this.postOperationEnabled = postOperationEnabled;
116
	}
117
	
118
	/**
119
	 * <p>Constructor for AbstractPostOperation.</p>
120
	 *
121
	 * @param label a {@link java.lang.String} object.
122
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
123
	 * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
124
	 */
125
	public AbstractPostOperation(String label, IUndoContext undoContext,
126
			IPostOperationEnabled postOperationEnabled) {
127
		this(label, undoContext);
128
		this.postOperationEnabled = postOperationEnabled;
129
	}
130 24

  
131
	/**
132
	 * This method will try to call the post operation on a possibly registered
133
	 * IPostOperationEnabled implementor. Objects that were affected by the operation
134
	 * may be passed to the registered IPostOperationEnabled implementor.
135
	 *
136
	 * @param objectAffectedByOperation the affected object. Should be <code>null</code> if not needed
137
	 * @return a {@link org.eclipse.core.runtime.IStatus} object.
138
	 */
139
	protected IStatus postExecute(CdmBase objectAffectedByOperation) {	
140
		if(postOperationEnabled != null){
141
			return postOperationEnabled.postOperation(objectAffectedByOperation) ? Status.OK_STATUS : Status.CANCEL_STATUS;
142
		}
143
		return Status.OK_STATUS;
144
	}
145
	
146
	/**
147
	 * <p>Getter for the field <code>postOperationEnabled</code>.</p>
148
	 *
149
	 * @return a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
150
	 */
151
	public IPostOperationEnabled getPostOperationEnabled() {
152
		return postOperationEnabled;
153
	}
154
	
155
	
156
}
25
    /**
26
     * 
27
     */
28
    protected IPostOperationEnabled postOperationEnabled;
29

  
30
    /**
31
     * @param label
32
     */
33
    public AbstractPostOperation(String label) {
34
        super(label);
35
    }
36

  
37
    /**
38
     * This method will try to call the post operation on a possibly registered
39
     * IPostOperationEnabled implementor. Objects that were affected by the operation
40
     * may be passed to the registered IPostOperationEnabled implementor.
41
     *
42
     * @param objectAffectedByOperation the affected object. Should be <code>null</code> if not needed
43
     * @return a {@link org.eclipse.core.runtime.IStatus} object.
44
     */
45
    protected IStatus postExecute(CdmBase objectAffectedByOperation) {	
46
    	if(postOperationEnabled != null){
47
    		return postOperationEnabled.postOperation(objectAffectedByOperation) ? Status.OK_STATUS : Status.CANCEL_STATUS;
48
    	}
49
    	return Status.OK_STATUS;
50
    }
51

  
52
    /**
53
     * <p>Getter for the field <code>postOperationEnabled</code>.</p>
54
     *
55
     * @return a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
56
     */
57
    public IPostOperationEnabled getPostOperationEnabled() {
58
    	return postOperationEnabled;
59
    }
60

  
61
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostTaxonOperation.java
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

  
10
package eu.etaxonomy.taxeditor.operation;
11

  
12
import java.util.UUID;
13

  
14
import org.eclipse.core.commands.operations.IUndoContext;
15

  
16
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
17
import eu.etaxonomy.cdm.model.taxon.Taxon;
18
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
19

  
20
/**
21
 * <p>Abstract AbstractPostOperation class.</p>
22
 *
23
 * @author p.ciardelli
24
 * @author n.hoffmann
25
 * @created 14.01.2009
26
 * @version 1.0
27
 */
28
public abstract class AbstractPostTaxonOperation extends AbstractPostOperation {
29
	
30
	/** 
31
	 * A reference to the taxon the concrete operation is working on 
32
	 */
33
	protected Taxon taxon;
34

  
35
	/**
36
	 * A reference to the taxons TaxonNode
37
	 */
38
	protected ITaxonTreeNode taxonNode;
39

  
40
	protected UUID parentNodeUuid;
41

  
42
	/**
43
	 * <p>Constructor for AbstractPostOperation.</p>
44
	 *
45
	 * @param label a {@link java.lang.String} object.
46
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
47
	 */
48
	protected AbstractPostTaxonOperation(String label, IUndoContext undoContext) {
49
		super(label);
50
		addContext(undoContext);
51
	}
52
	
53
	/**
54
	 * <p>Constructor for AbstractPostOperation.</p>
55
	 *
56
	 * @param label a {@link java.lang.String} object.
57
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
58
	 * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
59
	 */
60
	public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
61
			Taxon taxon) {
62
		this(label, undoContext);
63
		
64
		this.taxon = taxon;
65
	}
66
	
67
	/**
68
	 * <p>Constructor for AbstractPostOperation.</p>
69
	 *
70
	 * @param label a {@link java.lang.String} object.
71
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
72
	 * @param taxon a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
73
	 * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
74
	 */
75
	public AbstractPostTaxonOperation(String label, IUndoContext undoContext,
76
			Taxon taxon, IPostOperationEnabled postOperationEnabled) {
77
		this(label, undoContext, taxon);
78
		this.postOperationEnabled = postOperationEnabled;
79
	}
80
	
81
	/**
82
	 * <p>Constructor for AbstractPostOperation.</p>
83
	 *
84
	 * @param label a {@link java.lang.String} object.
85
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
86
	 * @param taxonNode a {@link eu.etaxonomy.cdm.model.taxon.TaxonNode} object.
87
	 * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
88
	 */
89
	public AbstractPostTaxonOperation(String label, IUndoContext undoContext, TaxonNode taxonNode, IPostOperationEnabled postOperationEnabled){
90
		this(label, undoContext, taxonNode.getTaxon(), postOperationEnabled);
91
		this.taxonNode = taxonNode;
92
	}
93
	
94
	/**
95
	 * <p>Constructor for AbstractPostOperation.</p>
96
	 *
97
	 * @param label a {@link java.lang.String} object.
98
	 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
99
	 * @param parentNodeUuid a {@link java.util.UUID} object.
100
	 * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
101
	 */
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff