001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id$
006: */package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl;
007:
008: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.FTPBase;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.FTPConsumer;
010: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.FTPProvider;
011: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
012:
013: import org.eclipse.emf.common.notify.Notification;
014: import org.eclipse.emf.common.notify.NotificationChain;
015:
016: import org.eclipse.emf.ecore.EClass;
017: import org.eclipse.emf.ecore.InternalEObject;
018:
019: import org.eclipse.emf.ecore.impl.ENotificationImpl;
020: import org.eclipse.emf.ecore.impl.EObjectImpl;
021:
022: /**
023: * <!-- begin-user-doc -->
024: * An implementation of the model object '<em><b>FTP Base</b></em>'.
025: * <!-- end-user-doc -->
026: * <p>
027: * The following features are implemented:
028: * <ul>
029: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FTPBaseImpl#getFtpConsumer <em>Ftp Consumer</em>}</li>
030: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FTPBaseImpl#getFtpProvider <em>Ftp Provider</em>}</li>
031: * </ul>
032: * </p>
033: *
034: * @generated
035: */
036: public class FTPBaseImpl extends EObjectImpl implements FTPBase {
037: /**
038: * <!-- begin-user-doc -->
039: * <!-- end-user-doc -->
040: * @generated
041: */
042: public static final String copyright = "Copyright, Bostech Corp.";
043:
044: /**
045: * The cached value of the '{@link #getFtpConsumer() <em>Ftp Consumer</em>}' containment reference.
046: * <!-- begin-user-doc -->
047: * <!-- end-user-doc -->
048: * @see #getFtpConsumer()
049: * @generated
050: * @ordered
051: */
052: protected FTPConsumer ftpConsumer = null;
053:
054: /**
055: * The cached value of the '{@link #getFtpProvider() <em>Ftp Provider</em>}' containment reference.
056: * <!-- begin-user-doc -->
057: * <!-- end-user-doc -->
058: * @see #getFtpProvider()
059: * @generated
060: * @ordered
061: */
062: protected FTPProvider ftpProvider = null;
063:
064: /**
065: * <!-- begin-user-doc -->
066: * <!-- end-user-doc -->
067: * @generated
068: */
069: protected FTPBaseImpl() {
070: super ();
071: }
072:
073: /**
074: * <!-- begin-user-doc -->
075: * <!-- end-user-doc -->
076: * @generated
077: */
078: protected EClass eStaticClass() {
079: return componentflowPackage.Literals.FTP_BASE;
080: }
081:
082: /**
083: * <!-- begin-user-doc -->
084: * <!-- end-user-doc -->
085: * @generated
086: */
087: public FTPConsumer getFtpConsumer() {
088: return ftpConsumer;
089: }
090:
091: /**
092: * <!-- begin-user-doc -->
093: * <!-- end-user-doc -->
094: * @generated
095: */
096: public NotificationChain basicSetFtpConsumer(
097: FTPConsumer newFtpConsumer, NotificationChain msgs) {
098: FTPConsumer oldFtpConsumer = ftpConsumer;
099: ftpConsumer = newFtpConsumer;
100: if (eNotificationRequired()) {
101: ENotificationImpl notification = new ENotificationImpl(
102: this , Notification.SET,
103: componentflowPackage.FTP_BASE__FTP_CONSUMER,
104: oldFtpConsumer, newFtpConsumer);
105: if (msgs == null)
106: msgs = notification;
107: else
108: msgs.add(notification);
109: }
110: return msgs;
111: }
112:
113: /**
114: * <!-- begin-user-doc -->
115: * <!-- end-user-doc -->
116: * @generated
117: */
118: public void setFtpConsumer(FTPConsumer newFtpConsumer) {
119: if (newFtpConsumer != ftpConsumer) {
120: NotificationChain msgs = null;
121: if (ftpConsumer != null)
122: msgs = ((InternalEObject) ftpConsumer)
123: .eInverseRemove(
124: this ,
125: EOPPOSITE_FEATURE_BASE
126: - componentflowPackage.FTP_BASE__FTP_CONSUMER,
127: null, msgs);
128: if (newFtpConsumer != null)
129: msgs = ((InternalEObject) newFtpConsumer)
130: .eInverseAdd(
131: this ,
132: EOPPOSITE_FEATURE_BASE
133: - componentflowPackage.FTP_BASE__FTP_CONSUMER,
134: null, msgs);
135: msgs = basicSetFtpConsumer(newFtpConsumer, msgs);
136: if (msgs != null)
137: msgs.dispatch();
138: } else if (eNotificationRequired())
139: eNotify(new ENotificationImpl(this , Notification.SET,
140: componentflowPackage.FTP_BASE__FTP_CONSUMER,
141: newFtpConsumer, newFtpConsumer));
142: }
143:
144: /**
145: * <!-- begin-user-doc -->
146: * <!-- end-user-doc -->
147: * @generated
148: */
149: public FTPProvider getFtpProvider() {
150: return ftpProvider;
151: }
152:
153: /**
154: * <!-- begin-user-doc -->
155: * <!-- end-user-doc -->
156: * @generated
157: */
158: public NotificationChain basicSetFtpProvider(
159: FTPProvider newFtpProvider, NotificationChain msgs) {
160: FTPProvider oldFtpProvider = ftpProvider;
161: ftpProvider = newFtpProvider;
162: if (eNotificationRequired()) {
163: ENotificationImpl notification = new ENotificationImpl(
164: this , Notification.SET,
165: componentflowPackage.FTP_BASE__FTP_PROVIDER,
166: oldFtpProvider, newFtpProvider);
167: if (msgs == null)
168: msgs = notification;
169: else
170: msgs.add(notification);
171: }
172: return msgs;
173: }
174:
175: /**
176: * <!-- begin-user-doc -->
177: * <!-- end-user-doc -->
178: * @generated
179: */
180: public void setFtpProvider(FTPProvider newFtpProvider) {
181: if (newFtpProvider != ftpProvider) {
182: NotificationChain msgs = null;
183: if (ftpProvider != null)
184: msgs = ((InternalEObject) ftpProvider)
185: .eInverseRemove(
186: this ,
187: EOPPOSITE_FEATURE_BASE
188: - componentflowPackage.FTP_BASE__FTP_PROVIDER,
189: null, msgs);
190: if (newFtpProvider != null)
191: msgs = ((InternalEObject) newFtpProvider)
192: .eInverseAdd(
193: this ,
194: EOPPOSITE_FEATURE_BASE
195: - componentflowPackage.FTP_BASE__FTP_PROVIDER,
196: null, msgs);
197: msgs = basicSetFtpProvider(newFtpProvider, msgs);
198: if (msgs != null)
199: msgs.dispatch();
200: } else if (eNotificationRequired())
201: eNotify(new ENotificationImpl(this , Notification.SET,
202: componentflowPackage.FTP_BASE__FTP_PROVIDER,
203: newFtpProvider, newFtpProvider));
204: }
205:
206: /**
207: * <!-- begin-user-doc -->
208: * <!-- end-user-doc -->
209: * @generated
210: */
211: public NotificationChain eInverseRemove(InternalEObject otherEnd,
212: int featureID, NotificationChain msgs) {
213: switch (featureID) {
214: case componentflowPackage.FTP_BASE__FTP_CONSUMER:
215: return basicSetFtpConsumer(null, msgs);
216: case componentflowPackage.FTP_BASE__FTP_PROVIDER:
217: return basicSetFtpProvider(null, msgs);
218: }
219: return super .eInverseRemove(otherEnd, featureID, msgs);
220: }
221:
222: /**
223: * <!-- begin-user-doc -->
224: * <!-- end-user-doc -->
225: * @generated
226: */
227: public Object eGet(int featureID, boolean resolve, boolean coreType) {
228: switch (featureID) {
229: case componentflowPackage.FTP_BASE__FTP_CONSUMER:
230: return getFtpConsumer();
231: case componentflowPackage.FTP_BASE__FTP_PROVIDER:
232: return getFtpProvider();
233: }
234: return super .eGet(featureID, resolve, coreType);
235: }
236:
237: /**
238: * <!-- begin-user-doc -->
239: * <!-- end-user-doc -->
240: * @generated
241: */
242: public void eSet(int featureID, Object newValue) {
243: switch (featureID) {
244: case componentflowPackage.FTP_BASE__FTP_CONSUMER:
245: setFtpConsumer((FTPConsumer) newValue);
246: return;
247: case componentflowPackage.FTP_BASE__FTP_PROVIDER:
248: setFtpProvider((FTPProvider) newValue);
249: return;
250: }
251: super .eSet(featureID, newValue);
252: }
253:
254: /**
255: * <!-- begin-user-doc -->
256: * <!-- end-user-doc -->
257: * @generated
258: */
259: public void eUnset(int featureID) {
260: switch (featureID) {
261: case componentflowPackage.FTP_BASE__FTP_CONSUMER:
262: setFtpConsumer((FTPConsumer) null);
263: return;
264: case componentflowPackage.FTP_BASE__FTP_PROVIDER:
265: setFtpProvider((FTPProvider) null);
266: return;
267: }
268: super .eUnset(featureID);
269: }
270:
271: /**
272: * <!-- begin-user-doc -->
273: * <!-- end-user-doc -->
274: * @generated
275: */
276: public boolean eIsSet(int featureID) {
277: switch (featureID) {
278: case componentflowPackage.FTP_BASE__FTP_CONSUMER:
279: return ftpConsumer != null;
280: case componentflowPackage.FTP_BASE__FTP_PROVIDER:
281: return ftpProvider != null;
282: }
283: return super .eIsSet(featureID);
284: }
285:
286: } //FTPBaseImpl
|