org.eclipse.bpmn2.impl.ScriptTaskImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Kie Workbench - Common - Stunner - BPMN Definition Set - GWT Support for Eclipse EMF/XMI
/**
*
*
* Copyright (c) 2010 SAP AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation
*
*
*/
package org.eclipse.bpmn2.impl;
import com.google.gwt.user.client.rpc.GwtTransient;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.ScriptTask;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Script Task'.
*
*
* The following features are implemented:
*
*
* - {@link org.eclipse.bpmn2.impl.ScriptTaskImpl#getScript Script}
* - {@link org.eclipse.bpmn2.impl.ScriptTaskImpl#getScriptFormat Script Format}
*
*
* @generated
*/
public class ScriptTaskImpl extends TaskImpl implements ScriptTask {
/**
* 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
*/
@GwtTransient
protected String script = SCRIPT_EDEFAULT;
/**
* 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
*/
@GwtTransient
protected String scriptFormat = SCRIPT_FORMAT_EDEFAULT;
/**
*
*
* @generated
*/
protected ScriptTaskImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Bpmn2Package.Literals.SCRIPT_TASK;
}
/**
*
*
* @generated
*/
@Override
public String getScript() {
return script;
}
/**
*
*
* @generated
*/
@Override
public void setScript(String newScript) {
String oldScript = script;
script = newScript;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.SCRIPT_TASK__SCRIPT, oldScript, script));
}
/**
*
*
* @generated
*/
@Override
public String getScriptFormat() {
return scriptFormat;
}
/**
*
*
* @generated
*/
@Override
public void setScriptFormat(String newScriptFormat) {
String oldScriptFormat = scriptFormat;
scriptFormat = newScriptFormat;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.SCRIPT_TASK__SCRIPT_FORMAT,
oldScriptFormat, scriptFormat));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Bpmn2Package.SCRIPT_TASK__SCRIPT:
return getScript();
case Bpmn2Package.SCRIPT_TASK__SCRIPT_FORMAT:
return getScriptFormat();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Bpmn2Package.SCRIPT_TASK__SCRIPT:
setScript((String) newValue);
return;
case Bpmn2Package.SCRIPT_TASK__SCRIPT_FORMAT:
setScriptFormat((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Bpmn2Package.SCRIPT_TASK__SCRIPT:
setScript(SCRIPT_EDEFAULT);
return;
case Bpmn2Package.SCRIPT_TASK__SCRIPT_FORMAT:
setScriptFormat(SCRIPT_FORMAT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Bpmn2Package.SCRIPT_TASK__SCRIPT:
return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals(script);
case Bpmn2Package.SCRIPT_TASK__SCRIPT_FORMAT:
return SCRIPT_FORMAT_EDEFAULT == null ? scriptFormat != null : !SCRIPT_FORMAT_EDEFAULT.equals(scriptFormat);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (script: ");
result.append(script);
result.append(", scriptFormat: ");
result.append(scriptFormat);
result.append(')');
return result.toString();
}
} //ScriptTaskImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy