Project

General

Profile

Download (1.44 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
 * Copyright (C) 2011 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.editor.view.uses.e4.handler;
11

    
12
import eu.etaxonomy.cdm.model.description.DescriptionBase;
13
import eu.etaxonomy.cdm.model.description.Feature;
14
import eu.etaxonomy.taxeditor.editor.EditorUtil;
15
import eu.etaxonomy.taxeditor.editor.view.descriptive.e4.handler.CreateDescriptionElementHandlerE4;
16
import eu.etaxonomy.taxeditor.editor.view.uses.operation.CreateUseRecordOperation;
17
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
18
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
19
import eu.etaxonomy.taxeditor.store.UseObjectStore;
20

    
21
/**
22
 *
23
 * @author pplitzner
24
 * @since Sep 8, 2017
25
 *
26
 */
27
public class CreateUseRecordHandlerE4 extends CreateDescriptionElementHandlerE4 {
28

    
29
    @Override
30
	protected AbstractPostOperation operationCreationInstance(String label, Feature feature, DescriptionBase<?> description, IPostOperationEnabled postOperationEnabled) {
31
		//Use Record Feature retrieval below
32
		Feature useRecordFeature = UseObjectStore.getUseRecordFeature();
33
		useRecordFeature.setSupportsCategoricalData(true);
34
		return new CreateUseRecordOperation(label,
35
					EditorUtil.getUndoContext(),
36
					description, useRecordFeature, postOperationEnabled);
37
	}
38

    
39
}
(2-2/3)