diff options
author | 2017-02-14 15:12:08 +0000 | |
---|---|---|
committer | 2017-02-14 15:12:10 +0000 | |
commit | a84b847a3409df445482674feffa2872a8cbae83 (patch) | |
tree | a4f2dcaef92e0fb09402f2f28f793928d0a16bfd /dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main | |
parent | e6bca17737d1897675e6403e196fc2a61f335651 (diff) |
Init dcae.controller
Change-Id: I460f09494faa84b55d9c5d54112e098b0e74d007
Signed-off-by: lj1412 <lji@research.att.com>
Diffstat (limited to 'dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main')
22 files changed, 4985 insertions, 0 deletions
diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.java new file mode 100644 index 0000000..a9f4d9b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/CdapClusterManager.java @@ -0,0 +1,41 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.cdap.CdapApi; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Cdap Cluster Manager</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage#getCdapClusterManager() + * @model + * @generated + */ +public interface CdapClusterManager extends VirtualMachineManager, CdapClusterConfiguration, CdapApi { +} // CdapClusterManager diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.java new file mode 100644 index 0000000..38851c4 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage + * @generated + */ +public interface ManagerFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ManagerFactory eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Cdap Cluster Manager</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Cdap Cluster Manager</em>'. + * @generated + */ + CdapClusterManager createCdapClusterManager(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + ManagerPackage getManagerPackage(); + +} //ManagerFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java new file mode 100644 index 0000000..8523dea --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/ManagerPackage.java @@ -0,0 +1,685 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager; + +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.cdap.cluster'" + * @generated + */ +public interface ManagerPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "manager"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdap.cluster.manager"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "manager"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ManagerPackage eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl <em>Cdap Cluster Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerPackageImpl#getCdapClusterManager() + * @generated + */ + int CDAP_CLUSTER_MANAGER = 0; + + /** + * The feature id for the '<em><b>Input Streams</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__INPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__INPUT_STREAMS; + + /** + * The feature id for the '<em><b>Output Streams</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__OUTPUT_STREAMS = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__OUTPUT_STREAMS; + + /** + * The feature id for the '<em><b>Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__CONFIGURATION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__CONFIGURATION; + + /** + * The feature id for the '<em><b>Component</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__COMPONENT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER__COMPONENT; + + /** + * The feature id for the '<em><b>Cluster</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER__CLUSTER = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Cdap Cluster Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER_FEATURE_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_FEATURE_COUNT + 1; + + /** + * The operation id for the '<em>Test</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___TEST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___TEST; + + /** + * The operation id for the '<em>Suspend</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SUSPEND = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___SUSPEND; + + /** + * The operation id for the '<em>Resume</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___RESUME = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___RESUME; + + /** + * The operation id for the '<em>Public Key</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___PUBLIC_KEY = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PUBLIC_KEY; + + /** + * The operation id for the '<em>Configuration Changed</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CONFIGURATION_CHANGED = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___CONFIGURATION_CHANGED; + + /** + * The operation id for the '<em>Update Streams</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___UPDATE_STREAMS__ELIST_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE_STREAMS__ELIST_ELIST; + + /** + * The operation id for the '<em>Logs</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOGS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the '<em>Metrics</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___METRICS__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the '<em>Properties</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___PROPERTIES__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the '<em>Upload Info</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPLOAD_INFO__JSONOBJECT_ELIST; + + /** + * The operation id for the '<em>Get Values</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the '<em>Get Values All</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + + /** + * The operation id for the '<em>Get Messages</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + + /** + * The operation id for the '<em>Get Request Logger</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + + /** + * The operation id for the '<em>Evaluate</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___EVALUATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___EVALUATE__STRING_FUNCTION; + + /** + * The operation id for the '<em>Update</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___UPDATE__STRING_FUNCTION = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER___UPDATE__STRING_FUNCTION; + + /** + * The operation id for the '<em>Create Namespace</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_NAMESPACE__STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 0; + + /** + * The operation id for the '<em>Delete Namespace</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_NAMESPACE__STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 1; + + /** + * The operation id for the '<em>Deploy App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DEPLOY_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 2; + + /** + * The operation id for the '<em>Load Artifact</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 3; + + /** + * The operation id for the '<em>Delete Artifact</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_ARTIFACT__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 4; + + /** + * The operation id for the '<em>Start Flow</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_FLOW__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 5; + + /** + * The operation id for the '<em>Start Worker</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_WORKER__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 6; + + /** + * The operation id for the '<em>Start Service</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_SERVICE__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 7; + + /** + * The operation id for the '<em>Start App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___START_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 8; + + /** + * The operation id for the '<em>Stop App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 9; + + /** + * The operation id for the '<em>Delete App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_APP__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 10; + + /** + * The operation id for the '<em>Load Preferences App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_APP__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 11; + + /** + * The operation id for the '<em>Load Preferences Flow</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 12; + + /** + * The operation id for the '<em>Load Preferences Name Space</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 13; + + /** + * The operation id for the '<em>Set Preferences App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_APP__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 14; + + /** + * The operation id for the '<em>Set Preferences Flow</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 15; + + /** + * The operation id for the '<em>Set Preferences Worker</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 16; + + /** + * The operation id for the '<em>Set Preferences Service</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 17; + + /** + * The operation id for the '<em>Set Preferences Name Space</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_PREFERENCES_NAME_SPACE__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 18; + + /** + * The operation id for the '<em>Set Flow Run Time Args</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 19; + + /** + * The operation id for the '<em>Set Flowlet Instances</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 20; + + /** + * The operation id for the '<em>Stop Flow</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_FLOW__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 21; + + /** + * The operation id for the '<em>Stop Worker</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_WORKER__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 22; + + /** + * The operation id for the '<em>Stop Service</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___STOP_SERVICE__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 23; + + /** + * The operation id for the '<em>Truncate Data Set</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___TRUNCATE_DATA_SET__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 24; + + /** + * The operation id for the '<em>Delete Dataset</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_DATASET__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 25; + + /** + * The operation id for the '<em>Create Stream</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_STREAM__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 26; + + /** + * The operation id for the '<em>Delete Stream</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___DELETE_STREAM__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 27; + + /** + * The operation id for the '<em>Get Stream Events</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 28; + + /** + * The operation id for the '<em>Get Stream Stats</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 29; + + /** + * The operation id for the '<em>Send Event To Stream</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 30; + + /** + * The operation id for the '<em>Trucate Stream</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___TRUCATE_STREAM__STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 31; + + /** + * The operation id for the '<em>Set Stream Properties</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_STREAM_PROPERTIES__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 32; + + /** + * The operation id for the '<em>Restart App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___RESTART_APP__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 33; + + /** + * The operation id for the '<em>Create App</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_APP__STRING_STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 34; + + /** + * The operation id for the '<em>Create App With Config</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 35; + + /** + * The operation id for the '<em>Set Dataset Properties</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_DATASET_PROPERTIES__STRING_STRING_STRING = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 36; + + /** + * The operation id for the '<em>Set Stream TTL</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER___SET_STREAM_TTL__STRING_STRING_INT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 37; + + /** + * The number of operations of the '<em>Cdap Cluster Manager</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_MANAGER_OPERATION_COUNT = VmmanagerPackage.VIRTUAL_MACHINE_MANAGER_OPERATION_COUNT + 38; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager <em>Cdap Cluster Manager</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Cdap Cluster Manager</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager + * @generated + */ + EClass getCdapClusterManager(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + ManagerFactory getManagerFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl <em>Cdap Cluster Manager</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.ManagerPackageImpl#getCdapClusterManager() + * @generated + */ + EClass CDAP_CLUSTER_MANAGER = eINSTANCE.getCdapClusterManager(); + + } + +} //ManagerPackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java new file mode 100644 index 0000000..1ff134b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/CdapClusterManagerImpl.java @@ -0,0 +1,806 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.impl.VirtualMachineManagerImpl; +import org.openecomp.ncomp.cdap.CdapApi; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.cdap.CdapPackage; +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Cdap Cluster Manager</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.impl.CdapClusterManagerImpl#getCluster <em>Cluster</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapClusterManagerImpl extends VirtualMachineManagerImpl implements CdapClusterManager { + /** + * The cached value of the '{@link #getCluster() <em>Cluster</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCluster() + * @generated + * @ordered + */ + protected CdapCluster cluster; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapClusterManagerImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ManagerPackage.Literals.CDAP_CLUSTER_MANAGER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapCluster getCluster() { + return cluster; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + CdapCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER, newCluster, newCluster)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String createNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deployApp(String namespace, String jarfile) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String loadArtifact(String namespace, String artifactName, String jarfile, String version) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteArtifact(String namespace, String artifactName, String artifactVersion) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String startFlow(String namespace, String appName, String flowId, String extraArgs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String startWorker(String namespace, String appName, String workerId, String extraArgs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String startService(String namespace, String appName, String serviceId, String extraArgs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String startApp(String namespace, String appName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String stopApp(String namespace, String appName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteApp(String namespace, String appName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String loadPreferencesApp(String namespace, String prefsFile, String appId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String loadPreferencesFlow(String namespace, String prefsFile, String appId, String flowId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String loadPreferencesNameSpace(String namespace, String prefsFile) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesApp(String namespace, String prefsString, String appId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesFlow(String namespace, String prefsString, String appId, String flowId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesWorker(String namespace, String prefsString, String appId, String workerId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesService(String namespace, String prefsString, String appId, String serviceId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setPreferencesNameSpace(String namespace, String prefsString) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setFlowRunTimeArgs(String namespace, String appId, String flowId, String args) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setFlowletInstances(String namespace, String appId, String flowId, String flowletId, int nInstances) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String stopFlow(String namespace, String appId, String flowId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String stopWorker(String namespace, String appId, String workerId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String stopService(String namespace, String appId, String serviceId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String truncateDataSet(String namespace, String datasetName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteDataset(String namespace, String datasetName) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String createStream(String namespace, String newStreamId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String deleteStream(String namespace, String streamId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getStreamEvents(String namespace, String streamId, String startTime, String endTime, int limit) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getStreamStats(String namespace, String streamId, String startTime, String endTime, int limit) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String sendEventToStream(String namespace, String streamId, String event) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String trucateStream(String namespace, String streamId) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setStreamProperties(String namespace, String streamId, String propsFile) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String restartApp(String namespace, String appId, String progTypes) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String createApp(String namespace, String appId, String artifactName, String artifactVersion, String scope) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String createAppWithConfig(String namespace, String appId, String artifactName, String artifactVersion, String scope, String appConfig) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setDatasetProperties(String namespace, String datasetName, String datasetProperties) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String setStreamTTL(String namespace, String streamName, int ttlSeconds) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + return getCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: + return cluster != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (derivedFeatureID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER: return ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER; + default: return -1; + } + } + if (baseClass == CdapApi.class) { + switch (derivedFeatureID) { + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: return ManagerPackage.CDAP_CLUSTER_MANAGER__CLUSTER; + default: return -1; + } + } + if (baseClass == CdapApi.class) { + switch (baseFeatureID) { + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (baseOperationID) { + default: return -1; + } + } + if (baseClass == CdapApi.class) { + switch (baseOperationID) { + case CdapPackage.CDAP_API___CREATE_NAMESPACE__STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_NAMESPACE__STRING; + case CdapPackage.CDAP_API___DELETE_NAMESPACE__STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_NAMESPACE__STRING; + case CdapPackage.CDAP_API___DEPLOY_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DEPLOY_APP__STRING_STRING; + case CdapPackage.CDAP_API___LOAD_ARTIFACT__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___DELETE_ARTIFACT__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_ARTIFACT__STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_FLOW__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_WORKER__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_WORKER__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_SERVICE__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_SERVICE__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___START_APP__STRING_STRING; + case CdapPackage.CDAP_API___STOP_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_APP__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_APP__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_APP__STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_APP__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_NAME_SPACE__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_NAME_SPACE__STRING_STRING; + case CdapPackage.CDAP_API___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___STOP_FLOW__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_FLOW__STRING_STRING_STRING; + case CdapPackage.CDAP_API___STOP_WORKER__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_WORKER__STRING_STRING_STRING; + case CdapPackage.CDAP_API___STOP_SERVICE__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_SERVICE__STRING_STRING_STRING; + case CdapPackage.CDAP_API___TRUNCATE_DATA_SET__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___TRUNCATE_DATA_SET__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_DATASET__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_DATASET__STRING_STRING; + case CdapPackage.CDAP_API___CREATE_STREAM__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_STREAM__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___SEND_EVENT_TO_STREAM__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING; + case CdapPackage.CDAP_API___TRUCATE_STREAM__STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___TRUCATE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___SET_STREAM_PROPERTIES__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_PROPERTIES__STRING_STRING_STRING; + case CdapPackage.CDAP_API___RESTART_APP__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___RESTART_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___CREATE_APP__STRING_STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP__STRING_STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_DATASET_PROPERTIES__STRING_STRING_STRING: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_DATASET_PROPERTIES__STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_STREAM_TTL__STRING_STRING_INT: return ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_TTL__STRING_STRING_INT; + default: return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_NAMESPACE__STRING: + return createNamespace((String)arguments.get(0)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_NAMESPACE__STRING: + return deleteNamespace((String)arguments.get(0)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DEPLOY_APP__STRING_STRING: + return deployApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING: + return loadArtifact((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_ARTIFACT__STRING_STRING_STRING: + return deleteArtifact((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_FLOW__STRING_STRING_STRING_STRING: + return startFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_WORKER__STRING_STRING_STRING_STRING: + return startWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_SERVICE__STRING_STRING_STRING_STRING: + return startService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___START_APP__STRING_STRING: + return startApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_APP__STRING_STRING: + return stopApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_APP__STRING_STRING: + return deleteApp((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_APP__STRING_STRING_STRING: + return loadPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: + return loadPreferencesFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING: + return loadPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_APP__STRING_STRING_STRING: + return setPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: + return setPreferencesFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING: + return setPreferencesWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING: + return setPreferencesService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_PREFERENCES_NAME_SPACE__STRING_STRING: + return setPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING: + return setFlowRunTimeArgs((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT: + return setFlowletInstances((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (Integer)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_FLOW__STRING_STRING_STRING: + return stopFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_WORKER__STRING_STRING_STRING: + return stopWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___STOP_SERVICE__STRING_STRING_STRING: + return stopService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___TRUNCATE_DATA_SET__STRING_STRING: + return truncateDataSet((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_DATASET__STRING_STRING: + return deleteDataset((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_STREAM__STRING_STRING: + return createStream((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___DELETE_STREAM__STRING_STRING: + return deleteStream((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT: + return getStreamEvents((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (Integer)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT: + return getStreamStats((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (Integer)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING: + return sendEventToStream((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___TRUCATE_STREAM__STRING_STRING: + return trucateStream((String)arguments.get(0), (String)arguments.get(1)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_PROPERTIES__STRING_STRING_STRING: + return setStreamProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___RESTART_APP__STRING_STRING_STRING: + return restartApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP__STRING_STRING_STRING_STRING_STRING: + return createApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (String)arguments.get(4)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING: + return createAppWithConfig((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3), (String)arguments.get(4), (String)arguments.get(5)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_DATASET_PROPERTIES__STRING_STRING_STRING: + return setDatasetProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ManagerPackage.CDAP_CLUSTER_MANAGER___SET_STREAM_TTL__STRING_STRING_INT: + return setStreamTTL((String)arguments.get(0), (String)arguments.get(1), (Integer)arguments.get(2)); + } + return super.eInvoke(operationID, arguments); + } + +} //CdapClusterManagerImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java new file mode 100644 index 0000000..82a0dc7 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ManagerFactoryImpl extends EFactoryImpl implements ManagerFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static ManagerFactory init() { + try { + ManagerFactory theManagerFactory = (ManagerFactory)EPackage.Registry.INSTANCE.getEFactory(ManagerPackage.eNS_URI); + if (theManagerFactory != null) { + return theManagerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ManagerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ManagerPackage.CDAP_CLUSTER_MANAGER: return createCdapClusterManager(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterManager createCdapClusterManager() { + CdapClusterManagerImpl cdapClusterManager = new CdapClusterManagerImpl(); + return cdapClusterManager; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerPackage getManagerPackage() { + return (ManagerPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static ManagerPackage getPackage() { + return ManagerPackage.eINSTANCE; + } + +} //ManagerFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java new file mode 100644 index 0000000..73e9d68 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/impl/ManagerPackageImpl.java @@ -0,0 +1,199 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.vmmanager.VmmanagerPackage; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ManagerPackageImpl extends EPackageImpl implements ManagerPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapClusterManagerEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage#eNS_URI + * @see #init() + * @generated + */ + private ManagerPackageImpl() { + super(eNS_URI, ManagerFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link ManagerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ManagerPackage init() { + if (isInited) return (ManagerPackage)EPackage.Registry.INSTANCE.getEPackage(ManagerPackage.eNS_URI); + + // Obtain or create and register package + ManagerPackageImpl theManagerPackage = (ManagerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ManagerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ManagerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + VmmanagerPackage.eINSTANCE.eClass(); + ServicePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theManagerPackage.createPackageContents(); + + // Initialize created meta-data + theManagerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theManagerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ManagerPackage.eNS_URI, theManagerPackage); + return theManagerPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapClusterManager() { + return cdapClusterManagerEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerFactory getManagerFactory() { + return (ManagerFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cdapClusterManagerEClass = createEClass(CDAP_CLUSTER_MANAGER); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmmanagerPackage theVmmanagerPackage = (VmmanagerPackage)EPackage.Registry.INSTANCE.getEPackage(VmmanagerPackage.eNS_URI); + ServicePackage theServicePackage = (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + CdapPackage theCdapPackage = (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapClusterManagerEClass.getESuperTypes().add(theVmmanagerPackage.getVirtualMachineManager()); + cdapClusterManagerEClass.getESuperTypes().add(theServicePackage.getCdapClusterConfiguration()); + cdapClusterManagerEClass.getESuperTypes().add(theCdapPackage.getCdapApi()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapClusterManagerEClass, CdapClusterManager.class, "CdapClusterManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //ManagerPackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java new file mode 100644 index 0000000..2cbf36c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerAdapterFactory.java @@ -0,0 +1,277 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.*; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.cdap.CdapApi; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage + * @generated + */ +public class ManagerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ManagerSwitch<Adapter> modelSwitch = + new ManagerSwitch<Adapter>() { + @Override + public Adapter caseCdapClusterManager(CdapClusterManager object) { + return createCdapClusterManagerAdapter(); + } + @Override + public Adapter caseDcaeManager(DcaeManager object) { + return createDcaeManagerAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter caseVirtualMachineManager(VirtualMachineManager object) { + return createVirtualMachineManagerAdapter(); + } + @Override + public Adapter caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return createCdapClusterConfigurationAdapter(); + } + @Override + public Adapter caseCdapApi(CdapApi object) { + return createCdapApiAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager <em>Cdap Cluster Manager</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.CdapClusterManager + * @generated + */ + public Adapter createCdapClusterManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.manager.DcaeManager <em>Dcae Manager</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.manager.DcaeManager + * @generated + */ + public Adapter createDcaeManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi <em>South Bound Api</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy <em>South Bound Api With Proxy</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer <em>Abstract Management Server</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager <em>Virtual Machine Manager</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager + * @generated + */ + public Adapter createVirtualMachineManagerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration <em>Cdap Cluster Configuration</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration + * @generated + */ + public Adapter createCdapClusterConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapApi <em>Api</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapApi + * @generated + */ + public Adapter createCdapApiAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ManagerAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java new file mode 100644 index 0000000..72c1903 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/manager/util/ManagerSwitch.java @@ -0,0 +1,253 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.manager.util; + +import org.openecomp.dcae.controller.core.manager.DcaeManager; +import org.openecomp.dcae.controller.service.cdap.cluster.manager.*; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; + +import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager; +import org.openecomp.ncomp.cdap.CdapApi; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.manager.ManagerPackage + * @generated + */ +public class ManagerSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ManagerPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ManagerSwitch() { + if (modelPackage == null) { + modelPackage = ManagerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ManagerPackage.CDAP_CLUSTER_MANAGER: { + CdapClusterManager cdapClusterManager = (CdapClusterManager)theEObject; + T result = caseCdapClusterManager(cdapClusterManager); + if (result == null) result = caseVirtualMachineManager(cdapClusterManager); + if (result == null) result = caseCdapClusterConfiguration(cdapClusterManager); + if (result == null) result = caseCdapApi(cdapClusterManager); + if (result == null) result = caseDcaeManager(cdapClusterManager); + if (result == null) result = caseAbstractManagementServer(cdapClusterManager); + if (result == null) result = caseSouthBoundApiWithProxy(cdapClusterManager); + if (result == null) result = caseSouthBoundApi(cdapClusterManager); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Manager</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Manager</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterManager(CdapClusterManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Dcae Manager</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Dcae Manager</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeManager(DcaeManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>South Bound Api</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>South Bound Api</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>South Bound Api With Proxy</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>South Bound Api With Proxy</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Abstract Management Server</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Abstract Management Server</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Virtual Machine Manager</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Virtual Machine Manager</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineManager(VirtualMachineManager object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Configuration</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Api</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Api</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapApi(CdapApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ManagerSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java new file mode 100644 index 0000000..41d52c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterConfiguration.java @@ -0,0 +1,74 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.ncomp.cdap.CdapCluster; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Cdap Cluster Configuration</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster <em>Cluster</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterConfiguration() + * @model + * @generated + */ +public interface CdapClusterConfiguration extends EObject { + /** + * Returns the value of the '<em><b>Cluster</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Cluster</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Cluster</em>' containment reference. + * @see #setCluster(CdapCluster) + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterConfiguration_Cluster() + * @model containment="true" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + CdapCluster getCluster(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster <em>Cluster</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Cluster</em>' containment reference. + * @see #getCluster() + * @generated + */ + void setCluster(CdapCluster value); + +} // CdapClusterConfiguration diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java new file mode 100644 index 0000000..d167a7b --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterService.java @@ -0,0 +1,39 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Cdap Cluster Service</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterService() + * @model + * @generated + */ +public interface CdapClusterService extends VirtualMachineService { +} // CdapClusterService diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java new file mode 100644 index 0000000..f1f15a6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/CdapClusterServiceInstance.java @@ -0,0 +1,39 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Cdap Cluster Service Instance</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#getCdapClusterServiceInstance() + * @model + * @generated + */ +public interface CdapClusterServiceInstance extends VirtualMachineServiceInstance, CdapClusterConfiguration { +} // CdapClusterServiceInstance diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java new file mode 100644 index 0000000..7799fae --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServiceFactory.java @@ -0,0 +1,81 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage + * @generated + */ +public interface ServiceFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ServiceFactory eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServiceFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Cdap Cluster Service</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Cdap Cluster Service</em>'. + * @generated + */ + CdapClusterService createCdapClusterService(); + + /** + * Returns a new object of class '<em>Cdap Cluster Service Instance</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Cdap Cluster Service Instance</em>'. + * @generated + */ + CdapClusterServiceInstance createCdapClusterServiceInstance(); + + /** + * Returns a new object of class '<em>Cdap Cluster Configuration</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Cdap Cluster Configuration</em>'. + * @generated + */ + CdapClusterConfiguration createCdapClusterConfiguration(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + ServicePackage getServicePackage(); + +} //ServiceFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java new file mode 100644 index 0000000..fe0d0dc --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/ServicePackage.java @@ -0,0 +1,740 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service; + +import org.openecomp.dcae.controller.service.vm.VmPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen' basePackage='org.openecomp.dcae.controller.service.cdap.cluster'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface ServicePackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "service"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.dcae.controller.service.cdap.cluster.service"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "service"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ServicePackage eINSTANCE = org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl <em>Cdap Cluster Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterService() + * @generated + */ + int CDAP_CLUSTER_SERVICE = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE__CREATED; + + /** + * The feature id for the '<em><b>Instances</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__INSTANCES = VmPackage.VIRTUAL_MACHINE_SERVICE__INSTANCES; + + /** + * The feature id for the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE__MANAGER_PORT_NUMBER; + + /** + * The number of structural features of the '<em>Cdap Cluster Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_FEATURE_COUNT + 0; + + /** + * The operation id for the '<em>Deploy</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___DEPLOY__STRING_STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___DEPLOY__STRING_STRING; + + /** + * The operation id for the '<em>Undeploy</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___UNDEPLOY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UNDEPLOY__STRING; + + /** + * The operation id for the '<em>Test</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___TEST__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___TEST__STRING; + + /** + * The operation id for the '<em>Suspend</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___SUSPEND__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___SUSPEND__STRING; + + /** + * The operation id for the '<em>Resume</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___RESUME__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___RESUME__STRING; + + /** + * The operation id for the '<em>Push Manager Configuration</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___PUSH_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the '<em>Poll Manager Configuration</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___POLL_MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___POLL_MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the '<em>Manager Configuration</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___MANAGER_CONFIGURATION__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_CONFIGURATION__STRING; + + /** + * The operation id for the '<em>Manager Operation</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT = VmPackage.VIRTUAL_MACHINE_SERVICE___MANAGER_OPERATION__STRING_STRING_JSONOBJECT; + + /** + * The operation id for the '<em>Update Configuration From Policy</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_CONFIGURATION_FROM_POLICY__STRING; + + /** + * The operation id for the '<em>Run Health Tests</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___RUN_HEALTH_TESTS = VmPackage.VIRTUAL_MACHINE_SERVICE___RUN_HEALTH_TESTS; + + /** + * The operation id for the '<em>Update Deployment Status</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE___UPDATE_DEPLOYMENT_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE___UPDATE_DEPLOYMENT_STATUS; + + /** + * The number of operations of the '<em>Cdap Cluster Service</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl <em>Cdap Cluster Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterServiceInstance() + * @generated + */ + int CDAP_CLUSTER_SERVICE_INSTANCE = 1; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__NAME = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LAST_POLLED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LAST_CHANGED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CREATED = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CREATED; + + /** + * The feature id for the '<em><b>Service Container</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVICE_CONTAINER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_CONTAINER; + + /** + * The feature id for the '<em><b>Status</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STATUS; + + /** + * The feature id for the '<em><b>Input Streams</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__INPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__INPUT_STREAMS; + + /** + * The feature id for the '<em><b>Output Streams</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__OUTPUT_STREAMS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OUTPUT_STREAMS; + + /** + * The feature id for the '<em><b>Last Health Test</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LAST_HEALTH_TEST = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LAST_HEALTH_TEST; + + /** + * The feature id for the '<em><b>Health Test Status</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__HEALTH_TEST_STATUS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_STATUS; + + /** + * The feature id for the '<em><b>Health Test Message Code</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__HEALTH_TEST_MESSAGE_CODE; + + /** + * The feature id for the '<em><b>Configuration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CONFIGURATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CONFIGURATION; + + /** + * The feature id for the '<em><b>Location</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LOCATION = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LOCATION; + + /** + * The feature id for the '<em><b>Vm Type</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__VM_TYPE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__VM_TYPE; + + /** + * The feature id for the '<em><b>Users</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__USERS; + + /** + * The feature id for the '<em><b>Admin Users</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__ADMIN_USERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_USERS; + + /** + * The feature id for the '<em><b>Application Ids</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__APPLICATION_IDS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__APPLICATION_IDS; + + /** + * The feature id for the '<em><b>Admin Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__ADMIN_ID = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__ADMIN_ID; + + /** + * The feature id for the '<em><b>Number Of Servers</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__NUMBER_OF_SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__NUMBER_OF_SERVERS; + + /** + * The feature id for the '<em><b>Availability Zone</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__AVAILABILITY_ZONE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__AVAILABILITY_ZONE; + + /** + * The feature id for the '<em><b>Manager Port Number</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__MANAGER_PORT_NUMBER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__MANAGER_PORT_NUMBER; + + /** + * The feature id for the '<em><b>Servers</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVERS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVERS; + + /** + * The feature id for the '<em><b>Leader Server</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__LEADER_SERVER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__LEADER_SERVER; + + /** + * The feature id for the '<em><b>Service</b></em>' container reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVICE = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE; + + /** + * The feature id for the '<em><b>Ieds Admin</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__IEDS_ADMIN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__IEDS_ADMIN; + + /** + * The feature id for the '<em><b>Chef User</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CHEF_USER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_USER; + + /** + * The feature id for the '<em><b>Chef Org</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CHEF_ORG = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_ORG; + + /** + * The feature id for the '<em><b>Chef Topology</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CHEF_TOPOLOGY = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__CHEF_TOPOLOGY; + + /** + * The feature id for the '<em><b>Openstack Flavor</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__OPENSTACK_FLAVOR = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__OPENSTACK_FLAVOR; + + /** + * The feature id for the '<em><b>Service Fqdn</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__SERVICE_FQDN = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__SERVICE_FQDN; + + /** + * The feature id for the '<em><b>Deployment Timeout Minutes</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__DEPLOYMENT_TIMEOUT_MINUTES; + + /** + * The feature id for the '<em><b>Steps</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__STEPS = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE__STEPS; + + /** + * The feature id for the '<em><b>Cluster</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Cdap Cluster Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE_FEATURE_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Cdap Cluster Service Instance</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_SERVICE_INSTANCE_OPERATION_COUNT = VmPackage.VIRTUAL_MACHINE_SERVICE_INSTANCE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl <em>Cdap Cluster Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterConfiguration() + * @generated + */ + int CDAP_CLUSTER_CONFIGURATION = 2; + + /** + * The feature id for the '<em><b>Cluster</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_CONFIGURATION__CLUSTER = 0; + + /** + * The number of structural features of the '<em>Cdap Cluster Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Cdap Cluster Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDAP_CLUSTER_CONFIGURATION_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService <em>Cdap Cluster Service</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Cdap Cluster Service</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService + * @generated + */ + EClass getCdapClusterService(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance <em>Cdap Cluster Service Instance</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Cdap Cluster Service Instance</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance + * @generated + */ + EClass getCdapClusterServiceInstance(); + + /** + * Returns the meta object for class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration <em>Cdap Cluster Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Cdap Cluster Configuration</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration + * @generated + */ + EClass getCdapClusterConfiguration(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster <em>Cluster</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Cluster</em>'. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration#getCluster() + * @see #getCdapClusterConfiguration() + * @generated + */ + EReference getCdapClusterConfiguration_Cluster(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + ServiceFactory getServiceFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl <em>Cdap Cluster Service</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterService() + * @generated + */ + EClass CDAP_CLUSTER_SERVICE = eINSTANCE.getCdapClusterService(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl <em>Cdap Cluster Service Instance</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterServiceInstance() + * @generated + */ + EClass CDAP_CLUSTER_SERVICE_INSTANCE = eINSTANCE.getCdapClusterServiceInstance(); + + /** + * The meta object literal for the '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl <em>Cdap Cluster Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.impl.ServicePackageImpl#getCdapClusterConfiguration() + * @generated + */ + EClass CDAP_CLUSTER_CONFIGURATION = eINSTANCE.getCdapClusterConfiguration(); + + /** + * The meta object literal for the '<em><b>Cluster</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CDAP_CLUSTER_CONFIGURATION__CLUSTER = eINSTANCE.getCdapClusterConfiguration_Cluster(); + + } + +} //ServicePackage diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java new file mode 100644 index 0000000..53ae6de --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterConfigurationImpl.java @@ -0,0 +1,198 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; + +import org.openecomp.ncomp.cdap.CdapCluster; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Cdap Cluster Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterConfigurationImpl#getCluster <em>Cluster</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapClusterConfigurationImpl extends MinimalEObjectImpl.Container implements CdapClusterConfiguration { + /** + * The cached value of the '{@link #getCluster() <em>Cluster</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCluster() + * @generated + * @ordered + */ + protected CdapCluster cluster; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapClusterConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CDAP_CLUSTER_CONFIGURATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapCluster getCluster() { + return cluster; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + CdapCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER, newCluster, newCluster)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + return getCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: + return cluster != null; + } + return super.eIsSet(featureID); + } + +} //CdapClusterConfigurationImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java new file mode 100644 index 0000000..2021586 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Cdap Cluster Service</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public class CdapClusterServiceImpl extends VirtualMachineServiceImpl implements CdapClusterService { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapClusterServiceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CDAP_CLUSTER_SERVICE; + } + +} //CdapClusterServiceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java new file mode 100644 index 0000000..7e31876 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/CdapClusterServiceInstanceImpl.java @@ -0,0 +1,232 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; + +import org.openecomp.dcae.controller.service.vm.impl.VirtualMachineServiceInstanceImpl; + +import org.openecomp.ncomp.cdap.CdapCluster; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Cdap Cluster Service Instance</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.dcae.controller.service.cdap.cluster.service.impl.CdapClusterServiceInstanceImpl#getCluster <em>Cluster</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CdapClusterServiceInstanceImpl extends VirtualMachineServiceInstanceImpl implements CdapClusterServiceInstance { + /** + * The cached value of the '{@link #getCluster() <em>Cluster</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCluster() + * @generated + * @ordered + */ + protected CdapCluster cluster; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CdapClusterServiceInstanceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServicePackage.Literals.CDAP_CLUSTER_SERVICE_INSTANCE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapCluster getCluster() { + return cluster; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + CdapCluster oldCluster = cluster; + cluster = newCluster; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, oldCluster, newCluster); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != cluster) { + NotificationChain msgs = null; + if (cluster != null) + msgs = ((InternalEObject)cluster).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, null, msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, null, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER, newCluster, newCluster)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + return getCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: + return cluster != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (derivedFeatureID) { + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER: return ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { + if (baseClass == CdapClusterConfiguration.class) { + switch (baseFeatureID) { + case ServicePackage.CDAP_CLUSTER_CONFIGURATION__CLUSTER: return ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE__CLUSTER; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} //CdapClusterServiceInstanceImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java new file mode 100644 index 0000000..fee555f --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServiceFactoryImpl.java @@ -0,0 +1,138 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ServiceFactoryImpl extends EFactoryImpl implements ServiceFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static ServiceFactory init() { + try { + ServiceFactory theServiceFactory = (ServiceFactory)EPackage.Registry.INSTANCE.getEFactory(ServicePackage.eNS_URI); + if (theServiceFactory != null) { + return theServiceFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServiceFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServiceFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServicePackage.CDAP_CLUSTER_SERVICE: return createCdapClusterService(); + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE: return createCdapClusterServiceInstance(); + case ServicePackage.CDAP_CLUSTER_CONFIGURATION: return createCdapClusterConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterService createCdapClusterService() { + CdapClusterServiceImpl cdapClusterService = new CdapClusterServiceImpl(); + return cdapClusterService; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterServiceInstance createCdapClusterServiceInstance() { + CdapClusterServiceInstanceImpl cdapClusterServiceInstance = new CdapClusterServiceInstanceImpl(); + return cdapClusterServiceInstance; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CdapClusterConfiguration createCdapClusterConfiguration() { + CdapClusterConfigurationImpl cdapClusterConfiguration = new CdapClusterConfigurationImpl(); + return cdapClusterConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServicePackage getServicePackage() { + return (ServicePackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static ServicePackage getPackage() { + return ServicePackage.eINSTANCE; + } + +} //ServiceFactoryImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java new file mode 100644 index 0000000..f39f5c0 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/impl/ServicePackageImpl.java @@ -0,0 +1,289 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.impl; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService; +import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServiceFactory; +import org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage; +import org.openecomp.dcae.controller.service.vm.VmPackage; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ServicePackageImpl extends EPackageImpl implements ServicePackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapClusterServiceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapClusterServiceInstanceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass cdapClusterConfigurationEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage#eNS_URI + * @see #init() + * @generated + */ + private ServicePackageImpl() { + super(eNS_URI, ServiceFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link ServicePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServicePackage init() { + if (isInited) return (ServicePackage)EPackage.Registry.INSTANCE.getEPackage(ServicePackage.eNS_URI); + + // Obtain or create and register package + ServicePackageImpl theServicePackage = (ServicePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServicePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServicePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CdapPackage.eINSTANCE.eClass(); + VmPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServicePackage.createPackageContents(); + + // Initialize created meta-data + theServicePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServicePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServicePackage.eNS_URI, theServicePackage); + return theServicePackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapClusterService() { + return cdapClusterServiceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapClusterServiceInstance() { + return cdapClusterServiceInstanceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getCdapClusterConfiguration() { + return cdapClusterConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCdapClusterConfiguration_Cluster() { + return (EReference)cdapClusterConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServiceFactory getServiceFactory() { + return (ServiceFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cdapClusterServiceEClass = createEClass(CDAP_CLUSTER_SERVICE); + + cdapClusterServiceInstanceEClass = createEClass(CDAP_CLUSTER_SERVICE_INSTANCE); + + cdapClusterConfigurationEClass = createEClass(CDAP_CLUSTER_CONFIGURATION); + createEReference(cdapClusterConfigurationEClass, CDAP_CLUSTER_CONFIGURATION__CLUSTER); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + VmPackage theVmPackage = (VmPackage)EPackage.Registry.INSTANCE.getEPackage(VmPackage.eNS_URI); + CdapPackage theCdapPackage = (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapClusterServiceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineService()); + cdapClusterServiceInstanceEClass.getESuperTypes().add(theVmPackage.getVirtualMachineServiceInstance()); + cdapClusterServiceInstanceEClass.getESuperTypes().add(this.getCdapClusterConfiguration()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapClusterServiceEClass, CdapClusterService.class, "CdapClusterService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(cdapClusterServiceInstanceEClass, CdapClusterServiceInstance.class, "CdapClusterServiceInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(cdapClusterConfigurationEClass, CdapClusterConfiguration.class, "CdapClusterConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapClusterConfiguration_Cluster(), theCdapPackage.getCdapCluster(), null, "cluster", null, 0, 1, CdapClusterConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for <b>http://www.eclipse.org/emf/2011/Xcore</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for <b>http://openecomp.org</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getCdapClusterConfiguration_Cluster(), + source, + new String[] { + "type", "configuration" + }); + } + +} //ServicePackageImpl diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java new file mode 100644 index 0000000..1e8146a --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceAdapterFactory.java @@ -0,0 +1,294 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage + * @generated + */ +public class ServiceAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServiceAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ServiceSwitch<Adapter> modelSwitch = + new ServiceSwitch<Adapter>() { + @Override + public Adapter caseCdapClusterService(CdapClusterService object) { + return createCdapClusterServiceAdapter(); + } + @Override + public Adapter caseCdapClusterServiceInstance(CdapClusterServiceInstance object) { + return createCdapClusterServiceInstanceAdapter(); + } + @Override + public Adapter caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return createCdapClusterConfigurationAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseDcaeService(DcaeService object) { + return createDcaeServiceAdapter(); + } + @Override + public Adapter caseVirtualMachineService(VirtualMachineService object) { + return createVirtualMachineServiceAdapter(); + } + @Override + public Adapter caseDcaeServiceInstance(DcaeServiceInstance object) { + return createDcaeServiceInstanceAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return createVirtualMachineServiceConfigurationAdapter(); + } + @Override + public Adapter caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return createVirtualMachineServiceInstanceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService <em>Cdap Cluster Service</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterService + * @generated + */ + public Adapter createCdapClusterServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance <em>Cdap Cluster Service Instance</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterServiceInstance + * @generated + */ + public Adapter createCdapClusterServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration <em>Cdap Cluster Configuration</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration + * @generated + */ + public Adapter createCdapClusterConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity <em>Named Entity</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeService <em>Dcae Service</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeService + * @generated + */ + public Adapter createDcaeServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineService <em>Virtual Machine Service</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineService + * @generated + */ + public Adapter createVirtualMachineServiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.core.service.DcaeServiceInstance <em>Dcae Service Instance</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.core.service.DcaeServiceInstance + * @generated + */ + public Adapter createDcaeServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration <em>Virtual Machine Service Configuration</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration + * @generated + */ + public Adapter createVirtualMachineServiceConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance <em>Virtual Machine Service Instance</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance + * @generated + */ + public Adapter createVirtualMachineServiceInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServiceAdapterFactory diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java new file mode 100644 index 0000000..3d25b7c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/cdap/cluster/service/util/ServiceSwitch.java @@ -0,0 +1,280 @@ + +/*- + * ============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.dcae.controller.service.cdap.cluster.service.util; + +import org.openecomp.dcae.controller.core.service.DcaeService; +import org.openecomp.dcae.controller.core.service.DcaeServiceInstance; + +import org.openecomp.dcae.controller.service.cdap.cluster.service.*; + +import org.openecomp.dcae.controller.service.vm.VirtualMachineService; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceConfiguration; +import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * @see org.openecomp.dcae.controller.service.cdap.cluster.service.ServicePackage + * @generated + */ +public class ServiceSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ServicePackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ServiceSwitch() { + if (modelPackage == null) { + modelPackage = ServicePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServicePackage.CDAP_CLUSTER_SERVICE: { + CdapClusterService cdapClusterService = (CdapClusterService)theEObject; + T result = caseCdapClusterService(cdapClusterService); + if (result == null) result = caseVirtualMachineService(cdapClusterService); + if (result == null) result = caseDcaeService(cdapClusterService); + if (result == null) result = caseNamedEntity(cdapClusterService); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CDAP_CLUSTER_SERVICE_INSTANCE: { + CdapClusterServiceInstance cdapClusterServiceInstance = (CdapClusterServiceInstance)theEObject; + T result = caseCdapClusterServiceInstance(cdapClusterServiceInstance); + if (result == null) result = caseVirtualMachineServiceInstance(cdapClusterServiceInstance); + if (result == null) result = caseCdapClusterConfiguration(cdapClusterServiceInstance); + if (result == null) result = caseDcaeServiceInstance(cdapClusterServiceInstance); + if (result == null) result = caseVirtualMachineServiceConfiguration(cdapClusterServiceInstance); + if (result == null) result = caseNamedEntity(cdapClusterServiceInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServicePackage.CDAP_CLUSTER_CONFIGURATION: { + CdapClusterConfiguration cdapClusterConfiguration = (CdapClusterConfiguration)theEObject; + T result = caseCdapClusterConfiguration(cdapClusterConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Service</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Service</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterService(CdapClusterService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Service Instance</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Service Instance</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterServiceInstance(CdapClusterServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Cdap Cluster Configuration</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Cdap Cluster Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapClusterConfiguration(CdapClusterConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Dcae Service</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Dcae Service</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeService(DcaeService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Virtual Machine Service</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Virtual Machine Service</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineService(VirtualMachineService object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Dcae Service Instance</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Dcae Service Instance</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDcaeServiceInstance(DcaeServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Virtual Machine Service Configuration</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Virtual Machine Service Configuration</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceConfiguration(VirtualMachineServiceConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Virtual Machine Service Instance</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Virtual Machine Service Instance</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVirtualMachineServiceInstance(VirtualMachineServiceInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServiceSwitch diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore new file mode 100644 index 0000000..0ab71f6 --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/manager.xcore @@ -0,0 +1,33 @@ + +/*- + * ============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============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen")
+
+
+package org.openecomp.dcae.controller.service.cdap.cluster.manager
+
+import org.openecomp.dcae.controller.service.cdap.cluster.service.CdapClusterConfiguration
+import org.openecomp.dcae.controller.service.vmmanager.VirtualMachineManager
+import org.openecomp.ncomp.cdap.CdapApi
+
+// state of manager
+class CdapClusterManager extends VirtualMachineManager, CdapClusterConfiguration, CdapApi {
+}
\ No newline at end of file diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore new file mode 100644 index 0000000..0b3c18c --- /dev/null +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/src/main/xcore/service.xcore @@ -0,0 +1,46 @@ + +/*- + * ============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============================================ + */ + +@GenModel(modelDirectory="/dcae-controller-service-cdap-cluster-model/src/main/xcore-gen")
+
+package org.openecomp.dcae.controller.service.cdap.cluster.service
+
+import org.openecomp.dcae.controller.service.vm.VirtualMachineService
+import org.openecomp.dcae.controller.service.vm.VirtualMachineServiceInstance
+import org.openecomp.ncomp.cdap.CdapCluster
+
+annotation "http://openecomp.org" as ecomp
+
+class CdapClusterService extends VirtualMachineService {
+}
+
+// state in the controller
+class CdapClusterServiceInstance extends VirtualMachineServiceInstance, CdapClusterConfiguration {
+}
+
+// state in both controller and manager
+class CdapClusterConfiguration {
+ @ecomp(^type = "configuration")
+ contains CdapCluster cluster
+}
+
+
+
|