Project

General

Profile

« Previous | Next » 

Revision d175d20f

Added by Cherian Mathew almost 9 years ago

added cdm entitysession enabled objects to operations

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteDescriptionElementOperation.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.taxeditor.model.MessagingUtils;
21 21
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
22 22
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
23
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
23 24

  
24 25
/**
25 26
 * <p>DeleteDescriptionElementOperation class.</p>
......
29 30
 * @version 1.0
30 31
 */
31 32
public class DeleteDescriptionElementOperation extends AbstractPostTaxonOperation {
32
	
33
	private DescriptionElementBase element;
33

  
34
	private final DescriptionElementBase element;
34 35
	private DescriptionBase description = null;
35 36

  
36 37
	/**
......
42 43
	 * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
43 44
	 */
44 45
	public DeleteDescriptionElementOperation(String label, IUndoContext undoContext,
45
			DescriptionElementBase element, IPostOperationEnabled postOperationEnabled) {
46
		super(label, undoContext, postOperationEnabled);
47
		
46
			DescriptionElementBase element, IPostOperationEnabled postOperationEnabled,
47
			ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
48
		super(label, undoContext, postOperationEnabled, cdmEntitySessionEnabled);
49

  
48 50
		this.element = element;
49 51
	}
50 52

  
......
55 57
	@Override
56 58
	public IStatus execute(IProgressMonitor monitor, IAdaptable info)
57 59
			throws ExecutionException {
58
		
60

  
59 61
		description = element.getInDescription();
60
		
62

  
61 63
		monitor.worked(20);
62
		
64

  
63 65
		// Remove element from description
64 66
		if (description == null) {
65 67
			MessagingUtils.error(this.getClass(), "Couldn't find element's description!", null);
......
91 93
			throws ExecutionException {
92 94

  
93 95
		description.addElement(element);
94
		
96

  
95 97
		return postExecute(element);
96 98
	}
97 99
}

Also available in: Unified diff