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.ConnectModeType;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.FTPAuthentication;
010: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.TransferModeType;
011: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
012:
013: import org.eclipse.emf.common.notify.Notification;
014:
015: import org.eclipse.emf.ecore.EClass;
016:
017: import org.eclipse.emf.ecore.impl.ENotificationImpl;
018: import org.eclipse.emf.ecore.impl.EObjectImpl;
019:
020: /**
021: * <!-- begin-user-doc -->
022: * An implementation of the model object '<em><b>FTP Authentication</b></em>'.
023: * <!-- end-user-doc -->
024: * <p>
025: * The following features are implemented:
026: * <ul>
027: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FTPAuthenticationImpl#getConnectMode <em>Connect Mode</em>}</li>
028: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FTPAuthenticationImpl#getTransferMode <em>Transfer Mode</em>}</li>
029: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FTPAuthenticationImpl#getFtpHost <em>Ftp Host</em>}</li>
030: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FTPAuthenticationImpl#getFtpUser <em>Ftp User</em>}</li>
031: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.FTPAuthenticationImpl#getFtpPassword <em>Ftp Password</em>}</li>
032: * </ul>
033: * </p>
034: *
035: * @generated
036: */
037: public class FTPAuthenticationImpl extends EObjectImpl implements
038: FTPAuthentication {
039: /**
040: * <!-- begin-user-doc -->
041: * <!-- end-user-doc -->
042: * @generated
043: */
044: public static final String copyright = "Copyright, Bostech Corp.";
045:
046: /**
047: * The default value of the '{@link #getConnectMode() <em>Connect Mode</em>}' attribute.
048: * <!-- begin-user-doc -->
049: * <!-- end-user-doc -->
050: * @see #getConnectMode()
051: * @generated
052: * @ordered
053: */
054: protected static final ConnectModeType CONNECT_MODE_EDEFAULT = ConnectModeType.PASSIVE_LITERAL;
055:
056: /**
057: * The cached value of the '{@link #getConnectMode() <em>Connect Mode</em>}' attribute.
058: * <!-- begin-user-doc -->
059: * <!-- end-user-doc -->
060: * @see #getConnectMode()
061: * @generated
062: * @ordered
063: */
064: protected ConnectModeType connectMode = CONNECT_MODE_EDEFAULT;
065:
066: /**
067: * The default value of the '{@link #getTransferMode() <em>Transfer Mode</em>}' attribute.
068: * <!-- begin-user-doc -->
069: * <!-- end-user-doc -->
070: * @see #getTransferMode()
071: * @generated
072: * @ordered
073: */
074: protected static final TransferModeType TRANSFER_MODE_EDEFAULT = TransferModeType.BINARY_LITERAL;
075:
076: /**
077: * The cached value of the '{@link #getTransferMode() <em>Transfer Mode</em>}' attribute.
078: * <!-- begin-user-doc -->
079: * <!-- end-user-doc -->
080: * @see #getTransferMode()
081: * @generated
082: * @ordered
083: */
084: protected TransferModeType transferMode = TRANSFER_MODE_EDEFAULT;
085:
086: /**
087: * The default value of the '{@link #getFtpHost() <em>Ftp Host</em>}' attribute.
088: * <!-- begin-user-doc -->
089: * <!-- end-user-doc -->
090: * @see #getFtpHost()
091: * @generated
092: * @ordered
093: */
094: protected static final String FTP_HOST_EDEFAULT = null;
095:
096: /**
097: * The cached value of the '{@link #getFtpHost() <em>Ftp Host</em>}' attribute.
098: * <!-- begin-user-doc -->
099: * <!-- end-user-doc -->
100: * @see #getFtpHost()
101: * @generated
102: * @ordered
103: */
104: protected String ftpHost = FTP_HOST_EDEFAULT;
105:
106: /**
107: * The default value of the '{@link #getFtpUser() <em>Ftp User</em>}' attribute.
108: * <!-- begin-user-doc -->
109: * <!-- end-user-doc -->
110: * @see #getFtpUser()
111: * @generated
112: * @ordered
113: */
114: protected static final String FTP_USER_EDEFAULT = null;
115:
116: /**
117: * The cached value of the '{@link #getFtpUser() <em>Ftp User</em>}' attribute.
118: * <!-- begin-user-doc -->
119: * <!-- end-user-doc -->
120: * @see #getFtpUser()
121: * @generated
122: * @ordered
123: */
124: protected String ftpUser = FTP_USER_EDEFAULT;
125:
126: /**
127: * The default value of the '{@link #getFtpPassword() <em>Ftp Password</em>}' attribute.
128: * <!-- begin-user-doc -->
129: * <!-- end-user-doc -->
130: * @see #getFtpPassword()
131: * @generated
132: * @ordered
133: */
134: protected static final String FTP_PASSWORD_EDEFAULT = null;
135:
136: /**
137: * The cached value of the '{@link #getFtpPassword() <em>Ftp Password</em>}' attribute.
138: * <!-- begin-user-doc -->
139: * <!-- end-user-doc -->
140: * @see #getFtpPassword()
141: * @generated
142: * @ordered
143: */
144: protected String ftpPassword = FTP_PASSWORD_EDEFAULT;
145:
146: /**
147: * <!-- begin-user-doc -->
148: * <!-- end-user-doc -->
149: * @generated
150: */
151: protected FTPAuthenticationImpl() {
152: super ();
153: }
154:
155: /**
156: * <!-- begin-user-doc -->
157: * <!-- end-user-doc -->
158: * @generated
159: */
160: protected EClass eStaticClass() {
161: return componentflowPackage.Literals.FTP_AUTHENTICATION;
162: }
163:
164: /**
165: * <!-- begin-user-doc -->
166: * <!-- end-user-doc -->
167: * @generated
168: */
169: public ConnectModeType getConnectMode() {
170: return connectMode;
171: }
172:
173: /**
174: * <!-- begin-user-doc -->
175: * <!-- end-user-doc -->
176: * @generated
177: */
178: public void setConnectMode(ConnectModeType newConnectMode) {
179: ConnectModeType oldConnectMode = connectMode;
180: connectMode = newConnectMode == null ? CONNECT_MODE_EDEFAULT
181: : newConnectMode;
182: if (eNotificationRequired())
183: eNotify(new ENotificationImpl(
184: this ,
185: Notification.SET,
186: componentflowPackage.FTP_AUTHENTICATION__CONNECT_MODE,
187: oldConnectMode, connectMode));
188: }
189:
190: /**
191: * <!-- begin-user-doc -->
192: * <!-- end-user-doc -->
193: * @generated
194: */
195: public TransferModeType getTransferMode() {
196: return transferMode;
197: }
198:
199: /**
200: * <!-- begin-user-doc -->
201: * <!-- end-user-doc -->
202: * @generated
203: */
204: public void setTransferMode(TransferModeType newTransferMode) {
205: TransferModeType oldTransferMode = transferMode;
206: transferMode = newTransferMode == null ? TRANSFER_MODE_EDEFAULT
207: : newTransferMode;
208: if (eNotificationRequired())
209: eNotify(new ENotificationImpl(
210: this ,
211: Notification.SET,
212: componentflowPackage.FTP_AUTHENTICATION__TRANSFER_MODE,
213: oldTransferMode, transferMode));
214: }
215:
216: /**
217: * <!-- begin-user-doc -->
218: * <!-- end-user-doc -->
219: * @generated
220: */
221: public String getFtpHost() {
222: return ftpHost;
223: }
224:
225: /**
226: * <!-- begin-user-doc -->
227: * <!-- end-user-doc -->
228: * @generated
229: */
230: public void setFtpHost(String newFtpHost) {
231: String oldFtpHost = ftpHost;
232: ftpHost = newFtpHost;
233: if (eNotificationRequired())
234: eNotify(new ENotificationImpl(this , Notification.SET,
235: componentflowPackage.FTP_AUTHENTICATION__FTP_HOST,
236: oldFtpHost, ftpHost));
237: }
238:
239: /**
240: * <!-- begin-user-doc -->
241: * <!-- end-user-doc -->
242: * @generated
243: */
244: public String getFtpUser() {
245: return ftpUser;
246: }
247:
248: /**
249: * <!-- begin-user-doc -->
250: * <!-- end-user-doc -->
251: * @generated
252: */
253: public void setFtpUser(String newFtpUser) {
254: String oldFtpUser = ftpUser;
255: ftpUser = newFtpUser;
256: if (eNotificationRequired())
257: eNotify(new ENotificationImpl(this , Notification.SET,
258: componentflowPackage.FTP_AUTHENTICATION__FTP_USER,
259: oldFtpUser, ftpUser));
260: }
261:
262: /**
263: * <!-- begin-user-doc -->
264: * <!-- end-user-doc -->
265: * @generated
266: */
267: public String getFtpPassword() {
268: return ftpPassword;
269: }
270:
271: /**
272: * <!-- begin-user-doc -->
273: * <!-- end-user-doc -->
274: * @generated
275: */
276: public void setFtpPassword(String newFtpPassword) {
277: String oldFtpPassword = ftpPassword;
278: ftpPassword = newFtpPassword;
279: if (eNotificationRequired())
280: eNotify(new ENotificationImpl(
281: this ,
282: Notification.SET,
283: componentflowPackage.FTP_AUTHENTICATION__FTP_PASSWORD,
284: oldFtpPassword, ftpPassword));
285: }
286:
287: /**
288: * <!-- begin-user-doc -->
289: * <!-- end-user-doc -->
290: * @generated
291: */
292: public Object eGet(int featureID, boolean resolve, boolean coreType) {
293: switch (featureID) {
294: case componentflowPackage.FTP_AUTHENTICATION__CONNECT_MODE:
295: return getConnectMode();
296: case componentflowPackage.FTP_AUTHENTICATION__TRANSFER_MODE:
297: return getTransferMode();
298: case componentflowPackage.FTP_AUTHENTICATION__FTP_HOST:
299: return getFtpHost();
300: case componentflowPackage.FTP_AUTHENTICATION__FTP_USER:
301: return getFtpUser();
302: case componentflowPackage.FTP_AUTHENTICATION__FTP_PASSWORD:
303: return getFtpPassword();
304: }
305: return super .eGet(featureID, resolve, coreType);
306: }
307:
308: /**
309: * <!-- begin-user-doc -->
310: * <!-- end-user-doc -->
311: * @generated
312: */
313: public void eSet(int featureID, Object newValue) {
314: switch (featureID) {
315: case componentflowPackage.FTP_AUTHENTICATION__CONNECT_MODE:
316: setConnectMode((ConnectModeType) newValue);
317: return;
318: case componentflowPackage.FTP_AUTHENTICATION__TRANSFER_MODE:
319: setTransferMode((TransferModeType) newValue);
320: return;
321: case componentflowPackage.FTP_AUTHENTICATION__FTP_HOST:
322: setFtpHost((String) newValue);
323: return;
324: case componentflowPackage.FTP_AUTHENTICATION__FTP_USER:
325: setFtpUser((String) newValue);
326: return;
327: case componentflowPackage.FTP_AUTHENTICATION__FTP_PASSWORD:
328: setFtpPassword((String) newValue);
329: return;
330: }
331: super .eSet(featureID, newValue);
332: }
333:
334: /**
335: * <!-- begin-user-doc -->
336: * <!-- end-user-doc -->
337: * @generated
338: */
339: public void eUnset(int featureID) {
340: switch (featureID) {
341: case componentflowPackage.FTP_AUTHENTICATION__CONNECT_MODE:
342: setConnectMode(CONNECT_MODE_EDEFAULT);
343: return;
344: case componentflowPackage.FTP_AUTHENTICATION__TRANSFER_MODE:
345: setTransferMode(TRANSFER_MODE_EDEFAULT);
346: return;
347: case componentflowPackage.FTP_AUTHENTICATION__FTP_HOST:
348: setFtpHost(FTP_HOST_EDEFAULT);
349: return;
350: case componentflowPackage.FTP_AUTHENTICATION__FTP_USER:
351: setFtpUser(FTP_USER_EDEFAULT);
352: return;
353: case componentflowPackage.FTP_AUTHENTICATION__FTP_PASSWORD:
354: setFtpPassword(FTP_PASSWORD_EDEFAULT);
355: return;
356: }
357: super .eUnset(featureID);
358: }
359:
360: /**
361: * <!-- begin-user-doc -->
362: * <!-- end-user-doc -->
363: * @generated
364: */
365: public boolean eIsSet(int featureID) {
366: switch (featureID) {
367: case componentflowPackage.FTP_AUTHENTICATION__CONNECT_MODE:
368: return connectMode != CONNECT_MODE_EDEFAULT;
369: case componentflowPackage.FTP_AUTHENTICATION__TRANSFER_MODE:
370: return transferMode != TRANSFER_MODE_EDEFAULT;
371: case componentflowPackage.FTP_AUTHENTICATION__FTP_HOST:
372: return FTP_HOST_EDEFAULT == null ? ftpHost != null
373: : !FTP_HOST_EDEFAULT.equals(ftpHost);
374: case componentflowPackage.FTP_AUTHENTICATION__FTP_USER:
375: return FTP_USER_EDEFAULT == null ? ftpUser != null
376: : !FTP_USER_EDEFAULT.equals(ftpUser);
377: case componentflowPackage.FTP_AUTHENTICATION__FTP_PASSWORD:
378: return FTP_PASSWORD_EDEFAULT == null ? ftpPassword != null
379: : !FTP_PASSWORD_EDEFAULT.equals(ftpPassword);
380: }
381: return super .eIsSet(featureID);
382: }
383:
384: /**
385: * <!-- begin-user-doc -->
386: * <!-- end-user-doc -->
387: * @generated
388: */
389: public String toString() {
390: if (eIsProxy())
391: return super .toString();
392:
393: StringBuffer result = new StringBuffer(super .toString());
394: result.append(" (connectMode: ");
395: result.append(connectMode);
396: result.append(", transferMode: ");
397: result.append(transferMode);
398: result.append(", ftpHost: ");
399: result.append(ftpHost);
400: result.append(", ftpUser: ");
401: result.append(ftpUser);
402: result.append(", ftpPassword: ");
403: result.append(ftpPassword);
404: result.append(')');
405: return result.toString();
406: }
407:
408: } //FTPAuthenticationImpl
|