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.AttachmentModeType;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.HttpConnection;
010: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.SSL;
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>Http Connection</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.HttpConnectionImpl#getLocationUrl <em>Location Url</em>}</li>
030: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.HttpConnectionImpl#isSoapEnabled <em>Soap Enabled</em>}</li>
031: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.HttpConnectionImpl#isUseSsl <em>Use Ssl</em>}</li>
032: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.HttpConnectionImpl#getSSL <em>SSL</em>}</li>
033: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.HttpConnectionImpl#getTimeout <em>Timeout</em>}</li>
034: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.HttpConnectionImpl#getAttachmentMode <em>Attachment Mode</em>}</li>
035: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.HttpConnectionImpl#getMarshaller <em>Marshaller</em>}</li>
036: * </ul>
037: * </p>
038: *
039: * @generated
040: */
041: public class HttpConnectionImpl extends EObjectImpl implements
042: HttpConnection {
043: /**
044: * <!-- begin-user-doc -->
045: * <!-- end-user-doc -->
046: * @generated
047: */
048: public static final String copyright = "Copyright, Bostech Corp.";
049:
050: /**
051: * The default value of the '{@link #getLocationUrl() <em>Location Url</em>}' attribute.
052: * <!-- begin-user-doc -->
053: * <!-- end-user-doc -->
054: * @see #getLocationUrl()
055: * @generated
056: * @ordered
057: */
058: protected static final String LOCATION_URL_EDEFAULT = null;
059:
060: /**
061: * The cached value of the '{@link #getLocationUrl() <em>Location Url</em>}' attribute.
062: * <!-- begin-user-doc -->
063: * <!-- end-user-doc -->
064: * @see #getLocationUrl()
065: * @generated
066: * @ordered
067: */
068: protected String locationUrl = LOCATION_URL_EDEFAULT;
069:
070: /**
071: * The default value of the '{@link #isSoapEnabled() <em>Soap Enabled</em>}' attribute.
072: * <!-- begin-user-doc -->
073: * <!-- end-user-doc -->
074: * @see #isSoapEnabled()
075: * @generated
076: * @ordered
077: */
078: protected static final boolean SOAP_ENABLED_EDEFAULT = false;
079:
080: /**
081: * The cached value of the '{@link #isSoapEnabled() <em>Soap Enabled</em>}' attribute.
082: * <!-- begin-user-doc -->
083: * <!-- end-user-doc -->
084: * @see #isSoapEnabled()
085: * @generated
086: * @ordered
087: */
088: protected boolean soapEnabled = SOAP_ENABLED_EDEFAULT;
089:
090: /**
091: * The default value of the '{@link #isUseSsl() <em>Use Ssl</em>}' attribute.
092: * <!-- begin-user-doc -->
093: * <!-- end-user-doc -->
094: * @see #isUseSsl()
095: * @generated
096: * @ordered
097: */
098: protected static final boolean USE_SSL_EDEFAULT = false;
099:
100: /**
101: * The cached value of the '{@link #isUseSsl() <em>Use Ssl</em>}' attribute.
102: * <!-- begin-user-doc -->
103: * <!-- end-user-doc -->
104: * @see #isUseSsl()
105: * @generated
106: * @ordered
107: */
108: protected boolean useSsl = USE_SSL_EDEFAULT;
109:
110: /**
111: * The cached value of the '{@link #getSSL() <em>SSL</em>}' containment reference.
112: * <!-- begin-user-doc -->
113: * <!-- end-user-doc -->
114: * @see #getSSL()
115: * @generated
116: * @ordered
117: */
118: protected SSL ssl = null;
119:
120: /**
121: * The default value of the '{@link #getTimeout() <em>Timeout</em>}' attribute.
122: * <!-- begin-user-doc -->
123: * <!-- end-user-doc -->
124: * @see #getTimeout()
125: * @generated
126: * @ordered
127: */
128: protected static final int TIMEOUT_EDEFAULT = 0;
129:
130: /**
131: * The cached value of the '{@link #getTimeout() <em>Timeout</em>}' attribute.
132: * <!-- begin-user-doc -->
133: * <!-- end-user-doc -->
134: * @see #getTimeout()
135: * @generated
136: * @ordered
137: */
138: protected int timeout = TIMEOUT_EDEFAULT;
139:
140: /**
141: * The default value of the '{@link #getAttachmentMode() <em>Attachment Mode</em>}' attribute.
142: * <!-- begin-user-doc -->
143: * <!-- end-user-doc -->
144: * @see #getAttachmentMode()
145: * @generated
146: * @ordered
147: */
148: protected static final AttachmentModeType ATTACHMENT_MODE_EDEFAULT = AttachmentModeType.NONE_LITERAL;
149:
150: /**
151: * The cached value of the '{@link #getAttachmentMode() <em>Attachment Mode</em>}' attribute.
152: * <!-- begin-user-doc -->
153: * <!-- end-user-doc -->
154: * @see #getAttachmentMode()
155: * @generated
156: * @ordered
157: */
158: protected AttachmentModeType attachmentMode = ATTACHMENT_MODE_EDEFAULT;
159:
160: /**
161: * The default value of the '{@link #getMarshaller() <em>Marshaller</em>}' attribute.
162: * <!-- begin-user-doc -->
163: * <!-- end-user-doc -->
164: * @see #getMarshaller()
165: * @generated
166: * @ordered
167: */
168: protected static final String MARSHALLER_EDEFAULT = "";
169:
170: /**
171: * The cached value of the '{@link #getMarshaller() <em>Marshaller</em>}' attribute.
172: * <!-- begin-user-doc -->
173: * <!-- end-user-doc -->
174: * @see #getMarshaller()
175: * @generated
176: * @ordered
177: */
178: protected String marshaller = MARSHALLER_EDEFAULT;
179:
180: /**
181: * <!-- begin-user-doc -->
182: * <!-- end-user-doc -->
183: * @generated
184: */
185: protected HttpConnectionImpl() {
186: super ();
187: }
188:
189: /**
190: * <!-- begin-user-doc -->
191: * <!-- end-user-doc -->
192: * @generated
193: */
194: protected EClass eStaticClass() {
195: return componentflowPackage.Literals.HTTP_CONNECTION;
196: }
197:
198: /**
199: * <!-- begin-user-doc -->
200: * <!-- end-user-doc -->
201: * @generated
202: */
203: public String getLocationUrl() {
204: return locationUrl;
205: }
206:
207: /**
208: * <!-- begin-user-doc -->
209: * <!-- end-user-doc -->
210: * @generated
211: */
212: public void setLocationUrl(String newLocationUrl) {
213: String oldLocationUrl = locationUrl;
214: locationUrl = newLocationUrl;
215: if (eNotificationRequired())
216: eNotify(new ENotificationImpl(this , Notification.SET,
217: componentflowPackage.HTTP_CONNECTION__LOCATION_URL,
218: oldLocationUrl, locationUrl));
219: }
220:
221: /**
222: * <!-- begin-user-doc -->
223: * <!-- end-user-doc -->
224: * @generated
225: */
226: public boolean isSoapEnabled() {
227: return soapEnabled;
228: }
229:
230: /**
231: * <!-- begin-user-doc -->
232: * <!-- end-user-doc -->
233: * @generated
234: */
235: public void setSoapEnabled(boolean newSoapEnabled) {
236: boolean oldSoapEnabled = soapEnabled;
237: soapEnabled = newSoapEnabled;
238: if (eNotificationRequired())
239: eNotify(new ENotificationImpl(this , Notification.SET,
240: componentflowPackage.HTTP_CONNECTION__SOAP_ENABLED,
241: oldSoapEnabled, soapEnabled));
242: }
243:
244: /**
245: * <!-- begin-user-doc -->
246: * <!-- end-user-doc -->
247: * @generated
248: */
249: public boolean isUseSsl() {
250: return useSsl;
251: }
252:
253: /**
254: * <!-- begin-user-doc -->
255: * <!-- end-user-doc -->
256: * @generated
257: */
258: public void setUseSsl(boolean newUseSsl) {
259: boolean oldUseSsl = useSsl;
260: useSsl = newUseSsl;
261: if (eNotificationRequired())
262: eNotify(new ENotificationImpl(this , Notification.SET,
263: componentflowPackage.HTTP_CONNECTION__USE_SSL,
264: oldUseSsl, useSsl));
265: }
266:
267: /**
268: * <!-- begin-user-doc -->
269: * <!-- end-user-doc -->
270: * @generated
271: */
272: public SSL getSSL() {
273: return ssl;
274: }
275:
276: /**
277: * <!-- begin-user-doc -->
278: * <!-- end-user-doc -->
279: * @generated
280: */
281: public NotificationChain basicSetSSL(SSL newSSL,
282: NotificationChain msgs) {
283: SSL oldSSL = ssl;
284: ssl = newSSL;
285: if (eNotificationRequired()) {
286: ENotificationImpl notification = new ENotificationImpl(
287: this , Notification.SET,
288: componentflowPackage.HTTP_CONNECTION__SSL, oldSSL,
289: newSSL);
290: if (msgs == null)
291: msgs = notification;
292: else
293: msgs.add(notification);
294: }
295: return msgs;
296: }
297:
298: /**
299: * <!-- begin-user-doc -->
300: * <!-- end-user-doc -->
301: * @generated
302: */
303: public void setSSL(SSL newSSL) {
304: if (newSSL != ssl) {
305: NotificationChain msgs = null;
306: if (ssl != null)
307: msgs = ((InternalEObject) ssl)
308: .eInverseRemove(
309: this ,
310: EOPPOSITE_FEATURE_BASE
311: - componentflowPackage.HTTP_CONNECTION__SSL,
312: null, msgs);
313: if (newSSL != null)
314: msgs = ((InternalEObject) newSSL)
315: .eInverseAdd(
316: this ,
317: EOPPOSITE_FEATURE_BASE
318: - componentflowPackage.HTTP_CONNECTION__SSL,
319: null, msgs);
320: msgs = basicSetSSL(newSSL, msgs);
321: if (msgs != null)
322: msgs.dispatch();
323: } else if (eNotificationRequired())
324: eNotify(new ENotificationImpl(this , Notification.SET,
325: componentflowPackage.HTTP_CONNECTION__SSL, newSSL,
326: newSSL));
327: }
328:
329: /**
330: * <!-- begin-user-doc -->
331: * <!-- end-user-doc -->
332: * @generated
333: */
334: public int getTimeout() {
335: return timeout;
336: }
337:
338: /**
339: * <!-- begin-user-doc -->
340: * <!-- end-user-doc -->
341: * @generated
342: */
343: public void setTimeout(int newTimeout) {
344: int oldTimeout = timeout;
345: timeout = newTimeout;
346: if (eNotificationRequired())
347: eNotify(new ENotificationImpl(this , Notification.SET,
348: componentflowPackage.HTTP_CONNECTION__TIMEOUT,
349: oldTimeout, timeout));
350: }
351:
352: /**
353: * <!-- begin-user-doc -->
354: * <!-- end-user-doc -->
355: * @generated
356: */
357: public AttachmentModeType getAttachmentMode() {
358: return attachmentMode;
359: }
360:
361: /**
362: * <!-- begin-user-doc -->
363: * <!-- end-user-doc -->
364: * @generated
365: */
366: public void setAttachmentMode(AttachmentModeType newAttachmentMode) {
367: AttachmentModeType oldAttachmentMode = attachmentMode;
368: attachmentMode = newAttachmentMode == null ? ATTACHMENT_MODE_EDEFAULT
369: : newAttachmentMode;
370: if (eNotificationRequired())
371: eNotify(new ENotificationImpl(
372: this ,
373: Notification.SET,
374: componentflowPackage.HTTP_CONNECTION__ATTACHMENT_MODE,
375: oldAttachmentMode, attachmentMode));
376: }
377:
378: /**
379: * <!-- begin-user-doc -->
380: * <!-- end-user-doc -->
381: * @generated
382: */
383: public String getMarshaller() {
384: return marshaller;
385: }
386:
387: /**
388: * <!-- begin-user-doc -->
389: * <!-- end-user-doc -->
390: * @generated
391: */
392: public void setMarshaller(String newMarshaller) {
393: String oldMarshaller = marshaller;
394: marshaller = newMarshaller;
395: if (eNotificationRequired())
396: eNotify(new ENotificationImpl(this , Notification.SET,
397: componentflowPackage.HTTP_CONNECTION__MARSHALLER,
398: oldMarshaller, marshaller));
399: }
400:
401: /**
402: * <!-- begin-user-doc -->
403: * <!-- end-user-doc -->
404: * @generated
405: */
406: public NotificationChain eInverseRemove(InternalEObject otherEnd,
407: int featureID, NotificationChain msgs) {
408: switch (featureID) {
409: case componentflowPackage.HTTP_CONNECTION__SSL:
410: return basicSetSSL(null, msgs);
411: }
412: return super .eInverseRemove(otherEnd, featureID, msgs);
413: }
414:
415: /**
416: * <!-- begin-user-doc -->
417: * <!-- end-user-doc -->
418: * @generated
419: */
420: public Object eGet(int featureID, boolean resolve, boolean coreType) {
421: switch (featureID) {
422: case componentflowPackage.HTTP_CONNECTION__LOCATION_URL:
423: return getLocationUrl();
424: case componentflowPackage.HTTP_CONNECTION__SOAP_ENABLED:
425: return isSoapEnabled() ? Boolean.TRUE : Boolean.FALSE;
426: case componentflowPackage.HTTP_CONNECTION__USE_SSL:
427: return isUseSsl() ? Boolean.TRUE : Boolean.FALSE;
428: case componentflowPackage.HTTP_CONNECTION__SSL:
429: return getSSL();
430: case componentflowPackage.HTTP_CONNECTION__TIMEOUT:
431: return new Integer(getTimeout());
432: case componentflowPackage.HTTP_CONNECTION__ATTACHMENT_MODE:
433: return getAttachmentMode();
434: case componentflowPackage.HTTP_CONNECTION__MARSHALLER:
435: return getMarshaller();
436: }
437: return super .eGet(featureID, resolve, coreType);
438: }
439:
440: /**
441: * <!-- begin-user-doc -->
442: * <!-- end-user-doc -->
443: * @generated
444: */
445: public void eSet(int featureID, Object newValue) {
446: switch (featureID) {
447: case componentflowPackage.HTTP_CONNECTION__LOCATION_URL:
448: setLocationUrl((String) newValue);
449: return;
450: case componentflowPackage.HTTP_CONNECTION__SOAP_ENABLED:
451: setSoapEnabled(((Boolean) newValue).booleanValue());
452: return;
453: case componentflowPackage.HTTP_CONNECTION__USE_SSL:
454: setUseSsl(((Boolean) newValue).booleanValue());
455: return;
456: case componentflowPackage.HTTP_CONNECTION__SSL:
457: setSSL((SSL) newValue);
458: return;
459: case componentflowPackage.HTTP_CONNECTION__TIMEOUT:
460: setTimeout(((Integer) newValue).intValue());
461: return;
462: case componentflowPackage.HTTP_CONNECTION__ATTACHMENT_MODE:
463: setAttachmentMode((AttachmentModeType) newValue);
464: return;
465: case componentflowPackage.HTTP_CONNECTION__MARSHALLER:
466: setMarshaller((String) newValue);
467: return;
468: }
469: super .eSet(featureID, newValue);
470: }
471:
472: /**
473: * <!-- begin-user-doc -->
474: * <!-- end-user-doc -->
475: * @generated
476: */
477: public void eUnset(int featureID) {
478: switch (featureID) {
479: case componentflowPackage.HTTP_CONNECTION__LOCATION_URL:
480: setLocationUrl(LOCATION_URL_EDEFAULT);
481: return;
482: case componentflowPackage.HTTP_CONNECTION__SOAP_ENABLED:
483: setSoapEnabled(SOAP_ENABLED_EDEFAULT);
484: return;
485: case componentflowPackage.HTTP_CONNECTION__USE_SSL:
486: setUseSsl(USE_SSL_EDEFAULT);
487: return;
488: case componentflowPackage.HTTP_CONNECTION__SSL:
489: setSSL((SSL) null);
490: return;
491: case componentflowPackage.HTTP_CONNECTION__TIMEOUT:
492: setTimeout(TIMEOUT_EDEFAULT);
493: return;
494: case componentflowPackage.HTTP_CONNECTION__ATTACHMENT_MODE:
495: setAttachmentMode(ATTACHMENT_MODE_EDEFAULT);
496: return;
497: case componentflowPackage.HTTP_CONNECTION__MARSHALLER:
498: setMarshaller(MARSHALLER_EDEFAULT);
499: return;
500: }
501: super .eUnset(featureID);
502: }
503:
504: /**
505: * <!-- begin-user-doc -->
506: * <!-- end-user-doc -->
507: * @generated
508: */
509: public boolean eIsSet(int featureID) {
510: switch (featureID) {
511: case componentflowPackage.HTTP_CONNECTION__LOCATION_URL:
512: return LOCATION_URL_EDEFAULT == null ? locationUrl != null
513: : !LOCATION_URL_EDEFAULT.equals(locationUrl);
514: case componentflowPackage.HTTP_CONNECTION__SOAP_ENABLED:
515: return soapEnabled != SOAP_ENABLED_EDEFAULT;
516: case componentflowPackage.HTTP_CONNECTION__USE_SSL:
517: return useSsl != USE_SSL_EDEFAULT;
518: case componentflowPackage.HTTP_CONNECTION__SSL:
519: return ssl != null;
520: case componentflowPackage.HTTP_CONNECTION__TIMEOUT:
521: return timeout != TIMEOUT_EDEFAULT;
522: case componentflowPackage.HTTP_CONNECTION__ATTACHMENT_MODE:
523: return attachmentMode != ATTACHMENT_MODE_EDEFAULT;
524: case componentflowPackage.HTTP_CONNECTION__MARSHALLER:
525: return MARSHALLER_EDEFAULT == null ? marshaller != null
526: : !MARSHALLER_EDEFAULT.equals(marshaller);
527: }
528: return super .eIsSet(featureID);
529: }
530:
531: /**
532: * <!-- begin-user-doc -->
533: * <!-- end-user-doc -->
534: * @generated
535: */
536: public String toString() {
537: if (eIsProxy())
538: return super .toString();
539:
540: StringBuffer result = new StringBuffer(super .toString());
541: result.append(" (locationUrl: ");
542: result.append(locationUrl);
543: result.append(", soapEnabled: ");
544: result.append(soapEnabled);
545: result.append(", useSsl: ");
546: result.append(useSsl);
547: result.append(", timeout: ");
548: result.append(timeout);
549: result.append(", attachmentMode: ");
550: result.append(attachmentMode);
551: result.append(", marshaller: ");
552: result.append(marshaller);
553: result.append(')');
554: return result.toString();
555: }
556:
557: } //HttpConnectionImpl
|