| /** |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| * |
| * generated from AuthoritarionDSL.xcore |
| * |
| * |
| */ |
| package org.eclipse.osbp.xtext.authorizationdsl.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.xtext.authorizationdsl.AuthorizationDSLPackage; |
| import org.eclipse.osbp.xtext.authorizationdsl.RoleBeanAttribute; |
| import org.eclipse.osbp.xtext.authorizationdsl.RolePropertyEnum; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Role Bean Attribute</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.authorizationdsl.impl.RoleBeanAttributeImpl#getBeanAttriUnauthorized <em>Bean Attri Unauthorized</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class RoleBeanAttributeImpl extends RoleBeanFeatureImpl implements RoleBeanAttribute { |
| /** |
| * The default value of the '{@link #getBeanAttriUnauthorized() <em>Bean Attri Unauthorized</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getBeanAttriUnauthorized() |
| * @generated |
| * @ordered |
| */ |
| protected static final RolePropertyEnum BEAN_ATTRI_UNAUTHORIZED_EDEFAULT = RolePropertyEnum.INVISIBLE; |
| |
| /** |
| * The cached value of the '{@link #getBeanAttriUnauthorized() <em>Bean Attri Unauthorized</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getBeanAttriUnauthorized() |
| * @generated |
| * @ordered |
| */ |
| protected RolePropertyEnum beanAttriUnauthorized = BEAN_ATTRI_UNAUTHORIZED_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected RoleBeanAttributeImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return AuthorizationDSLPackage.Literals.ROLE_BEAN_ATTRIBUTE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public RolePropertyEnum getBeanAttriUnauthorized() { |
| return beanAttriUnauthorized; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setBeanAttriUnauthorized(RolePropertyEnum newBeanAttriUnauthorized) { |
| RolePropertyEnum oldBeanAttriUnauthorized = beanAttriUnauthorized; |
| beanAttriUnauthorized = newBeanAttriUnauthorized == null ? BEAN_ATTRI_UNAUTHORIZED_EDEFAULT : newBeanAttriUnauthorized; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, AuthorizationDSLPackage.ROLE_BEAN_ATTRIBUTE__BEAN_ATTRI_UNAUTHORIZED, oldBeanAttriUnauthorized, beanAttriUnauthorized)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case AuthorizationDSLPackage.ROLE_BEAN_ATTRIBUTE__BEAN_ATTRI_UNAUTHORIZED: |
| return getBeanAttriUnauthorized(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case AuthorizationDSLPackage.ROLE_BEAN_ATTRIBUTE__BEAN_ATTRI_UNAUTHORIZED: |
| setBeanAttriUnauthorized((RolePropertyEnum)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case AuthorizationDSLPackage.ROLE_BEAN_ATTRIBUTE__BEAN_ATTRI_UNAUTHORIZED: |
| setBeanAttriUnauthorized(BEAN_ATTRI_UNAUTHORIZED_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case AuthorizationDSLPackage.ROLE_BEAN_ATTRIBUTE__BEAN_ATTRI_UNAUTHORIZED: |
| return beanAttriUnauthorized != BEAN_ATTRI_UNAUTHORIZED_EDEFAULT; |
| } |
| 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(" (beanAttriUnauthorized: "); |
| result.append(beanAttriUnauthorized); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //RoleBeanAttributeImpl |