]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.aeri.ui.redmine.core/src/org/simantics/aeri/redmine/core/settings/impl/RedmineAERISettingsImpl.java
Experiment around with AERI in Simantics Products
[simantics/platform.git] / bundles / org.simantics.aeri.ui.redmine.core / src / org / simantics / aeri / redmine / core / settings / impl / RedmineAERISettingsImpl.java
diff --git a/bundles/org.simantics.aeri.ui.redmine.core/src/org/simantics/aeri/redmine/core/settings/impl/RedmineAERISettingsImpl.java b/bundles/org.simantics.aeri.ui.redmine.core/src/org/simantics/aeri/redmine/core/settings/impl/RedmineAERISettingsImpl.java
new file mode 100644 (file)
index 0000000..e2990c1
--- /dev/null
@@ -0,0 +1,163 @@
+/**
+ */
+package org.simantics.aeri.redmine.core.settings.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.simantics.aeri.redmine.core.settings.RedmineAERISettings;
+import org.simantics.aeri.redmine.core.settings.RedmineAERISettingsPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Redmine AERI Settings</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ *   <li>{@link org.simantics.aeri.redmine.core.settings.impl.RedmineAERISettingsImpl#getApiKey <em>Api Key</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class RedmineAERISettingsImpl extends MinimalEObjectImpl.Container implements RedmineAERISettings {
+    /**
+     * The default value of the '{@link #getApiKey() <em>Api Key</em>}' attribute.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see #getApiKey()
+     * @generated
+     * @ordered
+     */
+    protected static final String API_KEY_EDEFAULT = null;
+
+    /**
+     * The cached value of the '{@link #getApiKey() <em>Api Key</em>}' attribute.
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @see #getApiKey()
+     * @generated
+     * @ordered
+     */
+    protected String apiKey = API_KEY_EDEFAULT;
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    protected RedmineAERISettingsImpl() {
+        super();
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    @Override
+    protected EClass eStaticClass() {
+        return RedmineAERISettingsPackage.Literals.REDMINE_AERI_SETTINGS;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    public String getApiKey() {
+        return apiKey;
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    public void setApiKey(String newApiKey) {
+        String oldApiKey = apiKey;
+        apiKey = newApiKey;
+        if (eNotificationRequired())
+            eNotify(new ENotificationImpl(this, Notification.SET, RedmineAERISettingsPackage.REDMINE_AERI_SETTINGS__API_KEY, oldApiKey, apiKey));
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    @Override
+    public Object eGet(int featureID, boolean resolve, boolean coreType) {
+        switch (featureID) {
+            case RedmineAERISettingsPackage.REDMINE_AERI_SETTINGS__API_KEY:
+                return getApiKey();
+        }
+        return super.eGet(featureID, resolve, coreType);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    @Override
+    public void eSet(int featureID, Object newValue) {
+        switch (featureID) {
+            case RedmineAERISettingsPackage.REDMINE_AERI_SETTINGS__API_KEY:
+                setApiKey((String)newValue);
+                return;
+        }
+        super.eSet(featureID, newValue);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    @Override
+    public void eUnset(int featureID) {
+        switch (featureID) {
+            case RedmineAERISettingsPackage.REDMINE_AERI_SETTINGS__API_KEY:
+                setApiKey(API_KEY_EDEFAULT);
+                return;
+        }
+        super.eUnset(featureID);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    @Override
+    public boolean eIsSet(int featureID) {
+        switch (featureID) {
+            case RedmineAERISettingsPackage.REDMINE_AERI_SETTINGS__API_KEY:
+                return API_KEY_EDEFAULT == null ? apiKey != null : !API_KEY_EDEFAULT.equals(apiKey);
+        }
+        return super.eIsSet(featureID);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    @Override
+    public String toString() {
+        if (eIsProxy()) return super.toString();
+
+        StringBuffer result = new StringBuffer(super.toString());
+        result.append(" (apiKey: ");
+        result.append(apiKey);
+        result.append(')');
+        return result.toString();
+    }
+
+} //RedmineAERISettingsImpl