/**
*/
package org.eclipse.papyrus.bpmn.BPMNProfile.impl;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.emf.ecore.util.EObjectValidator;
import org.eclipse.papyrus.bpmn.BPMNProfile.BPMNProfilePackage;
import org.eclipse.papyrus.bpmn.BPMNProfile.ScriptTask;
import org.eclipse.papyrus.bpmn.BPMNProfile.util.BPMNProfileValidator;
import org.eclipse.uml2.uml.OpaqueAction;
/**
*
* An implementation of the model object 'Script Task'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.ScriptTaskImpl#getBase_OpaqueAction Base Opaque Action}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.ScriptTaskImpl#getScriptFormat Script Format}
* - {@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.ScriptTaskImpl#getScript Script}
*
*
* @generated
*/
public class ScriptTaskImpl extends TaskImpl implements ScriptTask {
/**
* The cached value of the '{@link #getBase_OpaqueAction() Base Opaque Action}' reference.
*
*
* @see #getBase_OpaqueAction()
* @generated
* @ordered
*/
protected OpaqueAction base_OpaqueAction;
/**
* The default value of the '{@link #getScriptFormat() Script Format}' attribute.
*
*
* @see #getScriptFormat()
* @generated
* @ordered
*/
protected static final String SCRIPT_FORMAT_EDEFAULT = null;
/**
* The cached value of the '{@link #getScriptFormat() Script Format}' attribute.
*
*
* @see #getScriptFormat()
* @generated
* @ordered
*/
protected String scriptFormat = SCRIPT_FORMAT_EDEFAULT;
/**
* The default value of the '{@link #getScript() Script}' attribute.
*
*
* @see #getScript()
* @generated
* @ordered
*/
protected static final String SCRIPT_EDEFAULT = null;
/**
* The cached value of the '{@link #getScript() Script}' attribute.
*
*
* @see #getScript()
* @generated
* @ordered
*/
protected String script = SCRIPT_EDEFAULT;
/**
*
*
* @generated
*/
protected ScriptTaskImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BPMNProfilePackage.eINSTANCE.getScriptTask();
}
/**
*
*
* @generated
*/
public OpaqueAction getBase_OpaqueAction() {
if (base_OpaqueAction != null && base_OpaqueAction.eIsProxy()) {
InternalEObject oldBase_OpaqueAction = (InternalEObject)base_OpaqueAction;
base_OpaqueAction = (OpaqueAction)eResolveProxy(oldBase_OpaqueAction);
if (base_OpaqueAction != oldBase_OpaqueAction) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.SCRIPT_TASK__BASE_OPAQUE_ACTION, oldBase_OpaqueAction, base_OpaqueAction));
}
}
return base_OpaqueAction;
}
/**
*
*
* @generated
*/
public OpaqueAction basicGetBase_OpaqueAction() {
return base_OpaqueAction;
}
/**
*
*
* @generated
*/
public void setBase_OpaqueAction(OpaqueAction newBase_OpaqueAction) {
OpaqueAction oldBase_OpaqueAction = base_OpaqueAction;
base_OpaqueAction = newBase_OpaqueAction;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.SCRIPT_TASK__BASE_OPAQUE_ACTION, oldBase_OpaqueAction, base_OpaqueAction));
}
/**
*
*
* @generated
*/
public String getScriptFormat() {
return scriptFormat;
}
/**
*
*
* @generated
*/
public void setScriptFormat(String newScriptFormat) {
String oldScriptFormat = scriptFormat;
scriptFormat = newScriptFormat;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.SCRIPT_TASK__SCRIPT_FORMAT, oldScriptFormat, scriptFormat));
}
/**
*
*
* @generated
*/
public String getScript() {
return script;
}
/**
*
*
* @generated
*/
public void setScript(String newScript) {
String oldScript = script;
script = newScript;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.SCRIPT_TASK__SCRIPT, oldScript, script));
}
/**
*
*
* @generated
*/
public boolean ScriptTaskscriptFormat(DiagnosticChain diagnostics, Map