/*-
* ============LICENSE_START==========================================
* OPENECOMP - DCAE
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END============================================
*/
/**
*/
package org.openecomp.ncomp.openstack.location.impl;
import org.openecomp.ncomp.core.impl.NamedEntityImpl;
import org.openecomp.ncomp.openstack.location.LocationPackage;
import org.openecomp.ncomp.openstack.location.OpenStackUser;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Open Stack User'.
*
*
* The following features are implemented:
*
* - {@link org.openecomp.ncomp.openstack.location.impl.OpenStackUserImpl#getPassword Password}
*
*
*
* @generated
*/
public class OpenStackUserImpl extends NamedEntityImpl implements OpenStackUser {
/**
* The default value of the '{@link #getPassword() Password}' attribute.
*
*
* @see #getPassword()
* @generated
* @ordered
*/
protected static final String PASSWORD_EDEFAULT = null;
/**
* The cached value of the '{@link #getPassword() Password}' attribute.
*
*
* @see #getPassword()
* @generated
* @ordered
*/
protected String password = PASSWORD_EDEFAULT;
/**
*
*
* @generated
*/
protected OpenStackUserImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return LocationPackage.Literals.OPEN_STACK_USER;
}
/**
*
*
* @generated
*/
public String getPassword() {
return password;
}
/**
*
*
* @generated
*/
public void setPassword(String newPassword) {
String oldPassword = password;
password = newPassword;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, LocationPackage.OPEN_STACK_USER__PASSWORD, oldPassword, password));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case LocationPackage.OPEN_STACK_USER__PASSWORD:
return getPassword();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case LocationPackage.OPEN_STACK_USER__PASSWORD:
setPassword((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case LocationPackage.OPEN_STACK_USER__PASSWORD:
setPassword(PASSWORD_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case LocationPackage.OPEN_STACK_USER__PASSWORD:
return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (password: ");
result.append(password);
result.append(')');
return result.toString();
}
} //OpenStackUserImpl