import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
-import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.operation.CdmDefaultOperation;
+import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
/**
* @author cmathew
* @date 21 Jul 2015
- *
*/
public class CreatePolytomousKeyNodeOperation extends CdmDefaultOperation {
+ private final static String LABEL = Messages.RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY;
+
private final PolytomousKeyNode parentNode;
private PolytomousKeyNode childNode;
- /**
- *
- */
- protected IPostOperationEnabled postOperationEnabled;
+ private IPostOperationEnabled postOperationEnabled;
public PolytomousKeyNode getChildNode() {
return childNode;
}
- private final static String LABEL = Messages.RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY;
-
public CreatePolytomousKeyNodeOperation(Object source,
boolean async,
PolytomousKeyNode parentNode, IPostOperationEnabled postOperationEnabled){
this.postOperationEnabled = postOperationEnabled;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.operation.RemotingCdmSimpleOperation#doSimpleExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
protected CdmBase doSimpleExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
- childNode = PolytomousKeyNode.NewInstance();
- parentNode.addChild(childNode);
- if (postOperationEnabled.postOperation(childNode)){
- return childNode;
- }else {
- return null;
- }
+ childNode = PolytomousKeyNode.NewInstance();
+ parentNode.addChild(childNode);
+ if (postOperationEnabled.postOperation(childNode)){
+ return childNode;
+ } else {
+ return null;
+ }
}
-
-
-
-
-
-
-}
+}
\ No newline at end of file