From b325c948f0e321fd97db652b4bdc2d7a7f2dcee6 Mon Sep 17 00:00:00 2001 From: lj1412 Date: Tue, 14 Feb 2017 15:11:08 +0000 Subject: Init ncomp.cdap Change-Id: I51db6a0420bbdef8441642359a2c9c5662899a2c Signed-off-by: lj1412 --- .gitignore | 1 + .gitreview | 4 + LICENSE.txt | 22 + README.md | 8 + deptree.text | 1 + ncomp-cdap-adaptor/.classpath | 27 + ncomp-cdap-adaptor/.gitignore | 1 + ncomp-cdap-adaptor/.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-cdap-adaptor/LICENSE.txt | 22 + ncomp-cdap-adaptor/META-INF/MANIFEST.MF | 14 + ncomp-cdap-adaptor/build.properties | 3 + ncomp-cdap-adaptor/config/cdap.properties | 9 + ncomp-cdap-adaptor/pom.xml | 188 ++ ncomp-cdap-adaptor/src/assembly/assemble_zip.xml | 61 + .../ncomp/cdap/adaptor/tools/Generator.java | 76 + .../servers/cdap/CdapCdapAdaptorProvider.java | 63 + .../servers/cdap/CdapCdapClusterProvider.java | 447 +++ .../openecomp/ncomp/servers/cdap/TestPolling.java | 51 + .../servers/cdap/gui/CdapGuiClientApiProvider.java | 78 + .../main/server-gen/bin/cdap-adaptor-controller | 138 + .../src/main/server/config/adaptor.properties | 7 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/log4j.properties | 24 + ncomp-cdap-adaptor/src/main/server/config/makefile | 9 + ncomp-cdap-adaptor/src/main/server/config/pw.sh.sh | 15 + .../src/main/server/scripts/console.groovy | 27 + .../src/main/sirius-gen/CdapAdaptor.yaml | 3 + .../src/main/sirius-gen/CdapCluster.yaml | 432 +++ .../src/main/sirius-gen/GuiClientApi.yaml | 69 + .../ncomp/servers/cdap/CdapCdapAdaptor.java | 76 + .../ncomp/servers/cdap/CdapCdapAdaptorClient.java | 72 + .../ncomp/servers/cdap/CdapCdapAdaptorConsole.java | 63 + .../cdap/CdapCdapAdaptorProviderTemplate.java | 63 + .../ncomp/servers/cdap/CdapCdapAdaptorServer.java | 114 + .../ncomp/servers/cdap/CdapCdapCluster.java | 1056 +++++++ .../ncomp/servers/cdap/CdapCdapClusterClient.java | 736 +++++ .../ncomp/servers/cdap/CdapCdapClusterConsole.java | 486 +++ .../cdap/CdapCdapClusterProviderTemplate.java | 299 ++ .../ncomp/servers/cdap/CdapCdapFactory.java | 60 + .../ncomp/servers/cdap/gui/CdapGuiClientApi.java | 256 ++ .../servers/cdap/gui/CdapGuiClientApiClient.java | 175 ++ .../servers/cdap/gui/CdapGuiClientApiConsole.java | 123 + .../cdap/gui/CdapGuiClientApiProviderTemplate.java | 78 + .../ncomp/servers/cdap/gui/CdapModelFactory.java | 54 + .../cdap/gui/logging/GuiClientApi.properties | 78 + .../cdap/gui/logging/GuiClientApiMessageEnum.java | 47 + .../gui/logging/GuiClientApiOperationEnum.java | 41 + .../servers/cdap/logging/CdapAdaptor.properties | 6 + .../cdap/logging/CdapAdaptorMessageEnum.java | 35 + .../cdap/logging/CdapAdaptorOperationEnum.java | 29 + .../servers/cdap/logging/CdapCluster.properties | 474 +++ .../cdap/logging/CdapClusterMessageEnum.java | 113 + .../cdap/logging/CdapClusterOperationEnum.java | 107 + ncomp-cdap-model/.classpath | 17 + ncomp-cdap-model/.gitignore | 2 + ncomp-cdap-model/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-cdap-model/LICENSE.txt | 22 + ncomp-cdap-model/META-INF/MANIFEST.MF | 21 + ncomp-cdap-model/build.properties | 11 + ncomp-cdap-model/plugin.properties | 4 + ncomp-cdap-model/plugin.xml | 17 + ncomp-cdap-model/pom.xml | 18 + .../org/openecomp/ncomp/cdap/CdapAdaptor.java | 39 + .../org/openecomp/ncomp/cdap/CdapApi.java | 345 +++ .../org/openecomp/ncomp/cdap/CdapApplication.java | 179 ++ .../org/openecomp/ncomp/cdap/CdapArtifact.java | 98 + .../org/openecomp/ncomp/cdap/CdapCluster.java | 173 ++ .../openecomp/ncomp/cdap/CdapConfiguration.java | 98 + .../org/openecomp/ncomp/cdap/CdapDataset.java | 117 + .../openecomp/ncomp/cdap/CdapDatasetSchema.java | 90 + .../ncomp/cdap/CdapDatasetSchemaField.java | 71 + .../ncomp/cdap/CdapEntityWithPreferences.java | 63 + .../org/openecomp/ncomp/cdap/CdapFactory.java | 162 + .../org/openecomp/ncomp/cdap/CdapKeyPair.java | 71 + .../org/openecomp/ncomp/cdap/CdapNamespace.java | 153 + .../org/openecomp/ncomp/cdap/CdapPackage.java | 3197 ++++++++++++++++++++ .../openecomp/ncomp/cdap/impl/CdapAdaptorImpl.java | 62 + .../org/openecomp/ncomp/cdap/impl/CdapApiImpl.java | 572 ++++ .../ncomp/cdap/impl/CdapApplicationImpl.java | 428 +++ .../ncomp/cdap/impl/CdapArtifactImpl.java | 239 ++ .../openecomp/ncomp/cdap/impl/CdapClusterImpl.java | 981 ++++++ .../ncomp/cdap/impl/CdapConfigurationImpl.java | 239 ++ .../openecomp/ncomp/cdap/impl/CdapDatasetImpl.java | 311 ++ .../cdap/impl/CdapDatasetSchemaFieldImpl.java | 185 ++ .../ncomp/cdap/impl/CdapDatasetSchemaImpl.java | 244 ++ .../cdap/impl/CdapEntityWithPreferencesImpl.java | 173 ++ .../openecomp/ncomp/cdap/impl/CdapFactoryImpl.java | 237 ++ .../openecomp/ncomp/cdap/impl/CdapKeyPairImpl.java | 185 ++ .../ncomp/cdap/impl/CdapNamespaceImpl.java | 415 +++ .../openecomp/ncomp/cdap/impl/CdapPackageImpl.java | 1325 ++++++++ .../ncomp/cdap/util/CdapAdapterFactory.java | 359 +++ .../org/openecomp/ncomp/cdap/util/CdapSwitch.java | 390 +++ ncomp-cdap-model/src/main/xcore/adaptor.xcore | 171 ++ pom.xml | 80 + 101 files changed, 18093 insertions(+) create mode 100644 .gitignore create mode 100644 .gitreview create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 deptree.text create mode 100644 ncomp-cdap-adaptor/.classpath create mode 100644 ncomp-cdap-adaptor/.gitignore create mode 100644 ncomp-cdap-adaptor/.project create mode 100644 ncomp-cdap-adaptor/.settings/org.eclipse.core.resources.prefs create mode 100644 ncomp-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 ncomp-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-cdap-adaptor/LICENSE.txt create mode 100644 ncomp-cdap-adaptor/META-INF/MANIFEST.MF create mode 100644 ncomp-cdap-adaptor/build.properties create mode 100644 ncomp-cdap-adaptor/config/cdap.properties create mode 100644 ncomp-cdap-adaptor/pom.xml create mode 100644 ncomp-cdap-adaptor/src/assembly/assemble_zip.xml create mode 100644 ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java create mode 100644 ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProvider.java create mode 100644 ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java create mode 100644 ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/TestPolling.java create mode 100644 ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProvider.java create mode 100644 ncomp-cdap-adaptor/src/main/server-gen/bin/cdap-adaptor-controller create mode 100644 ncomp-cdap-adaptor/src/main/server/config/adaptor.properties create mode 100644 ncomp-cdap-adaptor/src/main/server/config/console.properties create mode 100644 ncomp-cdap-adaptor/src/main/server/config/gui.properties create mode 100644 ncomp-cdap-adaptor/src/main/server/config/log4j.properties create mode 100644 ncomp-cdap-adaptor/src/main/server/config/makefile create mode 100644 ncomp-cdap-adaptor/src/main/server/config/pw.sh.sh create mode 100644 ncomp-cdap-adaptor/src/main/server/scripts/console.groovy create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/CdapAdaptor.yaml create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/CdapCluster.yaml create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptor.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorClient.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorConsole.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProviderTemplate.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorServer.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapFactory.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApi.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiClient.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiConsole.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProviderTemplate.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapModelFactory.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApi.properties create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiMessageEnum.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiOperationEnum.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptor.properties create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorMessageEnum.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorOperationEnum.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapCluster.properties create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterMessageEnum.java create mode 100644 ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterOperationEnum.java create mode 100644 ncomp-cdap-model/.classpath create mode 100644 ncomp-cdap-model/.gitignore create mode 100644 ncomp-cdap-model/.project create mode 100644 ncomp-cdap-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-cdap-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-cdap-model/LICENSE.txt create mode 100644 ncomp-cdap-model/META-INF/MANIFEST.MF create mode 100644 ncomp-cdap-model/build.properties create mode 100644 ncomp-cdap-model/plugin.properties create mode 100644 ncomp-cdap-model/plugin.xml create mode 100644 ncomp-cdap-model/pom.xml create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapAdaptor.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApi.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApplication.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapArtifact.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapCluster.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapConfiguration.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDataset.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDatasetSchema.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDatasetSchemaField.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapEntityWithPreferences.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapFactory.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapKeyPair.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapNamespace.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapPackage.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapAdaptorImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApiImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApplicationImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapArtifactImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapClusterImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapConfigurationImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetSchemaFieldImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetSchemaImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapEntityWithPreferencesImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapFactoryImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapKeyPairImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapNamespaceImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapPackageImpl.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/util/CdapAdapterFactory.java create mode 100644 ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/util/CdapSwitch.java create mode 100644 ncomp-cdap-model/src/main/xcore/adaptor.xcore create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..35350ed --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.openecomp.org +port=29418 +project=ncomp/cdap.git diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============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============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/README.md b/README.md new file mode 100644 index 0000000..50c69dd --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ + +Generic CDAP Adaptor + +# Build instructions + +1. Clone the repository +2. Build using Maven: mvn clean install + diff --git a/deptree.text b/deptree.text new file mode 100644 index 0000000..982a7de --- /dev/null +++ b/deptree.text @@ -0,0 +1 @@ +org.openecomp.ncomp.cdap:ncomp-cdap:pom:0.1.0-SNAPSHOT diff --git a/ncomp-cdap-adaptor/.classpath b/ncomp-cdap-adaptor/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/ncomp-cdap-adaptor/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-cdap-adaptor/.gitignore b/ncomp-cdap-adaptor/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-cdap-adaptor/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-cdap-adaptor/.project b/ncomp-cdap-adaptor/.project new file mode 100644 index 0000000..85d38ce --- /dev/null +++ b/ncomp-cdap-adaptor/.project @@ -0,0 +1,35 @@ + + + ncomp-cdap-adaptor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/ncomp-cdap-adaptor/.settings/org.eclipse.core.resources.prefs b/ncomp-cdap-adaptor/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/ncomp-cdap-adaptor/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs b/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs b/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/ncomp-cdap-adaptor/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/ncomp-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs b/ncomp-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-cdap-adaptor/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-cdap-adaptor/LICENSE.txt b/ncomp-cdap-adaptor/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-cdap-adaptor/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============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============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-cdap-adaptor/META-INF/MANIFEST.MF b/ncomp-cdap-adaptor/META-INF/MANIFEST.MF new file mode 100644 index 0000000..9da1c17 --- /dev/null +++ b/ncomp-cdap-adaptor/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: ncomp-cdap-adaptor +Bundle-SymbolicName: ncomp-cdap-adaptor +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.ncomp.cdap.adaptor.tools, + org.openecomp.ncomp.servers.cdap +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + ncomp-cdap-model;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/ncomp-cdap-adaptor/build.properties b/ncomp-cdap-adaptor/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/ncomp-cdap-adaptor/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/ncomp-cdap-adaptor/config/cdap.properties b/ncomp-cdap-adaptor/config/cdap.properties new file mode 100644 index 0000000..f015f96 --- /dev/null +++ b/ncomp-cdap-adaptor/config/cdap.properties @@ -0,0 +1,9 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = 9991 +server.user.console = ZWJlY2RlMjdkN2FlMWUx + +cluster.endpoint=foobar +cluster.user=foo +cluster.password=bar diff --git a/ncomp-cdap-adaptor/pom.xml b/ncomp-cdap-adaptor/pom.xml new file mode 100644 index 0000000..ea48265 --- /dev/null +++ b/ncomp-cdap-adaptor/pom.xml @@ -0,0 +1,188 @@ + + 4.0.0 + org.openecomp.ncomp.cdap + ncomp-cdap-adaptor + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + attach-artifacts + package + + attach-artifact + + + + + target/${project.artifactId}-${project.version}-runtime.zip + zip + runtime + + + + + + + + + + + + org.openecomp.ncomp.cdap + ncomp-cdap-model + ${project.version} + + + diff --git a/ncomp-cdap-adaptor/src/assembly/assemble_zip.xml b/ncomp-cdap-adaptor/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..458e844 --- /dev/null +++ b/ncomp-cdap-adaptor/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + ncomp-cdap-adaptor-${project.artifactId}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java new file mode 100644 index 0000000..e61709d --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/cdap/adaptor/tools/Generator.java @@ -0,0 +1,76 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.cdap.adaptor.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.utils.YamlToJava; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.ncomp.cdap.CdapFactory; + + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + ServerPackage f = ServerPackage.eINSTANCE; + EObject o = CdapFactory.eINSTANCE.createCdapAdaptor(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix(); + dir= "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Cdap"); + m.setPluginName(p.getNsURI()); + m.setName("Cdap"); + m.setTitle("Cdap"); + ControllerGenerator g = new ControllerGenerator(o,m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(false); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + EObject c = CdapFactory.eINSTANCE.createCdapCluster(); + g.addApi("cluster", c , m, false, true); + g.addObject("gui",gui,m); + //EObject e = adaptorFactory.eINSTANCE.createVpnEnterprise(); + //g.addApi("e",e,m); + //g.addFactory("org.openecomp.ncomp.sirius.servers.openstack.OsOpenstackFactory"); + //g.enableDrools(); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin","cdap-adaptor"); + String pName = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".logging"; +// YamlToJava.convert("src/main/resources/DcaeServiceCdapHost.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CdapAdaptor.yaml", dir + "/logging", pName); + YamlToJava.convert("src/main/sirius-gen/CdapCluster.yaml", dir + "/logging", pName); + String pName1 = p.getNsURI().replaceAll(p.getNsPrefix()+'$',"") + "servers." + p.getNsPrefix() +".gui.logging"; + YamlToJava.convert("src/main/sirius-gen/GuiClientApi.yaml", dir + "/gui/logging", pName1); + } + + +} diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProvider.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProvider.java new file mode 100644 index 0000000..2657124 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProvider.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.ncomp.servers.cdap; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl; +import org.openecomp.ncomp.cdap.CdapAdaptor; + + +public class CdapCdapAdaptorProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(CdapCdapAdaptorProvider.class); + CdapAdaptor o; + + public CdapCdapAdaptorProvider(ISiriusServer controller, CdapAdaptor o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java new file mode 100644 index 0000000..84ce4a3 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProvider.java @@ -0,0 +1,447 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.servers.cdap; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.Jetty8Client; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONArray; +import org.json.JSONObject; + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; +import org.openecomp.ncomp.cdap.CdapApplication; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.cdap.CdapConfiguration; +import org.openecomp.ncomp.cdap.CdapDataset; +import org.openecomp.ncomp.cdap.CdapNamespace; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +public class CdapCdapClusterProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(CdapCdapClusterProvider.class); + CdapCluster o; + protected Date lastPoll; + + public CdapCdapClusterProvider(ISiriusServer controller, CdapCluster o) { + super(controller, o); + this.o = o; + } + + public void poll() { +// System.err.println("XXXX poll"); + lastPoll = new Date(); + Jetty8Client c = new Jetty8Client("cdap.properties", "cluster"); + c.setBaseAddress(o.getBaseUrl()); + c.setDebug(true); + HashMap headers = new HashMap(); + JSONObject json; + // namespaces + json = c.httpJsonTransaction("/namespaces", "GET", headers, null); +// System.err.println("XXXX res:" + json.toString(2)); + updateNamespaces(json); + json = c.httpJsonTransaction("/config/cdap", "GET", headers, null); +// System.err.println("XXXX res:" + json.toString(2)); + updateConfig(json); + for (CdapNamespace namespace : o.getNamespaces()) { + String url = "/namespaces/" + namespace.getName() + "/data/datasets"; + json = c.httpJsonTransaction(url, "GET", headers, null); +// System.err.println("XXXX res:" + json.toString(2)); + updateDatasets(namespace, json); + url = "/namespaces/" + namespace.getName() + "/apps"; + json = c.httpJsonTransaction(url, "GET", headers, null); +// System.err.println("XXXX res:" + json.toString(2)); + updateApps(namespace, json); + } + } + + private void updateConfig(JSONObject json) { + JSONArray a = json.getJSONArray("$list"); + o.getConfigurations().clear(); + for (int i = 0; i < a.length(); i++) { + JSONObject j = a.getJSONObject(i); + CdapConfiguration configuration = (CdapConfiguration) controller.getServer().json2ecore( + CdapPackage.eINSTANCE.getCdapConfiguration(), j); +// System.err.println("XXXX " + ManagementServer.ecore2json(configuration, 100, null, true).toString(2)); + o.getConfigurations().add(configuration); + } + } + + private void updateApps(CdapNamespace namespace, JSONObject json) { + JSONArray a = json.getJSONArray("$list"); + namespace.getApplications().clear(); + for (int i = 0; i < a.length(); i++) { + JSONObject j = a.getJSONObject(i); + CdapApplication application = (CdapApplication) controller.getServer().json2ecore( + CdapPackage.eINSTANCE.getCdapApplication(), j); +// System.err.println("XXXX " + ManagementServer.ecore2json(application, 100, null, true).toString(2)); + namespace.getApplications().add(application); + } + } + + private void updateDatasets(CdapNamespace namespace, JSONObject json) { + JSONArray a = json.getJSONArray("$list"); + namespace.getDatasets().clear(); + for (int i = 0; i < a.length(); i++) { + JSONObject j = a.getJSONObject(i); + JSONObject jj = j.getJSONObject("properties"); +// System.err.println("XXXX jj:" + jj.toString(2)); + if (jj.has("schema")) { + j.put("schema", new JSONObject(jj.getString("schema"))); + jj.remove("schema"); + } + else { + j.put("schema", new JSONObject()); + } + fixMap(j, "properties"); +// System.err.println("XXXX schema:" + j.getJSONObject("schema").toString(2)); + CdapDataset dataset = (CdapDataset) controller.getServer().json2ecore( + CdapPackage.eINSTANCE.getCdapDataset(), j); +// System.err.println("XXXX " + ManagementServer.ecore2json(dataset, 100, null, true).toString(2)); + namespace.getDatasets().add(dataset); + } + } + + private void updateNamespaces(JSONObject json) { + JSONArray a = json.getJSONArray("$list"); + o.getNamespaces().clear(); + for (int i = 0; i < a.length(); i++) { + JSONObject j = a.getJSONObject(i); + fixMap(j, "config"); + CdapNamespace namespace = (CdapNamespace) controller.getServer().json2ecore( + CdapPackage.eINSTANCE.getCdapNamespace(), j); +// System.err.println("XXXX " + ManagementServer.ecore2json(namespace, 100, null, true).toString(2)); + o.getNamespaces().add(namespace); + } + } + + @Override + public void start() { + if (o.isRemote()) return; + Thread t = new Thread("cdap poller: " + o.getName()) { + @Override + public void run() { + while (true) { + try { + if (lastPoll == null || lastPoll.getTime() + o.getPollingFrequency() < new Date().getTime()) + o.poll(); + Thread.sleep(5000); // sleep 5 seconds + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("openstackPoller Thread DIED: " + e); + try { + Thread.sleep(30000); + } catch (InterruptedException e1) { + } + } + } + }; + }; + t.start(); + } + + // change JSONObject to a JSONArray with name,value objects + private void fixMap(JSONObject j, String key) { + JSONArray a = new JSONArray(); + JSONObject jjj = j.getJSONObject(key); + for (Iterator i = jjj.keys(); i.hasNext();) { + String k = i.next(); + Object v = jjj.get(k); + JSONObject jj = new JSONObject(); + jj.put("name", k); + jj.put("value", v); + a.put(jj); + } + j.put(key, a); + } + + + private String encode(String s) { + return "'" + s.replace(" ", "%SPACE%") + "'"; + } + private String decode(String s) { + return s.replace("%SPACE%", " "); + } + /** + * Use local CDAP CLI to invoke commands -- a simpler substitute for curl + * requests. Works only for single line commands. Copied from SDNL start + * shell script + * + * Returns the output from the CLI as a String + * + * TODO: For multi-line commands, send commands via STDIN TODO: Use the code + * from ScriptRunner.java + */ + public String customRunCDAPcliCommand(String namespace, String cdapCmdStr) { + String cmd = "bin/cdap-cli.sh " + "-u localhost/" + namespace + " " + cdapCmdStr; + String[] args = cmd.split(" "); + for (int i =0; i getStreamEvents(String namespace, String streamId, String startTime, String endTime, int limit) { + // customRunCDAPcliCommand(namespace, "get stream " + streamId + " " + + // startTime + " " + endTime + " " + limit); + return null; + } + + /** + * Time format can be a timestamp in milliseconds or a relative time in the + * form of [+|-][0-9][d|h|m|s]. Special constants "min" and "max" can be + * used to represent "0" and "max timestamp" respectively. From CDAP CLI + * help documentation. + */ + public EList getStreamStats(String namespace, String streamId, String startTime, String endTime, int limit) { + // customRunCDAPcliCommand(namespace, "get stream-stats " + streamId + + // " " + limit + " " + startTime + " " + endTime); + return null; + } + + public String sendEventToStream(String namespace, String streamId, String event) { + return customRunCDAPcliCommand(namespace, "send stream " + streamId + " " + event); + } + + public String trucateStream(String namespace, String streamId) { + return customRunCDAPcliCommand(namespace, "truncate stream " + streamId); + } + + /** + * Sets the properties of a stream, such as TTL, format, and notification + * threshold. + */ + public String setStreamProperties(String namespace, String streamId, String propsFile) { + return customRunCDAPcliCommand(namespace, "set stream properties " + streamId + " " + propsFile); + } + + public String deployApp(String namespace, String jarfile) { + return customRunCDAPcliCommand(namespace, "deploy app " + jarfile); + } + + public String deleteArtifact(String namespace, String artifactName, String artifactVersion) { + return customRunCDAPcliCommand(namespace, "delete artifact " + artifactName + " " + artifactVersion); + } + + public String deleteDataset(String namespace, String datasetName) { + return customRunCDAPcliCommand(namespace, "delete dataset instance " + datasetName); + } + + public String createApp(String namespace, String appId, String artifactName, String artifactVersion, String scope) { + return customRunCDAPcliCommand(namespace, "create app " + appId + " " + artifactName + " " + artifactVersion + + " " + scope); + } + + public String createAppWithConfig(String namespace, String appId, String artifactName, String artifactVersion, String scope, + String appConfig) { + Date now = new Date(); + String filename = "/tmp/"+ now.getTime() + ".appConfig"; + try { + OutputStreamWriter w = FileUtils.filename2writer(filename); + w.append(appConfig); + w.close(); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.fatal("configurationChanged" + e); + } + return customRunCDAPcliCommand(namespace, "create app " + appId + " " + artifactName + " " + artifactVersion + + " " + scope + " " + filename); + } + + public String restartApp(String namespace, String appId, String progTypes) { + String extraOpts = " of type " + progTypes; + if (progTypes == null || progTypes.equals("")) + extraOpts = ""; + return customRunCDAPcliCommand(namespace, "restart app " + appId + " programs" + extraOpts); + } + + public String setDatasetProperties(String namespace, String datasetName, String datasetProperties) { + return customRunCDAPcliCommand(namespace, "set dataset instance properties " + datasetName + " " + + datasetProperties); + } + + public String setStreamTTL(String namespace, String streamName, int ttlSeconds) { + return customRunCDAPcliCommand(namespace, "set stream ttl " + streamName + " " + ttlSeconds); + } + + public String stopApp(String namespace, String appName) { + return customRunCDAPcliCommand(namespace, "stop app " + appName + " programs"); + } + + public String startWorker(String namespace, String appName, + String workerId, String extraArgs) { + if (extraArgs != null) { + return customRunCDAPcliCommand(namespace, "start worker " + appName + "." + workerId + " \"" + extraArgs + "\""); + } else { + return customRunCDAPcliCommand(namespace, "start worker " + appName + "." + workerId); + } + + } + + public String stopWorker(String namespace, String appId, String workerId) { + return customRunCDAPcliCommand(namespace, "stop worker " + appId + "." + workerId); + + } + + public String setPreferencesService(String namespace, String prefsString, String appId, String serviceId) { + return customRunCDAPcliCommand(namespace, "set preferences service " + "\"" + prefsString + "\" " + appId + "." + + serviceId); + } + +} diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/TestPolling.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/TestPolling.java new file mode 100644 index 0000000..85dd704 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/TestPolling.java @@ -0,0 +1,51 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.servers.cdap; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; + +public class TestPolling implements ISiriusServer { + + public static void main(String[] args) { + TestPolling t = new TestPolling(); + t.poll(); + } + + private ManagementServer server; + + private void poll() { + server = new ManagementServer(); + CdapCdapCluster c = new CdapCdapCluster(this); + c.setBaseUrl("http://10.0.2.2:10000/v3"); + c.poll(); + System.err.println("XXXX " + + ManagementServer.ecore2json(c, 100, null, true).toString(2)); + + } + + @Override + public ManagementServer getServer() { + return server; + } + +} diff --git a/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProvider.java b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProvider.java new file mode 100644 index 0000000..779b26d --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/java/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProvider.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.ncomp.servers.cdap.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class CdapGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(CdapGuiClientApiProvider.class); + GuiClientApi o; + + public CdapGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/ncomp-cdap-adaptor/src/main/server-gen/bin/cdap-adaptor-controller b/ncomp-cdap-adaptor/src/main/server-gen/bin/cdap-adaptor-controller new file mode 100644 index 0000000..3999772 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/server-gen/bin/cdap-adaptor-controller @@ -0,0 +1,138 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Cdap Controller" +PNAME=cdap-adaptor-controller +CLASS=org.openecomp.ncomp.servers.cdap.CdapCdapAdaptorServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status + +CP=$(find $_DIR/lib/*/* -name \*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=$(grep 'server.jvmargs' $_DIR/config/cdap.properties | sed -e 's/.*=//') + +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP + ;; + run) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + groovy) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + + nohup $JAVA_HOME/bin/java $JVMARGS -cp $_DIR/config:$_DIR/lib:$_DIR/lib/\*:$CP "$@" $CLASS > $_DIR/logs/$PNAME.out 2> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/ncomp-cdap-adaptor/src/main/server/config/adaptor.properties b/ncomp-cdap-adaptor/src/main/server/config/adaptor.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/server/config/adaptor.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/ncomp-cdap-adaptor/src/main/server/config/console.properties b/ncomp-cdap-adaptor/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/ncomp-cdap-adaptor/src/main/server/config/gui.properties b/ncomp-cdap-adaptor/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/ncomp-cdap-adaptor/src/main/server/config/log4j.properties b/ncomp-cdap-adaptor/src/main/server/config/log4j.properties new file mode 100644 index 0000000..8b3b8f9 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/server/config/log4j.properties @@ -0,0 +1,24 @@ +#log4j.debug=0 +log4j.rootLogger=warn, file +log4j.logger.org.openecomp.ncomp=info, file +log4j.additivity.org.openecomp.ncomp=false +log4j.logger.org.openecomp.ncomp.datarouter=warn, file +log4j.additivity.org.openecomp.ncomp.datarouter=false +log4j.logger.org.apache.http.headers=debug, file +log4j.logger.org.apache.http.wire=debug, file + +## uploaded logger +log4j.logger.org.openecomp.ncomp.sirius.manager.uploaded=info, uploaded +log4j.additivity.org.openecomp.ncomp.sirius.manager.uploaded=false +## request logging +log4j.logger.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=info, requests +log4j.additivity.org.openecomp.ncomp.sirius.manager.ManagementServer.requests=false + + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=logs/BBBB.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %5p [%t] %m %C:%L%n +log4j.appender.file.MaxFileSize=50MB +log4j.appender.file.MaxBackupIndex=5 + diff --git a/ncomp-cdap-adaptor/src/main/server/config/makefile b/ncomp-cdap-adaptor/src/main/server/config/makefile new file mode 100644 index 0000000..717823e --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=/home/ncomp/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/ncomp-cdap-adaptor/src/main/server/config/pw.sh.sh b/ncomp-cdap-adaptor/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/ncomp-cdap-adaptor/src/main/server/scripts/console.groovy b/ncomp-cdap-adaptor/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..7d19a4e --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============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============================================ + */ + +import org.openecomp.ncomp.servers.cdap.CdapCdapAdaptorConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +adaptor = new CdapCdapAdaptorConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/CdapAdaptor.yaml b/ncomp-cdap-adaptor/src/main/sirius-gen/CdapAdaptor.yaml new file mode 100644 index 0000000..d728705 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/CdapAdaptor.yaml @@ -0,0 +1,3 @@ +operations: {} +messages: + dummy: {} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/CdapCluster.yaml b/ncomp-cdap-adaptor/src/main/sirius-gen/CdapCluster.yaml new file mode 100644 index 0000000..aeaf129 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/CdapCluster.yaml @@ -0,0 +1,432 @@ +operations: + createNamespace: {} + deleteNamespace: {} + deployApp: {} + loadArtifact: {} + deleteArtifact: {} + startFlow: {} + startWorker: {} + startService: {} + startApp: {} + stopApp: {} + deleteApp: {} + loadPreferencesApp: {} + loadPreferencesFlow: {} + loadPreferencesNameSpace: {} + setPreferencesApp: {} + setPreferencesFlow: {} + setPreferencesWorker: {} + setPreferencesService: {} + setPreferencesNameSpace: {} + setFlowRunTimeArgs: {} + setFlowletInstances: {} + stopFlow: {} + stopWorker: {} + stopService: {} + truncateDataSet: {} + deleteDataset: {} + createStream: {} + deleteStream: {} + getStreamEvents: {} + getStreamStats: {} + sendEventToStream: {} + trucateStream: {} + setStreamProperties: {} + restartApp: {} + createApp: {} + createAppWithConfig: {} + setDatasetProperties: {} + setStreamTTL: {} + poll: {} + REMOTE_createNamespace: + decription: Remote call createNamespace + REMOTE_deleteNamespace: + decription: Remote call deleteNamespace + REMOTE_deployApp: + decription: Remote call deployApp + REMOTE_loadArtifact: + decription: Remote call loadArtifact + REMOTE_deleteArtifact: + decription: Remote call deleteArtifact + REMOTE_startFlow: + decription: Remote call startFlow + REMOTE_startWorker: + decription: Remote call startWorker + REMOTE_startService: + decription: Remote call startService + REMOTE_startApp: + decription: Remote call startApp + REMOTE_stopApp: + decription: Remote call stopApp + REMOTE_deleteApp: + decription: Remote call deleteApp + REMOTE_loadPreferencesApp: + decription: Remote call loadPreferencesApp + REMOTE_loadPreferencesFlow: + decription: Remote call loadPreferencesFlow + REMOTE_loadPreferencesNameSpace: + decription: Remote call loadPreferencesNameSpace + REMOTE_setPreferencesApp: + decription: Remote call setPreferencesApp + REMOTE_setPreferencesFlow: + decription: Remote call setPreferencesFlow + REMOTE_setPreferencesWorker: + decription: Remote call setPreferencesWorker + REMOTE_setPreferencesService: + decription: Remote call setPreferencesService + REMOTE_setPreferencesNameSpace: + decription: Remote call setPreferencesNameSpace + REMOTE_setFlowRunTimeArgs: + decription: Remote call setFlowRunTimeArgs + REMOTE_setFlowletInstances: + decription: Remote call setFlowletInstances + REMOTE_stopFlow: + decription: Remote call stopFlow + REMOTE_stopWorker: + decription: Remote call stopWorker + REMOTE_stopService: + decription: Remote call stopService + REMOTE_truncateDataSet: + decription: Remote call truncateDataSet + REMOTE_deleteDataset: + decription: Remote call deleteDataset + REMOTE_createStream: + decription: Remote call createStream + REMOTE_deleteStream: + decription: Remote call deleteStream + REMOTE_getStreamEvents: + decription: Remote call getStreamEvents + REMOTE_getStreamStats: + decription: Remote call getStreamStats + REMOTE_sendEventToStream: + decription: Remote call sendEventToStream + REMOTE_trucateStream: + decription: Remote call trucateStream + REMOTE_setStreamProperties: + decription: Remote call setStreamProperties + REMOTE_restartApp: + decription: Remote call restartApp + REMOTE_createApp: + decription: Remote call createApp + REMOTE_createAppWithConfig: + decription: Remote call createAppWithConfig + REMOTE_setDatasetProperties: + decription: Remote call setDatasetProperties + REMOTE_setStreamTTL: + decription: Remote call setStreamTTL + REMOTE_poll: + decription: Remote call poll +messages: + dummy: {} + createNamespace: + errorCode: createNamespace-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteNamespace: + errorCode: deleteNamespace-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deployApp: + errorCode: deployApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + loadArtifact: + errorCode: loadArtifact-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteArtifact: + errorCode: deleteArtifact-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + startFlow: + errorCode: startFlow-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + startWorker: + errorCode: startWorker-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + startService: + errorCode: startService-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + startApp: + errorCode: startApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + stopApp: + errorCode: stopApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteApp: + errorCode: deleteApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + loadPreferencesApp: + errorCode: loadPreferencesApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + loadPreferencesFlow: + errorCode: loadPreferencesFlow-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + loadPreferencesNameSpace: + errorCode: loadPreferencesNameSpace-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesApp: + errorCode: setPreferencesApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesFlow: + errorCode: setPreferencesFlow-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesWorker: + errorCode: setPreferencesWorker-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesService: + errorCode: setPreferencesService-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setPreferencesNameSpace: + errorCode: setPreferencesNameSpace-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setFlowRunTimeArgs: + errorCode: setFlowRunTimeArgs-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setFlowletInstances: + errorCode: setFlowletInstances-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + stopFlow: + errorCode: stopFlow-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + stopWorker: + errorCode: stopWorker-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + stopService: + errorCode: stopService-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + truncateDataSet: + errorCode: truncateDataSet-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteDataset: + errorCode: deleteDataset-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + createStream: + errorCode: createStream-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + deleteStream: + errorCode: deleteStream-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getStreamEvents: + errorCode: getStreamEvents-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getStreamStats: + errorCode: getStreamStats-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + sendEventToStream: + errorCode: sendEventToStream-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + trucateStream: + errorCode: trucateStream-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setStreamProperties: + errorCode: setStreamProperties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + restartApp: + errorCode: restartApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + createApp: + errorCode: createApp-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + createAppWithConfig: + errorCode: createAppWithConfig-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setDatasetProperties: + errorCode: setDatasetProperties-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + setStreamTTL: + errorCode: setStreamTTL-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + poll: + errorCode: poll-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_createNamespace: + errorCode: REMOTE-createNamespace-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteNamespace: + errorCode: REMOTE-deleteNamespace-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deployApp: + errorCode: REMOTE-deployApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_loadArtifact: + errorCode: REMOTE-loadArtifact-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteArtifact: + errorCode: REMOTE-deleteArtifact-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_startFlow: + errorCode: REMOTE-startFlow-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_startWorker: + errorCode: REMOTE-startWorker-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_startService: + errorCode: REMOTE-startService-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_startApp: + errorCode: REMOTE-startApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_stopApp: + errorCode: REMOTE-stopApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteApp: + errorCode: REMOTE-deleteApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_loadPreferencesApp: + errorCode: REMOTE-loadPreferencesApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_loadPreferencesFlow: + errorCode: REMOTE-loadPreferencesFlow-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_loadPreferencesNameSpace: + errorCode: REMOTE-loadPreferencesNameSpace-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesApp: + errorCode: REMOTE-setPreferencesApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesFlow: + errorCode: REMOTE-setPreferencesFlow-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesWorker: + errorCode: REMOTE-setPreferencesWorker-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesService: + errorCode: REMOTE-setPreferencesService-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setPreferencesNameSpace: + errorCode: REMOTE-setPreferencesNameSpace-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setFlowRunTimeArgs: + errorCode: REMOTE-setFlowRunTimeArgs-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setFlowletInstances: + errorCode: REMOTE-setFlowletInstances-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_stopFlow: + errorCode: REMOTE-stopFlow-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_stopWorker: + errorCode: REMOTE-stopWorker-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_stopService: + errorCode: REMOTE-stopService-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_truncateDataSet: + errorCode: REMOTE-truncateDataSet-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteDataset: + errorCode: REMOTE-deleteDataset-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_createStream: + errorCode: REMOTE-createStream-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_deleteStream: + errorCode: REMOTE-deleteStream-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getStreamEvents: + errorCode: REMOTE-getStreamEvents-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getStreamStats: + errorCode: REMOTE-getStreamStats-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_sendEventToStream: + errorCode: REMOTE-sendEventToStream-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_trucateStream: + errorCode: REMOTE-trucateStream-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setStreamProperties: + errorCode: REMOTE-setStreamProperties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_restartApp: + errorCode: REMOTE-restartApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_createApp: + errorCode: REMOTE-createApp-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_createAppWithConfig: + errorCode: REMOTE-createAppWithConfig-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setDatasetProperties: + errorCode: REMOTE-setDatasetProperties-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_setStreamTTL: + errorCode: REMOTE-setStreamTTL-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_poll: + errorCode: REMOTE-poll-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml b/ncomp-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml new file mode 100644 index 0000000..bf3d69d --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/GuiClientApi.yaml @@ -0,0 +1,69 @@ +operations: + getTree: {} + getObject: {} + getTimeSerie: {} + getTable: {} + getHtml: {} + getGraph: {} + REMOTE_getTree: + decription: Remote call getTree + REMOTE_getObject: + decription: Remote call getObject + REMOTE_getTimeSerie: + decription: Remote call getTimeSerie + REMOTE_getTable: + decription: Remote call getTable + REMOTE_getHtml: + decription: Remote call getHtml + REMOTE_getGraph: + decription: Remote call getGraph +messages: + dummy: {} + getTree: + errorCode: getTree-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getObject: + errorCode: getObject-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTimeSerie: + errorCode: getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getTable: + errorCode: getTable-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getHtml: + errorCode: getHtml-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + getGraph: + errorCode: getGraph-FAILED-5001W + messageFormat: '{0}' + description: Operation Failed with Exception + REMOTE_getTree: + errorCode: REMOTE-getTree-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getObject: + errorCode: REMOTE-getObject-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTimeSerie: + errorCode: REMOTE-getTimeSerie-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getTable: + errorCode: REMOTE-getTable-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getHtml: + errorCode: REMOTE-getHtml-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception + REMOTE_getGraph: + errorCode: REMOTE-getGraph-FAILED-5001W + messageFormat: '{0}' + description: Remote Operation Failed with Exception diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptor.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptor.java new file mode 100644 index 0000000..0944f8c --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptor.java @@ -0,0 +1,76 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.servers.cdap; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.ncomp.servers.cdap.logging.CdapAdaptorOperationEnum; + + + + +import org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl; + + + +public class CdapCdapAdaptor extends CdapAdaptorImpl { + public static final Logger logger = Logger.getLogger(CdapCdapAdaptor.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public CdapCdapAdaptorProvider controller; + ISiriusServer server; + + public CdapCdapAdaptor(ISiriusServer server) { + this.server = server; + this.controller = new CdapCdapAdaptorProvider(server,this); + } + + + + + + + public static void ecoreSetup() { + CdapCdapAdaptorProvider.ecoreSetup(); + } + public CdapCdapAdaptorProvider getSomfProvider() { + return controller; + } +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorClient.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorClient.java new file mode 100644 index 0000000..afc8bfb --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorClient.java @@ -0,0 +1,72 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.servers.cdap; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.openecomp.ncomp.servers.cdap.logging.CdapAdaptorOperationEnum; +import org.openecomp.ncomp.servers.cdap.logging.CdapAdaptorMessageEnum; + + + + + + +@SuppressWarnings("unchecked") +public class CdapCdapAdaptorClient extends CdapAdaptorImpl { + public static final Logger logger = Logger.getLogger(CdapCdapAdaptorClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public CdapCdapAdaptorClient(String file, String name) { + CdapCdapAdaptor.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/resources", this); + } + + public CdapCdapAdaptorClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + public CdapCdapAdaptorClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorConsole.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorConsole.java new file mode 100644 index 0000000..bd83919 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorConsole.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============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.ncomp.servers.cdap; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + +import org.openecomp.ncomp.servers.cdap.gui.CdapGuiClientApiConsole; + + +public class CdapCdapAdaptorConsole extends Console { + public static final Logger logger = Logger.getLogger(CdapCdapAdaptorConsole.class); + protected CdapCdapAdaptorClient controller; + + + CdapCdapClusterConsole cluster; + CdapGuiClientApiConsole gui; + + + public CdapCdapAdaptorConsole(String filename, String name) { + super(filename, name); + controller = new CdapCdapAdaptorClient(filename,name); + client = controller.client; + + cluster = new CdapCdapClusterConsole(filename,name); + gui = new CdapGuiClientApiConsole(filename,name); + } + + public CdapCdapAdaptorConsole(AbstractClient c) { + controller = new CdapCdapAdaptorClient(c); + client = controller.client; + } + + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProviderTemplate.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProviderTemplate.java new file mode 100644 index 0000000..02234fc --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorProviderTemplate.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.ncomp.servers.cdap; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl; +import org.openecomp.ncomp.cdap.CdapAdaptor; + + +public class CdapCdapAdaptorProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(CdapCdapAdaptorProviderTemplate.class); + CdapAdaptor o; + + public CdapCdapAdaptorProviderTemplate(ISiriusServer controller, CdapAdaptor o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorServer.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorServer.java new file mode 100644 index 0000000..c44a17a --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapAdaptorServer.java @@ -0,0 +1,114 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.ncomp.servers.cdap; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.cdap.CdapAdaptor; + + +import org.openecomp.ncomp.servers.cdap.CdapCdapFactory; + +import org.openecomp.ncomp.servers.cdap.gui.CdapModelFactory; + + + + + +public class CdapCdapAdaptorServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(CdapCdapAdaptorServer.class); + String serverPath; + ManagementServer server; + CdapCdapAdaptor controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + CdapCdapFactory f = new CdapCdapFactory(this); + + + String clusterPath; + ManagementServer clusterServer; + + String guiPath; + ManagementServer guiServer; + + + public CdapCdapAdaptorServer(String filename) throws IOException { + logger.warn("controller restarting"); + CdapCdapAdaptor.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "CdapAdaptor", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (CdapCdapAdaptor) server.find("/").o; + webServer = new Jetty8Server("cdap.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new CdapModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + CdapCdapAdaptorServer s = new CdapCdapAdaptorServer("cdap.properties"); + s.runWebserver(); + } + public CdapAdaptor getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java new file mode 100644 index 0000000..ed5ffef --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapCluster.java @@ -0,0 +1,1056 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.servers.cdap; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.ncomp.servers.cdap.logging.CdapClusterOperationEnum; + + + + +import org.openecomp.ncomp.cdap.impl.CdapClusterImpl; + + + +public class CdapCdapCluster extends CdapClusterImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(CdapCdapCluster.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public CdapCdapClusterProvider controller; + ISiriusServer server; + + public CdapCdapCluster(ISiriusServer server) { + this.server = server; + this.controller = new CdapCdapClusterProvider(server,this); + } + + public void poll() { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "poll", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.poll); + try { + controller.poll(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "poll", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "poll", ApiRequestStatus.OKAY, duration_); + + } + + public java.lang.String createNamespace(java.lang.String namespace) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.START, duration_,namespace); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.createNamespace); + try { + res = controller.createNamespace(namespace); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.ERROR, duration_,namespace); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createNamespace", ApiRequestStatus.OKAY, duration_,namespace); + return res; + } + + public java.lang.String deleteNamespace(java.lang.String namespace) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.START, duration_,namespace); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.deleteNamespace); + try { + res = controller.deleteNamespace(namespace); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.ERROR, duration_,namespace); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteNamespace", ApiRequestStatus.OKAY, duration_,namespace); + return res; + } + + public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.START, duration_,namespace,jarfile); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.deployApp); + try { + res = controller.deployApp(namespace,jarfile); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.ERROR, duration_,namespace,jarfile); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deployApp", ApiRequestStatus.OKAY, duration_,namespace,jarfile); + return res; + } + + public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.START, duration_,namespace,artifactName,jarfile,version); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.loadArtifact); + try { + res = controller.loadArtifact(namespace,artifactName,jarfile,version); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.ERROR, duration_,namespace,artifactName,jarfile,version); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadArtifact", ApiRequestStatus.OKAY, duration_,namespace,artifactName,jarfile,version); + return res; + } + + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.START, duration_,namespace,artifactName,artifactVersion); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.deleteArtifact); + try { + res = controller.deleteArtifact(namespace,artifactName,artifactVersion); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.ERROR, duration_,namespace,artifactName,artifactVersion); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteArtifact", ApiRequestStatus.OKAY, duration_,namespace,artifactName,artifactVersion); + return res; + } + + public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.START, duration_,namespace,appName,flowId,extraArgs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.startFlow); + try { + res = controller.startFlow(namespace,appName,flowId,extraArgs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.ERROR, duration_,namespace,appName,flowId,extraArgs); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startFlow", ApiRequestStatus.OKAY, duration_,namespace,appName,flowId,extraArgs); + return res; + } + + public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.START, duration_,namespace,appName,workerId,extraArgs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.startWorker); + try { + res = controller.startWorker(namespace,appName,workerId,extraArgs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.ERROR, duration_,namespace,appName,workerId,extraArgs); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startWorker", ApiRequestStatus.OKAY, duration_,namespace,appName,workerId,extraArgs); + return res; + } + + public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "startService", ApiRequestStatus.START, duration_,namespace,appName,serviceId,extraArgs); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.startService); + try { + res = controller.startService(namespace,appName,serviceId,extraArgs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startService", ApiRequestStatus.ERROR, duration_,namespace,appName,serviceId,extraArgs); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startService", ApiRequestStatus.OKAY, duration_,namespace,appName,serviceId,extraArgs); + return res; + } + + public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.START, duration_,namespace,appName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.startApp); + try { + res = controller.startApp(namespace,appName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.ERROR, duration_,namespace,appName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "startApp", ApiRequestStatus.OKAY, duration_,namespace,appName); + return res; + } + + public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.START, duration_,namespace,appName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.stopApp); + try { + res = controller.stopApp(namespace,appName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.ERROR, duration_,namespace,appName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopApp", ApiRequestStatus.OKAY, duration_,namespace,appName); + return res; + } + + public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.START, duration_,namespace,appName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.deleteApp); + try { + res = controller.deleteApp(namespace,appName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.ERROR, duration_,namespace,appName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteApp", ApiRequestStatus.OKAY, duration_,namespace,appName); + return res; + } + + public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.START, duration_,namespace,prefsFile,appId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.loadPreferencesApp); + try { + res = controller.loadPreferencesApp(namespace,prefsFile,appId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.ERROR, duration_,namespace,prefsFile,appId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesApp", ApiRequestStatus.OKAY, duration_,namespace,prefsFile,appId); + return res; + } + + public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.START, duration_,namespace,prefsFile,appId,flowId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.loadPreferencesFlow); + try { + res = controller.loadPreferencesFlow(namespace,prefsFile,appId,flowId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.ERROR, duration_,namespace,prefsFile,appId,flowId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesFlow", ApiRequestStatus.OKAY, duration_,namespace,prefsFile,appId,flowId); + return res; + } + + public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.START, duration_,namespace,prefsFile); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.loadPreferencesNameSpace); + try { + res = controller.loadPreferencesNameSpace(namespace,prefsFile); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.ERROR, duration_,namespace,prefsFile); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "loadPreferencesNameSpace", ApiRequestStatus.OKAY, duration_,namespace,prefsFile); + return res; + } + + public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.START, duration_,namespace,prefsString,appId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesApp); + try { + res = controller.setPreferencesApp(namespace,prefsString,appId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesApp", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId); + return res; + } + + public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.START, duration_,namespace,prefsString,appId,flowId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesFlow); + try { + res = controller.setPreferencesFlow(namespace,prefsString,appId,flowId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,flowId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesFlow", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId,flowId); + return res; + } + + public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.START, duration_,namespace,prefsString,appId,workerId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesWorker); + try { + res = controller.setPreferencesWorker(namespace,prefsString,appId,workerId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,workerId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesWorker", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId,workerId); + return res; + } + + public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.START, duration_,namespace,prefsString,appId,serviceId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesService); + try { + res = controller.setPreferencesService(namespace,prefsString,appId,serviceId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.ERROR, duration_,namespace,prefsString,appId,serviceId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesService", ApiRequestStatus.OKAY, duration_,namespace,prefsString,appId,serviceId); + return res; + } + + public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.START, duration_,namespace,prefsString); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setPreferencesNameSpace); + try { + res = controller.setPreferencesNameSpace(namespace,prefsString); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.ERROR, duration_,namespace,prefsString); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setPreferencesNameSpace", ApiRequestStatus.OKAY, duration_,namespace,prefsString); + return res; + } + + public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.START, duration_,namespace,appId,flowId,args); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setFlowRunTimeArgs); + try { + res = controller.setFlowRunTimeArgs(namespace,appId,flowId,args); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId,args); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setFlowRunTimeArgs", ApiRequestStatus.OKAY, duration_,namespace,appId,flowId,args); + return res; + } + + public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.START, duration_,namespace,appId,flowId,flowletId,nInstances); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setFlowletInstances); + try { + res = controller.setFlowletInstances(namespace,appId,flowId,flowletId,nInstances); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId,flowletId,nInstances); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setFlowletInstances", ApiRequestStatus.OKAY, duration_,namespace,appId,flowId,flowletId,nInstances); + return res; + } + + public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.START, duration_,namespace,appId,flowId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.stopFlow); + try { + res = controller.stopFlow(namespace,appId,flowId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.ERROR, duration_,namespace,appId,flowId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopFlow", ApiRequestStatus.OKAY, duration_,namespace,appId,flowId); + return res; + } + + public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.START, duration_,namespace,appId,workerId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.stopWorker); + try { + res = controller.stopWorker(namespace,appId,workerId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.ERROR, duration_,namespace,appId,workerId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopWorker", ApiRequestStatus.OKAY, duration_,namespace,appId,workerId); + return res; + } + + public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.START, duration_,namespace,appId,serviceId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.stopService); + try { + res = controller.stopService(namespace,appId,serviceId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.ERROR, duration_,namespace,appId,serviceId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "stopService", ApiRequestStatus.OKAY, duration_,namespace,appId,serviceId); + return res; + } + + public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.START, duration_,namespace,datasetName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.truncateDataSet); + try { + res = controller.truncateDataSet(namespace,datasetName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.ERROR, duration_,namespace,datasetName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "truncateDataSet", ApiRequestStatus.OKAY, duration_,namespace,datasetName); + return res; + } + + public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.START, duration_,namespace,datasetName); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.deleteDataset); + try { + res = controller.deleteDataset(namespace,datasetName); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.ERROR, duration_,namespace,datasetName); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteDataset", ApiRequestStatus.OKAY, duration_,namespace,datasetName); + return res; + } + + public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.START, duration_,namespace,newStreamId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.createStream); + try { + res = controller.createStream(namespace,newStreamId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.ERROR, duration_,namespace,newStreamId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createStream", ApiRequestStatus.OKAY, duration_,namespace,newStreamId); + return res; + } + + public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.START, duration_,namespace,streamId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.deleteStream); + try { + res = controller.deleteStream(namespace,streamId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.ERROR, duration_,namespace,streamId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "deleteStream", ApiRequestStatus.OKAY, duration_,namespace,streamId); + return res; + } + + public EList getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.START, duration_,namespace,streamId,startTime,endTime,limit); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.getStreamEvents); + try { + res = controller.getStreamEvents(namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.ERROR, duration_,namespace,streamId,startTime,endTime,limit); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getStreamEvents", ApiRequestStatus.OKAY, duration_,namespace,streamId,startTime,endTime,limit); + return res; + } + + public EList getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.START, duration_,namespace,streamId,startTime,endTime,limit); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.getStreamStats); + try { + res = controller.getStreamStats(namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.ERROR, duration_,namespace,streamId,startTime,endTime,limit); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getStreamStats", ApiRequestStatus.OKAY, duration_,namespace,streamId,startTime,endTime,limit); + return res; + } + + public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.START, duration_,namespace,streamId,event); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.sendEventToStream); + try { + res = controller.sendEventToStream(namespace,streamId,event); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.ERROR, duration_,namespace,streamId,event); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "sendEventToStream", ApiRequestStatus.OKAY, duration_,namespace,streamId,event); + return res; + } + + public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.START, duration_,namespace,streamId); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.trucateStream); + try { + res = controller.trucateStream(namespace,streamId); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.ERROR, duration_,namespace,streamId); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "trucateStream", ApiRequestStatus.OKAY, duration_,namespace,streamId); + return res; + } + + public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.START, duration_,namespace,streamId,propsFile); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setStreamProperties); + try { + res = controller.setStreamProperties(namespace,streamId,propsFile); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.ERROR, duration_,namespace,streamId,propsFile); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setStreamProperties", ApiRequestStatus.OKAY, duration_,namespace,streamId,propsFile); + return res; + } + + public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.START, duration_,namespace,appId,progTypes); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.restartApp); + try { + res = controller.restartApp(namespace,appId,progTypes); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.ERROR, duration_,namespace,appId,progTypes); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "restartApp", ApiRequestStatus.OKAY, duration_,namespace,appId,progTypes); + return res; + } + + public java.lang.String createApp(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.START, duration_,namespace,appId,artifactName,artifactVersion,scope); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.createApp); + try { + res = controller.createApp(namespace,appId,artifactName,artifactVersion,scope); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.ERROR, duration_,namespace,appId,artifactName,artifactVersion,scope); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createApp", ApiRequestStatus.OKAY, duration_,namespace,appId,artifactName,artifactVersion,scope); + return res; + } + + public java.lang.String createAppWithConfig(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.START, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.createAppWithConfig); + try { + res = controller.createAppWithConfig(namespace,appId,artifactName,artifactVersion,scope,appConfig); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.ERROR, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "createAppWithConfig", ApiRequestStatus.OKAY, duration_,namespace,appId,artifactName,artifactVersion,scope,appConfig); + return res; + } + + public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.START, duration_,namespace,datasetName,datasetProperties); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setDatasetProperties); + try { + res = controller.setDatasetProperties(namespace,datasetName,datasetProperties); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.ERROR, duration_,namespace,datasetName,datasetProperties); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setDatasetProperties", ApiRequestStatus.OKAY, duration_,namespace,datasetName,datasetProperties); + return res; + } + + public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + java.lang.String res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.START, duration_,namespace,streamName,ttlSeconds); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.setStreamTTL); + try { + res = controller.setStreamTTL(namespace,streamName,ttlSeconds); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.ERROR, duration_,namespace,streamName,ttlSeconds); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "setStreamTTL", ApiRequestStatus.OKAY, duration_,namespace,streamName,ttlSeconds); + return res; + } + + + + + + + @Override + public void start() { + controller.start(); + } + + public static void ecoreSetup() { + CdapCdapClusterProvider.ecoreSetup(); + } + public CdapCdapClusterProvider getSomfProvider() { + return controller; + } +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java new file mode 100644 index 0000000..f24ff72 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterClient.java @@ -0,0 +1,736 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.servers.cdap; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.cdap.impl.CdapClusterImpl; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.openecomp.ncomp.servers.cdap.logging.CdapClusterOperationEnum; +import org.openecomp.ncomp.servers.cdap.logging.CdapClusterMessageEnum; + + +import org.openecomp.ncomp.servers.cdap.CdapCdapAdaptor; + + + + +@SuppressWarnings("unchecked") +public class CdapCdapClusterClient extends CdapClusterImpl { + public static final Logger logger = Logger.getLogger(CdapCdapClusterClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public CdapCdapClusterClient(String file, String name) { + CdapCdapAdaptor.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/cluster", this); + } + + public CdapCdapClusterClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/cluster", this); + } + + public CdapCdapClusterClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + + public void poll(String path) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_poll); + + try { + client.operationPath(path, c, "poll", null); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_poll, e.toString()); + throw new RuntimeException("remote call failed: poll", e); + } + ecomplogger.recordMetricEventEnd(); + + } + + + public java.lang.String createNamespace(String path, java.lang.String namespace) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_createNamespace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "createNamespace", null, namespace); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_createNamespace, e.toString()); + throw new RuntimeException("remote call failed: createNamespace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String deleteNamespace(String path, java.lang.String namespace) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteNamespace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "deleteNamespace", null, namespace); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteNamespace, e.toString()); + throw new RuntimeException("remote call failed: deleteNamespace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String deployApp(String path, java.lang.String namespace, java.lang.String jarfile) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deployApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "deployApp", null, namespace,jarfile); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deployApp, e.toString()); + throw new RuntimeException("remote call failed: deployApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String loadArtifact(String path, java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_loadArtifact); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "loadArtifact", null, namespace,artifactName,jarfile,version); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_loadArtifact, e.toString()); + throw new RuntimeException("remote call failed: loadArtifact", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String deleteArtifact(String path, java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteArtifact); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "deleteArtifact", null, namespace,artifactName,artifactVersion); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteArtifact, e.toString()); + throw new RuntimeException("remote call failed: deleteArtifact", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String startFlow(String path, java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_startFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "startFlow", null, namespace,appName,flowId,extraArgs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_startFlow, e.toString()); + throw new RuntimeException("remote call failed: startFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String startWorker(String path, java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_startWorker); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "startWorker", null, namespace,appName,workerId,extraArgs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_startWorker, e.toString()); + throw new RuntimeException("remote call failed: startWorker", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String startService(String path, java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_startService); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "startService", null, namespace,appName,serviceId,extraArgs); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_startService, e.toString()); + throw new RuntimeException("remote call failed: startService", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String startApp(String path, java.lang.String namespace, java.lang.String appName) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_startApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "startApp", null, namespace,appName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_startApp, e.toString()); + throw new RuntimeException("remote call failed: startApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String stopApp(String path, java.lang.String namespace, java.lang.String appName) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_stopApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "stopApp", null, namespace,appName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_stopApp, e.toString()); + throw new RuntimeException("remote call failed: stopApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String deleteApp(String path, java.lang.String namespace, java.lang.String appName) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "deleteApp", null, namespace,appName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteApp, e.toString()); + throw new RuntimeException("remote call failed: deleteApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String loadPreferencesApp(String path, java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_loadPreferencesApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "loadPreferencesApp", null, namespace,prefsFile,appId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_loadPreferencesApp, e.toString()); + throw new RuntimeException("remote call failed: loadPreferencesApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String loadPreferencesFlow(String path, java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_loadPreferencesFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "loadPreferencesFlow", null, namespace,prefsFile,appId,flowId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_loadPreferencesFlow, e.toString()); + throw new RuntimeException("remote call failed: loadPreferencesFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String loadPreferencesNameSpace(String path, java.lang.String namespace, java.lang.String prefsFile) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_loadPreferencesNameSpace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "loadPreferencesNameSpace", null, namespace,prefsFile); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_loadPreferencesNameSpace, e.toString()); + throw new RuntimeException("remote call failed: loadPreferencesNameSpace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setPreferencesApp(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setPreferencesApp", null, namespace,prefsString,appId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesApp, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setPreferencesFlow(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setPreferencesFlow", null, namespace,prefsString,appId,flowId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesFlow, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setPreferencesWorker(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesWorker); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setPreferencesWorker", null, namespace,prefsString,appId,workerId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesWorker, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesWorker", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setPreferencesService(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesService); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setPreferencesService", null, namespace,prefsString,appId,serviceId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesService, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesService", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setPreferencesNameSpace(String path, java.lang.String namespace, java.lang.String prefsString) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setPreferencesNameSpace); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setPreferencesNameSpace", null, namespace,prefsString); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setPreferencesNameSpace, e.toString()); + throw new RuntimeException("remote call failed: setPreferencesNameSpace", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setFlowRunTimeArgs(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setFlowRunTimeArgs); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setFlowRunTimeArgs", null, namespace,appId,flowId,args); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setFlowRunTimeArgs, e.toString()); + throw new RuntimeException("remote call failed: setFlowRunTimeArgs", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setFlowletInstances(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setFlowletInstances); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setFlowletInstances", null, namespace,appId,flowId,flowletId,nInstances); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setFlowletInstances, e.toString()); + throw new RuntimeException("remote call failed: setFlowletInstances", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String stopFlow(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_stopFlow); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "stopFlow", null, namespace,appId,flowId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_stopFlow, e.toString()); + throw new RuntimeException("remote call failed: stopFlow", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String stopWorker(String path, java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_stopWorker); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "stopWorker", null, namespace,appId,workerId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_stopWorker, e.toString()); + throw new RuntimeException("remote call failed: stopWorker", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String stopService(String path, java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_stopService); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "stopService", null, namespace,appId,serviceId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_stopService, e.toString()); + throw new RuntimeException("remote call failed: stopService", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String truncateDataSet(String path, java.lang.String namespace, java.lang.String datasetName) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_truncateDataSet); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "truncateDataSet", null, namespace,datasetName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_truncateDataSet, e.toString()); + throw new RuntimeException("remote call failed: truncateDataSet", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String deleteDataset(String path, java.lang.String namespace, java.lang.String datasetName) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteDataset); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "deleteDataset", null, namespace,datasetName); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteDataset, e.toString()); + throw new RuntimeException("remote call failed: deleteDataset", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String createStream(String path, java.lang.String namespace, java.lang.String newStreamId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_createStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "createStream", null, namespace,newStreamId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_createStream, e.toString()); + throw new RuntimeException("remote call failed: createStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String deleteStream(String path, java.lang.String namespace, java.lang.String streamId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_deleteStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "deleteStream", null, namespace,streamId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_deleteStream, e.toString()); + throw new RuntimeException("remote call failed: deleteStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public EList getStreamEvents(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_getStreamEvents); + EList res; + try { + res = (EList) client.operationPath(path, c, "getStreamEvents", null, namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_getStreamEvents, e.toString()); + throw new RuntimeException("remote call failed: getStreamEvents", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public EList getStreamStats(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_getStreamStats); + EList res; + try { + res = (EList) client.operationPath(path, c, "getStreamStats", null, namespace,streamId,startTime,endTime,limit); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_getStreamStats, e.toString()); + throw new RuntimeException("remote call failed: getStreamStats", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String sendEventToStream(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_sendEventToStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "sendEventToStream", null, namespace,streamId,event); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_sendEventToStream, e.toString()); + throw new RuntimeException("remote call failed: sendEventToStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String trucateStream(String path, java.lang.String namespace, java.lang.String streamId) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_trucateStream); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "trucateStream", null, namespace,streamId); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_trucateStream, e.toString()); + throw new RuntimeException("remote call failed: trucateStream", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setStreamProperties(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setStreamProperties); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setStreamProperties", null, namespace,streamId,propsFile); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setStreamProperties, e.toString()); + throw new RuntimeException("remote call failed: setStreamProperties", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String restartApp(String path, java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_restartApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "restartApp", null, namespace,appId,progTypes); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_restartApp, e.toString()); + throw new RuntimeException("remote call failed: restartApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String createApp(String path, java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_createApp); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "createApp", null, namespace,appId,artifactName,artifactVersion,scope); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_createApp, e.toString()); + throw new RuntimeException("remote call failed: createApp", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String createAppWithConfig(String path, java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_createAppWithConfig); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "createAppWithConfig", null, namespace,appId,artifactName,artifactVersion,scope,appConfig); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_createAppWithConfig, e.toString()); + throw new RuntimeException("remote call failed: createAppWithConfig", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setDatasetProperties(String path, java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setDatasetProperties); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setDatasetProperties", null, namespace,datasetName,datasetProperties); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setDatasetProperties, e.toString()); + throw new RuntimeException("remote call failed: setDatasetProperties", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + + public java.lang.String setStreamTTL(String path, java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + EClass c = CdapPackage.eINSTANCE.getCdapCluster(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(CdapClusterOperationEnum.REMOTE_setStreamTTL); + java.lang.String res; + try { + res = (java.lang.String) client.operationPath(path, c, "setStreamTTL", null, namespace,streamName,ttlSeconds); + } + catch (Exception e) { + ecomplogger.warn(CdapClusterMessageEnum.REMOTE_setStreamTTL, e.toString()); + throw new RuntimeException("remote call failed: setStreamTTL", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java new file mode 100644 index 0000000..e1a7363 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterConsole.java @@ -0,0 +1,486 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.ncomp.servers.cdap; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class CdapCdapClusterConsole extends Console { + public static final Logger logger = Logger.getLogger(CdapCdapClusterConsole.class); + protected CdapCdapClusterClient controller; + + + + + public CdapCdapClusterConsole(String filename, String name) { + super(filename, name); + controller = new CdapCdapClusterClient(filename,name); + client = controller.client; + + } + + public CdapCdapClusterConsole(AbstractClient c) { + controller = new CdapCdapClusterClient(c); + client = controller.client; + } + + + public void poll(String path) { + + try { + controller.poll(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public java.lang.String createNamespace(String path, java.lang.String namespace) { + java.lang.String res = null; + try { + res = controller.createNamespace(path,namespace); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteNamespace(String path, java.lang.String namespace) { + java.lang.String res = null; + try { + res = controller.deleteNamespace(path,namespace); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deployApp(String path, java.lang.String namespace, java.lang.String jarfile) { + java.lang.String res = null; + try { + res = controller.deployApp(path,namespace,jarfile); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadArtifact(String path, java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { + java.lang.String res = null; + try { + res = controller.loadArtifact(path,namespace,artifactName,jarfile,version); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteArtifact(String path, java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + java.lang.String res = null; + try { + res = controller.deleteArtifact(path,namespace,artifactName,artifactVersion); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String startFlow(String path, java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { + java.lang.String res = null; + try { + res = controller.startFlow(path,namespace,appName,flowId,extraArgs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String startWorker(String path, java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { + java.lang.String res = null; + try { + res = controller.startWorker(path,namespace,appName,workerId,extraArgs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String startService(String path, java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { + java.lang.String res = null; + try { + res = controller.startService(path,namespace,appName,serviceId,extraArgs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String startApp(String path, java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + try { + res = controller.startApp(path,namespace,appName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopApp(String path, java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + try { + res = controller.stopApp(path,namespace,appName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteApp(String path, java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + try { + res = controller.deleteApp(path,namespace,appName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadPreferencesApp(String path, java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + java.lang.String res = null; + try { + res = controller.loadPreferencesApp(path,namespace,prefsFile,appId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadPreferencesFlow(String path, java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + try { + res = controller.loadPreferencesFlow(path,namespace,prefsFile,appId,flowId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String loadPreferencesNameSpace(String path, java.lang.String namespace, java.lang.String prefsFile) { + java.lang.String res = null; + try { + res = controller.loadPreferencesNameSpace(path,namespace,prefsFile); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesApp(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + java.lang.String res = null; + try { + res = controller.setPreferencesApp(path,namespace,prefsString,appId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesFlow(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + try { + res = controller.setPreferencesFlow(path,namespace,prefsString,appId,flowId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesWorker(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + try { + res = controller.setPreferencesWorker(path,namespace,prefsString,appId,workerId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesService(String path, java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + try { + res = controller.setPreferencesService(path,namespace,prefsString,appId,serviceId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setPreferencesNameSpace(String path, java.lang.String namespace, java.lang.String prefsString) { + java.lang.String res = null; + try { + res = controller.setPreferencesNameSpace(path,namespace,prefsString); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setFlowRunTimeArgs(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { + java.lang.String res = null; + try { + res = controller.setFlowRunTimeArgs(path,namespace,appId,flowId,args); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setFlowletInstances(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { + java.lang.String res = null; + try { + res = controller.setFlowletInstances(path,namespace,appId,flowId,flowletId,nInstances); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopFlow(String path, java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + try { + res = controller.stopFlow(path,namespace,appId,flowId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopWorker(String path, java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + try { + res = controller.stopWorker(path,namespace,appId,workerId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String stopService(String path, java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + try { + res = controller.stopService(path,namespace,appId,serviceId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String truncateDataSet(String path, java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + try { + res = controller.truncateDataSet(path,namespace,datasetName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteDataset(String path, java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + try { + res = controller.deleteDataset(path,namespace,datasetName); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String createStream(String path, java.lang.String namespace, java.lang.String newStreamId) { + java.lang.String res = null; + try { + res = controller.createStream(path,namespace,newStreamId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String deleteStream(String path, java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + try { + res = controller.deleteStream(path,namespace,streamId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getStreamEvents(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + try { + res = controller.getStreamEvents(path,namespace,streamId,startTime,endTime,limit); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getStreamStats(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + try { + res = controller.getStreamStats(path,namespace,streamId,startTime,endTime,limit); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String sendEventToStream(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + java.lang.String res = null; + try { + res = controller.sendEventToStream(path,namespace,streamId,event); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String trucateStream(String path, java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + try { + res = controller.trucateStream(path,namespace,streamId); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setStreamProperties(String path, java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + java.lang.String res = null; + try { + res = controller.setStreamProperties(path,namespace,streamId,propsFile); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String restartApp(String path, java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + java.lang.String res = null; + try { + res = controller.restartApp(path,namespace,appId,progTypes); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String createApp(String path, java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) { + java.lang.String res = null; + try { + res = controller.createApp(path,namespace,appId,artifactName,artifactVersion,scope); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String createAppWithConfig(String path, java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) { + java.lang.String res = null; + try { + res = controller.createAppWithConfig(path,namespace,appId,artifactName,artifactVersion,scope,appConfig); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setDatasetProperties(String path, java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + java.lang.String res = null; + try { + res = controller.setDatasetProperties(path,namespace,datasetName,datasetProperties); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public java.lang.String setStreamTTL(String path, java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + java.lang.String res = null; + try { + res = controller.setStreamTTL(path,namespace,streamName,ttlSeconds); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java new file mode 100644 index 0000000..f25f9a9 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapClusterProviderTemplate.java @@ -0,0 +1,299 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.ncomp.servers.cdap; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + + +import org.openecomp.ncomp.cdap.impl.CdapClusterImpl; +import org.openecomp.ncomp.cdap.CdapCluster; + + +public class CdapCdapClusterProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(CdapCdapClusterProviderTemplate.class); + CdapCluster o; + + public CdapCdapClusterProviderTemplate(ISiriusServer controller, CdapCluster o) { + super(controller, o); + this.o = o; + } + + public void poll() { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String createNamespace(java.lang.String namespace) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteNamespace(java.lang.String namespace) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deployApp(java.lang.String namespace, java.lang.String jarfile) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String loadArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String jarfile, java.lang.String version) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteArtifact(java.lang.String namespace, java.lang.String artifactName, java.lang.String artifactVersion) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String startFlow(java.lang.String namespace, java.lang.String appName, java.lang.String flowId, java.lang.String extraArgs) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String startWorker(java.lang.String namespace, java.lang.String appName, java.lang.String workerId, java.lang.String extraArgs) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String startService(java.lang.String namespace, java.lang.String appName, java.lang.String serviceId, java.lang.String extraArgs) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String startApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String stopApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteApp(java.lang.String namespace, java.lang.String appName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String loadPreferencesApp(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String loadPreferencesFlow(java.lang.String namespace, java.lang.String prefsFile, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String loadPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsFile) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesApp(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesFlow(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesWorker(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesService(java.lang.String namespace, java.lang.String prefsString, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setPreferencesNameSpace(java.lang.String namespace, java.lang.String prefsString) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setFlowRunTimeArgs(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String args) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setFlowletInstances(java.lang.String namespace, java.lang.String appId, java.lang.String flowId, java.lang.String flowletId, int nInstances) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String stopFlow(java.lang.String namespace, java.lang.String appId, java.lang.String flowId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String stopWorker(java.lang.String namespace, java.lang.String appId, java.lang.String workerId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String stopService(java.lang.String namespace, java.lang.String appId, java.lang.String serviceId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String truncateDataSet(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteDataset(java.lang.String namespace, java.lang.String datasetName) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String createStream(java.lang.String namespace, java.lang.String newStreamId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String deleteStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public EList getStreamEvents(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public EList getStreamStats(java.lang.String namespace, java.lang.String streamId, java.lang.String startTime, java.lang.String endTime, int limit) { + EList res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String sendEventToStream(java.lang.String namespace, java.lang.String streamId, java.lang.String event) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String trucateStream(java.lang.String namespace, java.lang.String streamId) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setStreamProperties(java.lang.String namespace, java.lang.String streamId, java.lang.String propsFile) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String restartApp(java.lang.String namespace, java.lang.String appId, java.lang.String progTypes) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String createApp(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String createAppWithConfig(java.lang.String namespace, java.lang.String appId, java.lang.String artifactName, java.lang.String artifactVersion, java.lang.String scope, java.lang.String appConfig) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setDatasetProperties(java.lang.String namespace, java.lang.String datasetName, java.lang.String datasetProperties) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public java.lang.String setStreamTTL(java.lang.String namespace, java.lang.String streamName, int ttlSeconds) { + java.lang.String res = null; + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + + + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapFactory.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapFactory.java new file mode 100644 index 0000000..db21a51 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/CdapCdapFactory.java @@ -0,0 +1,60 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.servers.cdap; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.cdap.CdapAdaptor; +import org.openecomp.ncomp.cdap.CdapPackage; +import org.openecomp.ncomp.cdap.impl.CdapFactoryImpl; + + + + +import org.openecomp.ncomp.cdap.CdapCluster; + +public class CdapCdapFactory extends CdapFactoryImpl { + public static final Logger logger = Logger.getLogger(CdapCdapFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return CdapPackage.eINSTANCE; } + public CdapCdapFactory(ISiriusServer server) { + this.server = server; + } + @Override + public CdapAdaptor createCdapAdaptor() { + return new CdapCdapAdaptor(server); + } + + + @Override + public CdapCluster createCdapCluster() { + return new CdapCdapCluster(server); + } + + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApi.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApi.java new file mode 100644 index 0000000..26b8604 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApi.java @@ -0,0 +1,256 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.servers.cdap.gui; + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import java.util.Date; + +import org.openecomp.ncomp.servers.cdap.gui.logging.GuiClientApiOperationEnum; + + + + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class CdapGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(CdapGuiClientApi.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public CdapGuiClientApiProvider controller; + ISiriusServer server; + + public CdapGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new CdapGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTree); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getObject); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTimeSerie); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getTable); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getHtml); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.getGraph); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + CdapGuiClientApiProvider.ecoreSetup(); + } + public CdapGuiClientApiProvider getSomfProvider() { + return controller; + } +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiClient.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiClient.java new file mode 100644 index 0000000..7a2e601 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiClient.java @@ -0,0 +1,175 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.servers.cdap.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.servers.cdap.gui.logging.GuiClientApiOperationEnum; +import org.openecomp.ncomp.servers.cdap.gui.logging.GuiClientApiMessageEnum; + + +import org.openecomp.ncomp.servers.cdap.CdapCdapAdaptor; + + + + +@SuppressWarnings("unchecked") +public class CdapGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(CdapGuiClientApiClient.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public CdapGuiClientApiClient(String file, String name) { + CdapCdapAdaptor.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/gui", this); + } + + public CdapGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + public CdapGuiClientApiClient(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTree); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTree, e.toString()); + throw new RuntimeException("remote call failed: getTree", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getObject); + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getObject, e.toString()); + throw new RuntimeException("remote call failed: getObject", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTimeSerie); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTimeSerie, e.toString()); + throw new RuntimeException("remote call failed: getTimeSerie", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getTable); + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getTable, e.toString()); + throw new RuntimeException("remote call failed: getTable", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getHtml); + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res; + try { + res = (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getHtml, e.toString()); + throw new RuntimeException("remote call failed: getHtml", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(GuiClientApiOperationEnum.REMOTE_getGraph); + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res; + try { + res = (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + catch (Exception e) { + ecomplogger.warn(GuiClientApiMessageEnum.REMOTE_getGraph, e.toString()); + throw new RuntimeException("remote call failed: getGraph", e); + } + ecomplogger.recordMetricEventEnd(); + return res; + } + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiConsole.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiConsole.java new file mode 100644 index 0000000..5473e7c --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiConsole.java @@ -0,0 +1,123 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.ncomp.servers.cdap.gui; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class CdapGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(CdapGuiClientApiConsole.class); + protected CdapGuiClientApiClient controller; + + + + + public CdapGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new CdapGuiClientApiClient(filename,name); + client = controller.client; + + } + + public CdapGuiClientApiConsole(AbstractClient c) { + controller = new CdapGuiClientApiClient(c); + client = controller.client; + } + + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProviderTemplate.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..d39b826 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapGuiClientApiProviderTemplate.java @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.ncomp.servers.cdap.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class CdapGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(CdapGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public CdapGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapModelFactory.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapModelFactory.java new file mode 100644 index 0000000..f66ec21 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/CdapModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.servers.cdap.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.ncomp.servers.cdap.CdapCdapAdaptorServer; + + + +public class CdapModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(CdapModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public CdapModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new CdapGuiClientApi(server); + } + + + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApi.properties b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApi.properties new file mode 100644 index 0000000..8705ab8 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApi.properties @@ -0,0 +1,78 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +getTree=\ + getTree-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getObject=\ + getObject-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTimeSerie=\ + getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getTable=\ + getTable-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getHtml=\ + getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getGraph=\ + getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_getTree=\ + REMOTE-getTree-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getObject=\ + REMOTE-getObject-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTimeSerie=\ + REMOTE-getTimeSerie-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getTable=\ + REMOTE-getTable-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getHtml=\ + REMOTE-getHtml-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getGraph=\ + REMOTE-getGraph-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiMessageEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiMessageEnum.java new file mode 100644 index 0000000..670c327 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiMessageEnum.java @@ -0,0 +1,47 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.ncomp.servers.cdap.gui.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum GuiClientApiMessageEnum implements EcompMessageEnum { + + dummy, + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.ncomp.servers.cdap.gui.logging.GuiClientApi"); + } +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiOperationEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiOperationEnum.java new file mode 100644 index 0000000..0be34d7 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/gui/logging/GuiClientApiOperationEnum.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.ncomp.servers.cdap.gui.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum GuiClientApiOperationEnum implements EcompOperationEnum { + + getTree, + getObject, + getTimeSerie, + getTable, + getHtml, + getGraph, + REMOTE_getTree, + REMOTE_getObject, + REMOTE_getTimeSerie, + REMOTE_getTable, + REMOTE_getHtml, + REMOTE_getGraph; +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptor.properties b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptor.properties new file mode 100644 index 0000000..555c4fc --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptor.properties @@ -0,0 +1,6 @@ + +dummy=\ + null|\ + null|\ + null|\ + null diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorMessageEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorMessageEnum.java new file mode 100644 index 0000000..935f1cd --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorMessageEnum.java @@ -0,0 +1,35 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.ncomp.servers.cdap.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapAdaptorMessageEnum implements EcompMessageEnum { + + dummy; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.ncomp.servers.cdap.logging.CdapAdaptor"); + } +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorOperationEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorOperationEnum.java new file mode 100644 index 0000000..3260c81 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapAdaptorOperationEnum.java @@ -0,0 +1,29 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.ncomp.servers.cdap.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapAdaptorOperationEnum implements EcompOperationEnum { + +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapCluster.properties b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapCluster.properties new file mode 100644 index 0000000..b367850 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapCluster.properties @@ -0,0 +1,474 @@ + +dummy=\ + null|\ + null|\ + null|\ + null + +createNamespace=\ + createNamespace-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteNamespace=\ + deleteNamespace-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deployApp=\ + deployApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +loadArtifact=\ + loadArtifact-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteArtifact=\ + deleteArtifact-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +startFlow=\ + startFlow-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +startWorker=\ + startWorker-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +startService=\ + startService-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +startApp=\ + startApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +stopApp=\ + stopApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteApp=\ + deleteApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +loadPreferencesApp=\ + loadPreferencesApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +loadPreferencesFlow=\ + loadPreferencesFlow-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +loadPreferencesNameSpace=\ + loadPreferencesNameSpace-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesApp=\ + setPreferencesApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesFlow=\ + setPreferencesFlow-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesWorker=\ + setPreferencesWorker-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesService=\ + setPreferencesService-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setPreferencesNameSpace=\ + setPreferencesNameSpace-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setFlowRunTimeArgs=\ + setFlowRunTimeArgs-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setFlowletInstances=\ + setFlowletInstances-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +stopFlow=\ + stopFlow-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +stopWorker=\ + stopWorker-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +stopService=\ + stopService-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +truncateDataSet=\ + truncateDataSet-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteDataset=\ + deleteDataset-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +createStream=\ + createStream-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +deleteStream=\ + deleteStream-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getStreamEvents=\ + getStreamEvents-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +getStreamStats=\ + getStreamStats-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +sendEventToStream=\ + sendEventToStream-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +trucateStream=\ + trucateStream-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setStreamProperties=\ + setStreamProperties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +restartApp=\ + restartApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +createApp=\ + createApp-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +createAppWithConfig=\ + createAppWithConfig-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setDatasetProperties=\ + setDatasetProperties-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +setStreamTTL=\ + setStreamTTL-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +poll=\ + poll-FAILED-5001W|\ + {0}|\ + null|\ + Operation Failed with Exception + +REMOTE_createNamespace=\ + REMOTE-createNamespace-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteNamespace=\ + REMOTE-deleteNamespace-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deployApp=\ + REMOTE-deployApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_loadArtifact=\ + REMOTE-loadArtifact-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteArtifact=\ + REMOTE-deleteArtifact-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_startFlow=\ + REMOTE-startFlow-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_startWorker=\ + REMOTE-startWorker-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_startService=\ + REMOTE-startService-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_startApp=\ + REMOTE-startApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_stopApp=\ + REMOTE-stopApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteApp=\ + REMOTE-deleteApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_loadPreferencesApp=\ + REMOTE-loadPreferencesApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_loadPreferencesFlow=\ + REMOTE-loadPreferencesFlow-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_loadPreferencesNameSpace=\ + REMOTE-loadPreferencesNameSpace-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesApp=\ + REMOTE-setPreferencesApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesFlow=\ + REMOTE-setPreferencesFlow-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesWorker=\ + REMOTE-setPreferencesWorker-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesService=\ + REMOTE-setPreferencesService-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setPreferencesNameSpace=\ + REMOTE-setPreferencesNameSpace-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setFlowRunTimeArgs=\ + REMOTE-setFlowRunTimeArgs-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setFlowletInstances=\ + REMOTE-setFlowletInstances-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_stopFlow=\ + REMOTE-stopFlow-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_stopWorker=\ + REMOTE-stopWorker-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_stopService=\ + REMOTE-stopService-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_truncateDataSet=\ + REMOTE-truncateDataSet-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteDataset=\ + REMOTE-deleteDataset-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_createStream=\ + REMOTE-createStream-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_deleteStream=\ + REMOTE-deleteStream-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getStreamEvents=\ + REMOTE-getStreamEvents-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_getStreamStats=\ + REMOTE-getStreamStats-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_sendEventToStream=\ + REMOTE-sendEventToStream-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_trucateStream=\ + REMOTE-trucateStream-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setStreamProperties=\ + REMOTE-setStreamProperties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_restartApp=\ + REMOTE-restartApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_createApp=\ + REMOTE-createApp-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_createAppWithConfig=\ + REMOTE-createAppWithConfig-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setDatasetProperties=\ + REMOTE-setDatasetProperties-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_setStreamTTL=\ + REMOTE-setStreamTTL-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception + +REMOTE_poll=\ + REMOTE-poll-FAILED-5001W|\ + {0}|\ + null|\ + Remote Operation Failed with Exception diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterMessageEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterMessageEnum.java new file mode 100644 index 0000000..49490a7 --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterMessageEnum.java @@ -0,0 +1,113 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.ncomp.servers.cdap.logging; + +import com.att.eelf.i18n.EELFResourceManager; +import org.openecomp.logger.EcompMessageEnum; + +public enum CdapClusterMessageEnum implements EcompMessageEnum { + + dummy, + createNamespace, + deleteNamespace, + deployApp, + loadArtifact, + deleteArtifact, + startFlow, + startWorker, + startService, + startApp, + stopApp, + deleteApp, + loadPreferencesApp, + loadPreferencesFlow, + loadPreferencesNameSpace, + setPreferencesApp, + setPreferencesFlow, + setPreferencesWorker, + setPreferencesService, + setPreferencesNameSpace, + setFlowRunTimeArgs, + setFlowletInstances, + stopFlow, + stopWorker, + stopService, + truncateDataSet, + deleteDataset, + createStream, + deleteStream, + getStreamEvents, + getStreamStats, + sendEventToStream, + trucateStream, + setStreamProperties, + restartApp, + createApp, + createAppWithConfig, + setDatasetProperties, + setStreamTTL, + poll, + REMOTE_createNamespace, + REMOTE_deleteNamespace, + REMOTE_deployApp, + REMOTE_loadArtifact, + REMOTE_deleteArtifact, + REMOTE_startFlow, + REMOTE_startWorker, + REMOTE_startService, + REMOTE_startApp, + REMOTE_stopApp, + REMOTE_deleteApp, + REMOTE_loadPreferencesApp, + REMOTE_loadPreferencesFlow, + REMOTE_loadPreferencesNameSpace, + REMOTE_setPreferencesApp, + REMOTE_setPreferencesFlow, + REMOTE_setPreferencesWorker, + REMOTE_setPreferencesService, + REMOTE_setPreferencesNameSpace, + REMOTE_setFlowRunTimeArgs, + REMOTE_setFlowletInstances, + REMOTE_stopFlow, + REMOTE_stopWorker, + REMOTE_stopService, + REMOTE_truncateDataSet, + REMOTE_deleteDataset, + REMOTE_createStream, + REMOTE_deleteStream, + REMOTE_getStreamEvents, + REMOTE_getStreamStats, + REMOTE_sendEventToStream, + REMOTE_trucateStream, + REMOTE_setStreamProperties, + REMOTE_restartApp, + REMOTE_createApp, + REMOTE_createAppWithConfig, + REMOTE_setDatasetProperties, + REMOTE_setStreamTTL, + REMOTE_poll; + + static { + EELFResourceManager.loadMessageBundle("org.openecomp.ncomp.servers.cdap.logging.CdapCluster"); + } +} diff --git a/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterOperationEnum.java b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterOperationEnum.java new file mode 100644 index 0000000..559f80e --- /dev/null +++ b/ncomp-cdap-adaptor/src/main/sirius-gen/org/openecomp/ncomp/servers/cdap/logging/CdapClusterOperationEnum.java @@ -0,0 +1,107 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + + +package org.openecomp.ncomp.servers.cdap.logging; + +import org.openecomp.entity.EcompOperationEnum; + +public enum CdapClusterOperationEnum implements EcompOperationEnum { + + createNamespace, + deleteNamespace, + deployApp, + loadArtifact, + deleteArtifact, + startFlow, + startWorker, + startService, + startApp, + stopApp, + deleteApp, + loadPreferencesApp, + loadPreferencesFlow, + loadPreferencesNameSpace, + setPreferencesApp, + setPreferencesFlow, + setPreferencesWorker, + setPreferencesService, + setPreferencesNameSpace, + setFlowRunTimeArgs, + setFlowletInstances, + stopFlow, + stopWorker, + stopService, + truncateDataSet, + deleteDataset, + createStream, + deleteStream, + getStreamEvents, + getStreamStats, + sendEventToStream, + trucateStream, + setStreamProperties, + restartApp, + createApp, + createAppWithConfig, + setDatasetProperties, + setStreamTTL, + poll, + REMOTE_createNamespace, + REMOTE_deleteNamespace, + REMOTE_deployApp, + REMOTE_loadArtifact, + REMOTE_deleteArtifact, + REMOTE_startFlow, + REMOTE_startWorker, + REMOTE_startService, + REMOTE_startApp, + REMOTE_stopApp, + REMOTE_deleteApp, + REMOTE_loadPreferencesApp, + REMOTE_loadPreferencesFlow, + REMOTE_loadPreferencesNameSpace, + REMOTE_setPreferencesApp, + REMOTE_setPreferencesFlow, + REMOTE_setPreferencesWorker, + REMOTE_setPreferencesService, + REMOTE_setPreferencesNameSpace, + REMOTE_setFlowRunTimeArgs, + REMOTE_setFlowletInstances, + REMOTE_stopFlow, + REMOTE_stopWorker, + REMOTE_stopService, + REMOTE_truncateDataSet, + REMOTE_deleteDataset, + REMOTE_createStream, + REMOTE_deleteStream, + REMOTE_getStreamEvents, + REMOTE_getStreamStats, + REMOTE_sendEventToStream, + REMOTE_trucateStream, + REMOTE_setStreamProperties, + REMOTE_restartApp, + REMOTE_createApp, + REMOTE_createAppWithConfig, + REMOTE_setDatasetProperties, + REMOTE_setStreamTTL, + REMOTE_poll; +} diff --git a/ncomp-cdap-model/.classpath b/ncomp-cdap-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/ncomp-cdap-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ncomp-cdap-model/.gitignore b/ncomp-cdap-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/ncomp-cdap-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/ncomp-cdap-model/.project b/ncomp-cdap-model/.project new file mode 100644 index 0000000..4525042 --- /dev/null +++ b/ncomp-cdap-model/.project @@ -0,0 +1,34 @@ + + + ncomp-cdap-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/ncomp-cdap-model/.settings/org.eclipse.jdt.core.prefs b/ncomp-cdap-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/ncomp-cdap-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/ncomp-cdap-model/.settings/org.eclipse.m2e.core.prefs b/ncomp-cdap-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-cdap-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-cdap-model/LICENSE.txt b/ncomp-cdap-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-cdap-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============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============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-cdap-model/META-INF/MANIFEST.MF b/ncomp-cdap-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..18ec63b --- /dev/null +++ b/ncomp-cdap-model/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: ncomp-cdap-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.ncomp.cdap, + org.openecomp.ncomp.cdap.impl, + org.openecomp.ncomp.cdap.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" +Bundle-ActivationPolicy: lazy diff --git a/ncomp-cdap-model/build.properties b/ncomp-cdap-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/ncomp-cdap-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/ncomp-cdap-model/plugin.properties b/ncomp-cdap-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/ncomp-cdap-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/ncomp-cdap-model/plugin.xml b/ncomp-cdap-model/plugin.xml new file mode 100644 index 0000000..45a631c --- /dev/null +++ b/ncomp-cdap-model/plugin.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/ncomp-cdap-model/pom.xml b/ncomp-cdap-model/pom.xml new file mode 100644 index 0000000..a4d2e7f --- /dev/null +++ b/ncomp-cdap-model/pom.xml @@ -0,0 +1,18 @@ + + 4.0.0 + org.openecomp.ncomp.cdap + ncomp-cdap-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapAdaptor.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapAdaptor.java new file mode 100644 index 0000000..a3a650b --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapAdaptor.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.ncomp.cdap; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Adaptor'. + * + * + * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapAdaptor() + * @model + * @generated + */ +public interface CdapAdaptor extends EObject { +} // CdapAdaptor diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApi.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApi.java new file mode 100644 index 0000000..d0caa06 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApi.java @@ -0,0 +1,345 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Api'. + * + * + * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapApi() + * @model + * @generated + */ +public interface CdapApi extends EObject { + /** + * + * + * @model unique="false" namespaceUnique="false" + * @generated + */ + String createNamespace(String namespace); + + /** + * + * + * @model unique="false" namespaceUnique="false" + * @generated + */ + String deleteNamespace(String namespace); + + /** + * + * + * @model unique="false" namespaceUnique="false" jarfileUnique="false" + * @generated + */ + String deployApp(String namespace, String jarfile); + + /** + * + * + * @model unique="false" namespaceUnique="false" artifactNameUnique="false" jarfileUnique="false" versionUnique="false" + * @generated + */ + String loadArtifact(String namespace, String artifactName, String jarfile, String version); + + /** + * + * + * @model unique="false" namespaceUnique="false" artifactNameUnique="false" artifactVersionUnique="false" + * @generated + */ + String deleteArtifact(String namespace, String artifactName, String artifactVersion); + + /** + * + * + * @model unique="false" namespaceUnique="false" appNameUnique="false" flowIdUnique="false" extraArgsUnique="false" + * @generated + */ + String startFlow(String namespace, String appName, String flowId, String extraArgs); + + /** + * + * + * @model unique="false" namespaceUnique="false" appNameUnique="false" workerIdUnique="false" extraArgsUnique="false" + * @generated + */ + String startWorker(String namespace, String appName, String workerId, String extraArgs); + + /** + * + * + * @model unique="false" namespaceUnique="false" appNameUnique="false" serviceIdUnique="false" extraArgsUnique="false" + * @generated + */ + String startService(String namespace, String appName, String serviceId, String extraArgs); + + /** + * + * + * @model unique="false" namespaceUnique="false" appNameUnique="false" + * @generated + */ + String startApp(String namespace, String appName); + + /** + * + * + * @model unique="false" namespaceUnique="false" appNameUnique="false" + * @generated + */ + String stopApp(String namespace, String appName); + + /** + * + * + * @model unique="false" namespaceUnique="false" appNameUnique="false" + * @generated + */ + String deleteApp(String namespace, String appName); + + /** + * + * + * @model unique="false" namespaceUnique="false" prefsFileUnique="false" appIdUnique="false" + * @generated + */ + String loadPreferencesApp(String namespace, String prefsFile, String appId); + + /** + * + * + * @model unique="false" namespaceUnique="false" prefsFileUnique="false" appIdUnique="false" flowIdUnique="false" + * @generated + */ + String loadPreferencesFlow(String namespace, String prefsFile, String appId, String flowId); + + /** + * + * + * @model unique="false" namespaceUnique="false" prefsFileUnique="false" + * @generated + */ + String loadPreferencesNameSpace(String namespace, String prefsFile); + + /** + * + * + * @model unique="false" namespaceUnique="false" prefsStringUnique="false" appIdUnique="false" + * @generated + */ + String setPreferencesApp(String namespace, String prefsString, String appId); + + /** + * + * + * @model unique="false" namespaceUnique="false" prefsStringUnique="false" appIdUnique="false" flowIdUnique="false" + * @generated + */ + String setPreferencesFlow(String namespace, String prefsString, String appId, String flowId); + + /** + * + * + * @model unique="false" namespaceUnique="false" prefsStringUnique="false" appIdUnique="false" workerIdUnique="false" + * @generated + */ + String setPreferencesWorker(String namespace, String prefsString, String appId, String workerId); + + /** + * + * + * @model unique="false" namespaceUnique="false" prefsStringUnique="false" appIdUnique="false" serviceIdUnique="false" + * @generated + */ + String setPreferencesService(String namespace, String prefsString, String appId, String serviceId); + + /** + * + * + * @model unique="false" namespaceUnique="false" prefsStringUnique="false" + * @generated + */ + String setPreferencesNameSpace(String namespace, String prefsString); + + /** + * + * + * @model unique="false" namespaceUnique="false" appIdUnique="false" flowIdUnique="false" argsUnique="false" + * @generated + */ + String setFlowRunTimeArgs(String namespace, String appId, String flowId, String args); + + /** + * + * + * @model unique="false" namespaceUnique="false" appIdUnique="false" flowIdUnique="false" flowletIdUnique="false" nInstancesUnique="false" + * @generated + */ + String setFlowletInstances(String namespace, String appId, String flowId, String flowletId, int nInstances); + + /** + * + * + * @model unique="false" namespaceUnique="false" appIdUnique="false" flowIdUnique="false" + * @generated + */ + String stopFlow(String namespace, String appId, String flowId); + + /** + * + * + * @model unique="false" namespaceUnique="false" appIdUnique="false" workerIdUnique="false" + * @generated + */ + String stopWorker(String namespace, String appId, String workerId); + + /** + * + * + * @model unique="false" namespaceUnique="false" appIdUnique="false" serviceIdUnique="false" + * @generated + */ + String stopService(String namespace, String appId, String serviceId); + + /** + * + * + * @model unique="false" namespaceUnique="false" datasetNameUnique="false" + * @generated + */ + String truncateDataSet(String namespace, String datasetName); + + /** + * + * + * @model unique="false" namespaceUnique="false" datasetNameUnique="false" + * @generated + */ + String deleteDataset(String namespace, String datasetName); + + /** + * + * + * @model unique="false" namespaceUnique="false" newStreamIdUnique="false" + * @generated + */ + String createStream(String namespace, String newStreamId); + + /** + * + * + * @model unique="false" namespaceUnique="false" streamIdUnique="false" + * @generated + */ + String deleteStream(String namespace, String streamId); + + /** + * + * + * @model unique="false" namespaceUnique="false" streamIdUnique="false" startTimeUnique="false" endTimeUnique="false" limitUnique="false" + * @generated + */ + EList getStreamEvents(String namespace, String streamId, String startTime, String endTime, int limit); + + /** + * + * + * @model unique="false" namespaceUnique="false" streamIdUnique="false" startTimeUnique="false" endTimeUnique="false" limitUnique="false" + * @generated + */ + EList getStreamStats(String namespace, String streamId, String startTime, String endTime, int limit); + + /** + * + * + * @model unique="false" namespaceUnique="false" streamIdUnique="false" eventUnique="false" + * @generated + */ + String sendEventToStream(String namespace, String streamId, String event); + + /** + * + * + * @model unique="false" namespaceUnique="false" streamIdUnique="false" + * @generated + */ + String trucateStream(String namespace, String streamId); + + /** + * + * + * @model unique="false" namespaceUnique="false" streamIdUnique="false" propsFileUnique="false" + * @generated + */ + String setStreamProperties(String namespace, String streamId, String propsFile); + + /** + * + * + * @model unique="false" namespaceUnique="false" appIdUnique="false" progTypesUnique="false" + * @generated + */ + String restartApp(String namespace, String appId, String progTypes); + + /** + * + * + * @model unique="false" namespaceUnique="false" appIdUnique="false" artifactNameUnique="false" artifactVersionUnique="false" scopeUnique="false" + * @generated + */ + String createApp(String namespace, String appId, String artifactName, String artifactVersion, String scope); + + /** + * + * + * @model unique="false" namespaceUnique="false" appIdUnique="false" artifactNameUnique="false" artifactVersionUnique="false" scopeUnique="false" appConfigUnique="false" + * @generated + */ + String createAppWithConfig(String namespace, String appId, String artifactName, String artifactVersion, String scope, String appConfig); + + /** + * + * + * @model unique="false" namespaceUnique="false" datasetNameUnique="false" datasetPropertiesUnique="false" + * @generated + */ + String setDatasetProperties(String namespace, String datasetName, String datasetProperties); + + /** + * + * + * @model unique="false" namespaceUnique="false" streamNameUnique="false" ttlSecondsUnique="false" + * @generated + */ + String setStreamTTL(String namespace, String streamName, int ttlSeconds); + +} // CdapApi diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApplication.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApplication.java new file mode 100644 index 0000000..ff6e3f3 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapApplication.java @@ -0,0 +1,179 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Application'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapApplication#getType Type}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapApplication#getId Id}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapApplication#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapApplication#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapApplication#getArtifact Artifact}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapApplication() + * @model + * @generated + */ +public interface CdapApplication extends NamedEntity { + /** + * Returns the value of the 'Type' attribute. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapApplication_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapApplication#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the 'Id' attribute. + * + *

+ * If the meaning of the 'Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Id' attribute. + * @see #setId(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapApplication_Id() + * @model unique="false" + * @generated + */ + String getId(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapApplication#getId Id}' attribute. + * + * + * @param value the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(String value); + + /** + * Returns the value of the 'Version' attribute. + * + *

+ * If the meaning of the 'Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapApplication_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapApplication#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + + /** + * Returns the value of the 'Description' attribute. + * + *

+ * If the meaning of the 'Description' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapApplication_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapApplication#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Artifact' containment reference. + * + *

+ * If the meaning of the 'Artifact' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Artifact' containment reference. + * @see #setArtifact(CdapArtifact) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapApplication_Artifact() + * @model containment="true" + * @generated + */ + CdapArtifact getArtifact(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapApplication#getArtifact Artifact}' containment reference. + * + * + * @param value the new value of the 'Artifact' containment reference. + * @see #getArtifact() + * @generated + */ + void setArtifact(CdapArtifact value); + +} // CdapApplication diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapArtifact.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapArtifact.java new file mode 100644 index 0000000..6582a5a --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapArtifact.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Artifact'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapArtifact#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapArtifact#getScope Scope}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapArtifact() + * @model + * @generated + */ +public interface CdapArtifact extends NamedEntity { + /** + * Returns the value of the 'Version' attribute. + * + *

+ * If the meaning of the 'Version' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapArtifact_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapArtifact#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + + /** + * Returns the value of the 'Scope' attribute. + * + *

+ * If the meaning of the 'Scope' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Scope' attribute. + * @see #setScope(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapArtifact_Scope() + * @model unique="false" + * @generated + */ + String getScope(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapArtifact#getScope Scope}' attribute. + * + * + * @param value the new value of the 'Scope' attribute. + * @see #getScope() + * @generated + */ + void setScope(String value); + +} // CdapArtifact diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapCluster.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapCluster.java new file mode 100644 index 0000000..4694c32 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapCluster.java @@ -0,0 +1,173 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Cluster'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapCluster#getBaseUrl Base Url}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapCluster#getPollingFrequency Polling Frequency}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapCluster#isRemote Remote}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapCluster#getConfigurations Configurations}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapCluster#getNamespaces Namespaces}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapCluster() + * @model + * @generated + */ +public interface CdapCluster extends NamedEntity, CdapApi { + /** + * Returns the value of the 'Base Url' attribute. + * + *

+ * If the meaning of the 'Base Url' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Base Url' attribute. + * @see #setBaseUrl(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapCluster_BaseUrl() + * @model unique="false" + * @generated + */ + String getBaseUrl(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapCluster#getBaseUrl Base Url}' attribute. + * + * + * @param value the new value of the 'Base Url' attribute. + * @see #getBaseUrl() + * @generated + */ + void setBaseUrl(String value); + + /** + * Returns the value of the 'Polling Frequency' attribute. + * The default value is "300000". + * + *

+ * If the meaning of the 'Polling Frequency' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Polling Frequency' attribute. + * @see #setPollingFrequency(long) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapCluster_PollingFrequency() + * @model default="300000" unique="false" + * @generated + */ + long getPollingFrequency(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapCluster#getPollingFrequency Polling Frequency}' attribute. + * + * + * @param value the new value of the 'Polling Frequency' attribute. + * @see #getPollingFrequency() + * @generated + */ + void setPollingFrequency(long value); + + /** + * Returns the value of the 'Remote' attribute. + * The default value is "false". + * + *

+ * If the meaning of the 'Remote' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Remote' attribute. + * @see #setRemote(boolean) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapCluster_Remote() + * @model default="false" unique="false" + * @generated + */ + boolean isRemote(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapCluster#isRemote Remote}' attribute. + * + * + * @param value the new value of the 'Remote' attribute. + * @see #isRemote() + * @generated + */ + void setRemote(boolean value); + + /** + * Returns the value of the 'Configurations' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapConfiguration}. + * + *

+ * If the meaning of the 'Configurations' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Configurations' containment reference list. + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapCluster_Configurations() + * @model containment="true" ordered="false" + * @generated + */ + EList getConfigurations(); + + /** + * Returns the value of the 'Namespaces' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapNamespace}. + * It is bidirectional and its opposite is '{@link org.openecomp.ncomp.cdap.CdapNamespace#getCluster Cluster}'. + * + *

+ * If the meaning of the 'Namespaces' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Namespaces' containment reference list. + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapCluster_Namespaces() + * @see org.openecomp.ncomp.cdap.CdapNamespace#getCluster + * @model opposite="cluster" containment="true" ordered="false" + * @generated + */ + EList getNamespaces(); + + /** + * + * + * @model + * @generated + */ + void poll(); + +} // CdapCluster diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapConfiguration.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapConfiguration.java new file mode 100644 index 0000000..899cf22 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapConfiguration.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapConfiguration#getValue Value}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapConfiguration#getSource Source}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapConfiguration() + * @model + * @generated + */ +public interface CdapConfiguration extends NamedEntity { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapConfiguration_Value() + * @model unique="false" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapConfiguration#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + + /** + * Returns the value of the 'Source' attribute. + * + *

+ * If the meaning of the 'Source' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Source' attribute. + * @see #setSource(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapConfiguration_Source() + * @model unique="false" + * @generated + */ + String getSource(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapConfiguration#getSource Source}' attribute. + * + * + * @param value the new value of the 'Source' attribute. + * @see #getSource() + * @generated + */ + void setSource(String value); + +} // CdapConfiguration diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDataset.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDataset.java new file mode 100644 index 0000000..f45276e --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDataset.java @@ -0,0 +1,117 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Dataset'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapDataset#getType Type}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapDataset#getProperties Properties}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapDataset#getSchema Schema}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapDataset() + * @model + * @generated + */ +public interface CdapDataset extends NamedEntity { + /** + * Returns the value of the 'Type' attribute. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapDataset_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapDataset#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the 'Properties' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapKeyPair}. + * + *

+ * If the meaning of the 'Properties' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Properties' containment reference list. + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapDataset_Properties() + * @model containment="true" ordered="false" + * @generated + */ + EList getProperties(); + + /** + * Returns the value of the 'Schema' containment reference. + * + *

+ * If the meaning of the 'Schema' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Schema' containment reference. + * @see #setSchema(CdapDatasetSchema) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapDataset_Schema() + * @model containment="true" + * @generated + */ + CdapDatasetSchema getSchema(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapDataset#getSchema Schema}' containment reference. + * + * + * @param value the new value of the 'Schema' containment reference. + * @see #getSchema() + * @generated + */ + void setSchema(CdapDatasetSchema value); + +} // CdapDataset diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDatasetSchema.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDatasetSchema.java new file mode 100644 index 0000000..d8190da --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDatasetSchema.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Dataset Schema'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapDatasetSchema#getType Type}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapDatasetSchema#getFields Fields}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapDatasetSchema() + * @model + * @generated + */ +public interface CdapDatasetSchema extends NamedEntity { + /** + * Returns the value of the 'Type' attribute. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapDatasetSchema_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapDatasetSchema#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the 'Fields' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapDatasetSchemaField}. + * + *

+ * If the meaning of the 'Fields' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Fields' containment reference list. + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapDatasetSchema_Fields() + * @model containment="true" + * @generated + */ + EList getFields(); + +} // CdapDatasetSchema diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDatasetSchemaField.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDatasetSchemaField.java new file mode 100644 index 0000000..9583c6c --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapDatasetSchemaField.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Dataset Schema Field'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapDatasetSchemaField#getType Type}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapDatasetSchemaField() + * @model + * @generated + */ +public interface CdapDatasetSchemaField extends NamedEntity { + /** + * Returns the value of the 'Type' attribute. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapDatasetSchemaField_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapDatasetSchemaField#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + +} // CdapDatasetSchemaField diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapEntityWithPreferences.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapEntityWithPreferences.java new file mode 100644 index 0000000..3688844 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapEntityWithPreferences.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.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Entity With Preferences'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences#getPreferences Preferences}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapEntityWithPreferences() + * @model + * @generated + */ +public interface CdapEntityWithPreferences extends NamedEntity { + /** + * Returns the value of the 'Preferences' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapKeyPair}. + * + *

+ * If the meaning of the 'Preferences' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Preferences' containment reference list. + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapEntityWithPreferences_Preferences() + * @model containment="true" ordered="false" + * @generated + */ + EList getPreferences(); + +} // CdapEntityWithPreferences diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapFactory.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapFactory.java new file mode 100644 index 0000000..9887605 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapFactory.java @@ -0,0 +1,162 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.cdap.CdapPackage + * @generated + */ +public interface CdapFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + CdapFactory eINSTANCE = org.openecomp.ncomp.cdap.impl.CdapFactoryImpl.init(); + + /** + * Returns a new object of class 'Adaptor'. + * + * + * @return a new object of class 'Adaptor'. + * @generated + */ + CdapAdaptor createCdapAdaptor(); + + /** + * Returns a new object of class 'Cluster'. + * + * + * @return a new object of class 'Cluster'. + * @generated + */ + CdapCluster createCdapCluster(); + + /** + * Returns a new object of class 'Api'. + * + * + * @return a new object of class 'Api'. + * @generated + */ + CdapApi createCdapApi(); + + /** + * Returns a new object of class 'Configuration'. + * + * + * @return a new object of class 'Configuration'. + * @generated + */ + CdapConfiguration createCdapConfiguration(); + + /** + * Returns a new object of class 'Namespace'. + * + * + * @return a new object of class 'Namespace'. + * @generated + */ + CdapNamespace createCdapNamespace(); + + /** + * Returns a new object of class 'Key Pair'. + * + * + * @return a new object of class 'Key Pair'. + * @generated + */ + CdapKeyPair createCdapKeyPair(); + + /** + * Returns a new object of class 'Entity With Preferences'. + * + * + * @return a new object of class 'Entity With Preferences'. + * @generated + */ + CdapEntityWithPreferences createCdapEntityWithPreferences(); + + /** + * Returns a new object of class 'Dataset'. + * + * + * @return a new object of class 'Dataset'. + * @generated + */ + CdapDataset createCdapDataset(); + + /** + * Returns a new object of class 'Dataset Schema'. + * + * + * @return a new object of class 'Dataset Schema'. + * @generated + */ + CdapDatasetSchema createCdapDatasetSchema(); + + /** + * Returns a new object of class 'Dataset Schema Field'. + * + * + * @return a new object of class 'Dataset Schema Field'. + * @generated + */ + CdapDatasetSchemaField createCdapDatasetSchemaField(); + + /** + * Returns a new object of class 'Application'. + * + * + * @return a new object of class 'Application'. + * @generated + */ + CdapApplication createCdapApplication(); + + /** + * Returns a new object of class 'Artifact'. + * + * + * @return a new object of class 'Artifact'. + * @generated + */ + CdapArtifact createCdapArtifact(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + CdapPackage getCdapPackage(); + +} //CdapFactory diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapKeyPair.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapKeyPair.java new file mode 100644 index 0000000..bc2fb98 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapKeyPair.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Key Pair'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapKeyPair#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapKeyPair() + * @model + * @generated + */ +public interface CdapKeyPair extends NamedEntity { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapKeyPair_Value() + * @model unique="false" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapKeyPair#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // CdapKeyPair diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapNamespace.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapNamespace.java new file mode 100644 index 0000000..e6bd6b0 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapNamespace.java @@ -0,0 +1,153 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Namespace'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.cdap.CdapNamespace#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapNamespace#getConfig Config}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapNamespace#getDatasets Datasets}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapNamespace#getApplications Applications}
  • + *
  • {@link org.openecomp.ncomp.cdap.CdapNamespace#getCluster Cluster}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapNamespace() + * @model + * @generated + */ +public interface CdapNamespace extends NamedEntity { + /** + * Returns the value of the 'Description' attribute. + * + *

+ * If the meaning of the 'Description' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapNamespace_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapNamespace#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Config' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapKeyPair}. + * + *

+ * If the meaning of the 'Config' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Config' containment reference list. + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapNamespace_Config() + * @model containment="true" ordered="false" + * @generated + */ + EList getConfig(); + + /** + * Returns the value of the 'Datasets' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapDataset}. + * + *

+ * If the meaning of the 'Datasets' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Datasets' containment reference list. + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapNamespace_Datasets() + * @model containment="true" ordered="false" + * @generated + */ + EList getDatasets(); + + /** + * Returns the value of the 'Applications' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.cdap.CdapApplication}. + * + *

+ * If the meaning of the 'Applications' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Applications' containment reference list. + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapNamespace_Applications() + * @model containment="true" ordered="false" + * @generated + */ + EList getApplications(); + + /** + * Returns the value of the 'Cluster' container reference. + * It is bidirectional and its opposite is '{@link org.openecomp.ncomp.cdap.CdapCluster#getNamespaces Namespaces}'. + * + *

+ * If the meaning of the 'Cluster' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Cluster' container reference. + * @see #setCluster(CdapCluster) + * @see org.openecomp.ncomp.cdap.CdapPackage#getCdapNamespace_Cluster() + * @see org.openecomp.ncomp.cdap.CdapCluster#getNamespaces + * @model opposite="namespaces" transient="false" + * @generated + */ + CdapCluster getCluster(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.cdap.CdapNamespace#getCluster Cluster}' container reference. + * + * + * @param value the new value of the 'Cluster' container reference. + * @see #getCluster() + * @generated + */ + void setCluster(CdapCluster value); + +} // CdapNamespace diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapPackage.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapPackage.java new file mode 100644 index 0000000..f3d0c90 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/CdapPackage.java @@ -0,0 +1,3197 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.cdap.CdapFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-cdap-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp'" + * @generated + */ +public interface CdapPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "cdap"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.cdap"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "cdap"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + CdapPackage eINSTANCE = org.openecomp.ncomp.cdap.impl.CdapPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl Adaptor}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapAdaptor() + * @generated + */ + int CDAP_ADAPTOR = 0; + + /** + * The number of structural features of the 'Adaptor' class. + * + * + * @generated + * @ordered + */ + int CDAP_ADAPTOR_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Adaptor' class. + * + * + * @generated + * @ordered + */ + int CDAP_ADAPTOR_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapClusterImpl Cluster}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapClusterImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapCluster() + * @generated + */ + int CDAP_CLUSTER = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Base Url' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER__BASE_URL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Polling Frequency' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER__POLLING_FREQUENCY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Remote' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER__REMOTE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Configurations' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER__CONFIGURATIONS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Namespaces' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER__NAMESPACES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Cluster' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The operation id for the 'Create Namespace' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___CREATE_NAMESPACE__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Delete Namespace' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___DELETE_NAMESPACE__STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 1; + + /** + * The operation id for the 'Deploy App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___DEPLOY_APP__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 2; + + /** + * The operation id for the 'Load Artifact' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 3; + + /** + * The operation id for the 'Delete Artifact' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___DELETE_ARTIFACT__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 4; + + /** + * The operation id for the 'Start Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___START_FLOW__STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 5; + + /** + * The operation id for the 'Start Worker' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___START_WORKER__STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 6; + + /** + * The operation id for the 'Start Service' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___START_SERVICE__STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 7; + + /** + * The operation id for the 'Start App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___START_APP__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 8; + + /** + * The operation id for the 'Stop App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___STOP_APP__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 9; + + /** + * The operation id for the 'Delete App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___DELETE_APP__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 10; + + /** + * The operation id for the 'Load Preferences App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___LOAD_PREFERENCES_APP__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 11; + + /** + * The operation id for the 'Load Preferences Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 12; + + /** + * The operation id for the 'Load Preferences Name Space' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 13; + + /** + * The operation id for the 'Set Preferences App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_PREFERENCES_APP__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 14; + + /** + * The operation id for the 'Set Preferences Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 15; + + /** + * The operation id for the 'Set Preferences Worker' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 16; + + /** + * The operation id for the 'Set Preferences Service' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 17; + + /** + * The operation id for the 'Set Preferences Name Space' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_PREFERENCES_NAME_SPACE__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 18; + + /** + * The operation id for the 'Set Flow Run Time Args' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 19; + + /** + * The operation id for the 'Set Flowlet Instances' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 20; + + /** + * The operation id for the 'Stop Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___STOP_FLOW__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 21; + + /** + * The operation id for the 'Stop Worker' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___STOP_WORKER__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 22; + + /** + * The operation id for the 'Stop Service' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___STOP_SERVICE__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 23; + + /** + * The operation id for the 'Truncate Data Set' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___TRUNCATE_DATA_SET__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 24; + + /** + * The operation id for the 'Delete Dataset' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___DELETE_DATASET__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 25; + + /** + * The operation id for the 'Create Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___CREATE_STREAM__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 26; + + /** + * The operation id for the 'Delete Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___DELETE_STREAM__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 27; + + /** + * The operation id for the 'Get Stream Events' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 28; + + /** + * The operation id for the 'Get Stream Stats' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 29; + + /** + * The operation id for the 'Send Event To Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 30; + + /** + * The operation id for the 'Trucate Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___TRUCATE_STREAM__STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 31; + + /** + * The operation id for the 'Set Stream Properties' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_STREAM_PROPERTIES__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 32; + + /** + * The operation id for the 'Restart App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___RESTART_APP__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 33; + + /** + * The operation id for the 'Create App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___CREATE_APP__STRING_STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 34; + + /** + * The operation id for the 'Create App With Config' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 35; + + /** + * The operation id for the 'Set Dataset Properties' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_DATASET_PROPERTIES__STRING_STRING_STRING = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 36; + + /** + * The operation id for the 'Set Stream TTL' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___SET_STREAM_TTL__STRING_STRING_INT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 37; + + /** + * The operation id for the 'Poll' operation. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER___POLL = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 38; + + /** + * The number of operations of the 'Cluster' class. + * + * + * @generated + * @ordered + */ + int CDAP_CLUSTER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 39; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapApiImpl Api}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapApiImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapApi() + * @generated + */ + int CDAP_API = 2; + + /** + * The number of structural features of the 'Api' class. + * + * + * @generated + * @ordered + */ + int CDAP_API_FEATURE_COUNT = 0; + + /** + * The operation id for the 'Create Namespace' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___CREATE_NAMESPACE__STRING = 0; + + /** + * The operation id for the 'Delete Namespace' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___DELETE_NAMESPACE__STRING = 1; + + /** + * The operation id for the 'Deploy App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___DEPLOY_APP__STRING_STRING = 2; + + /** + * The operation id for the 'Load Artifact' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___LOAD_ARTIFACT__STRING_STRING_STRING_STRING = 3; + + /** + * The operation id for the 'Delete Artifact' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___DELETE_ARTIFACT__STRING_STRING_STRING = 4; + + /** + * The operation id for the 'Start Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___START_FLOW__STRING_STRING_STRING_STRING = 5; + + /** + * The operation id for the 'Start Worker' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___START_WORKER__STRING_STRING_STRING_STRING = 6; + + /** + * The operation id for the 'Start Service' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___START_SERVICE__STRING_STRING_STRING_STRING = 7; + + /** + * The operation id for the 'Start App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___START_APP__STRING_STRING = 8; + + /** + * The operation id for the 'Stop App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___STOP_APP__STRING_STRING = 9; + + /** + * The operation id for the 'Delete App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___DELETE_APP__STRING_STRING = 10; + + /** + * The operation id for the 'Load Preferences App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING = 11; + + /** + * The operation id for the 'Load Preferences Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = 12; + + /** + * The operation id for the 'Load Preferences Name Space' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING = 13; + + /** + * The operation id for the 'Set Preferences App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_PREFERENCES_APP__STRING_STRING_STRING = 14; + + /** + * The operation id for the 'Set Preferences Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = 15; + + /** + * The operation id for the 'Set Preferences Worker' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING = 16; + + /** + * The operation id for the 'Set Preferences Service' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING = 17; + + /** + * The operation id for the 'Set Preferences Name Space' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_PREFERENCES_NAME_SPACE__STRING_STRING = 18; + + /** + * The operation id for the 'Set Flow Run Time Args' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING = 19; + + /** + * The operation id for the 'Set Flowlet Instances' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT = 20; + + /** + * The operation id for the 'Stop Flow' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___STOP_FLOW__STRING_STRING_STRING = 21; + + /** + * The operation id for the 'Stop Worker' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___STOP_WORKER__STRING_STRING_STRING = 22; + + /** + * The operation id for the 'Stop Service' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___STOP_SERVICE__STRING_STRING_STRING = 23; + + /** + * The operation id for the 'Truncate Data Set' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___TRUNCATE_DATA_SET__STRING_STRING = 24; + + /** + * The operation id for the 'Delete Dataset' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___DELETE_DATASET__STRING_STRING = 25; + + /** + * The operation id for the 'Create Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___CREATE_STREAM__STRING_STRING = 26; + + /** + * The operation id for the 'Delete Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___DELETE_STREAM__STRING_STRING = 27; + + /** + * The operation id for the 'Get Stream Events' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT = 28; + + /** + * The operation id for the 'Get Stream Stats' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT = 29; + + /** + * The operation id for the 'Send Event To Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SEND_EVENT_TO_STREAM__STRING_STRING_STRING = 30; + + /** + * The operation id for the 'Trucate Stream' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___TRUCATE_STREAM__STRING_STRING = 31; + + /** + * The operation id for the 'Set Stream Properties' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_STREAM_PROPERTIES__STRING_STRING_STRING = 32; + + /** + * The operation id for the 'Restart App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___RESTART_APP__STRING_STRING_STRING = 33; + + /** + * The operation id for the 'Create App' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___CREATE_APP__STRING_STRING_STRING_STRING_STRING = 34; + + /** + * The operation id for the 'Create App With Config' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING = 35; + + /** + * The operation id for the 'Set Dataset Properties' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_DATASET_PROPERTIES__STRING_STRING_STRING = 36; + + /** + * The operation id for the 'Set Stream TTL' operation. + * + * + * @generated + * @ordered + */ + int CDAP_API___SET_STREAM_TTL__STRING_STRING_INT = 37; + + /** + * The number of operations of the 'Api' class. + * + * + * @generated + * @ordered + */ + int CDAP_API_OPERATION_COUNT = 38; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapConfigurationImpl Configuration}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapConfigurationImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapConfiguration() + * @generated + */ + int CDAP_CONFIGURATION = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CONFIGURATION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CONFIGURATION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CONFIGURATION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CONFIGURATION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CONFIGURATION__VALUE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Source' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_CONFIGURATION__SOURCE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Configuration' class. + * + * + * @generated + * @ordered + */ + int CDAP_CONFIGURATION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Configuration' class. + * + * + * @generated + * @ordered + */ + int CDAP_CONFIGURATION_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapNamespaceImpl Namespace}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapNamespaceImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapNamespace() + * @generated + */ + int CDAP_NAMESPACE = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE__DESCRIPTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Config' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE__CONFIG = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Datasets' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE__DATASETS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Applications' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE__APPLICATIONS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Cluster' container reference. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE__CLUSTER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Namespace' class. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Namespace' class. + * + * + * @generated + * @ordered + */ + int CDAP_NAMESPACE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapKeyPairImpl Key Pair}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapKeyPairImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapKeyPair() + * @generated + */ + int CDAP_KEY_PAIR = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_KEY_PAIR__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_KEY_PAIR__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_KEY_PAIR__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_KEY_PAIR__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_KEY_PAIR__VALUE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Key Pair' class. + * + * + * @generated + * @ordered + */ + int CDAP_KEY_PAIR_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Key Pair' class. + * + * + * @generated + * @ordered + */ + int CDAP_KEY_PAIR_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapEntityWithPreferencesImpl Entity With Preferences}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapEntityWithPreferencesImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapEntityWithPreferences() + * @generated + */ + int CDAP_ENTITY_WITH_PREFERENCES = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ENTITY_WITH_PREFERENCES__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ENTITY_WITH_PREFERENCES__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ENTITY_WITH_PREFERENCES__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ENTITY_WITH_PREFERENCES__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Preferences' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_ENTITY_WITH_PREFERENCES__PREFERENCES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Entity With Preferences' class. + * + * + * @generated + * @ordered + */ + int CDAP_ENTITY_WITH_PREFERENCES_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Entity With Preferences' class. + * + * + * @generated + * @ordered + */ + int CDAP_ENTITY_WITH_PREFERENCES_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapDatasetImpl Dataset}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapDatasetImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapDataset() + * @generated + */ + int CDAP_DATASET = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET__TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Properties' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET__PROPERTIES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Schema' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET__SCHEMA = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Dataset' class. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Dataset' class. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaImpl Dataset Schema}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapDatasetSchema() + * @generated + */ + int CDAP_DATASET_SCHEMA = 8; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA__TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Fields' containment reference list. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA__FIELDS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Dataset Schema' class. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Dataset Schema' class. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaFieldImpl Dataset Schema Field}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaFieldImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapDatasetSchemaField() + * @generated + */ + int CDAP_DATASET_SCHEMA_FIELD = 9; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA_FIELD__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA_FIELD__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA_FIELD__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA_FIELD__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA_FIELD__TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Dataset Schema Field' class. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA_FIELD_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Dataset Schema Field' class. + * + * + * @generated + * @ordered + */ + int CDAP_DATASET_SCHEMA_FIELD_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapApplicationImpl Application}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapApplicationImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapApplication() + * @generated + */ + int CDAP_APPLICATION = 10; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Id' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__VERSION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__DESCRIPTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Artifact' containment reference. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION__ARTIFACT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Application' class. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Application' class. + * + * + * @generated + * @ordered + */ + int CDAP_APPLICATION_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.cdap.impl.CdapArtifactImpl Artifact}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapArtifactImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapArtifact() + * @generated + */ + int CDAP_ARTIFACT = 11; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__VERSION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Scope' attribute. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT__SCOPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Artifact' class. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Artifact' class. + * + * + * @generated + * @ordered + */ + int CDAP_ARTIFACT_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapAdaptor Adaptor}'. + * + * + * @return the meta object for class 'Adaptor'. + * @see org.openecomp.ncomp.cdap.CdapAdaptor + * @generated + */ + EClass getCdapAdaptor(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapCluster Cluster}'. + * + * + * @return the meta object for class 'Cluster'. + * @see org.openecomp.ncomp.cdap.CdapCluster + * @generated + */ + EClass getCdapCluster(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapCluster#getBaseUrl Base Url}'. + * + * + * @return the meta object for the attribute 'Base Url'. + * @see org.openecomp.ncomp.cdap.CdapCluster#getBaseUrl() + * @see #getCdapCluster() + * @generated + */ + EAttribute getCdapCluster_BaseUrl(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapCluster#getPollingFrequency Polling Frequency}'. + * + * + * @return the meta object for the attribute 'Polling Frequency'. + * @see org.openecomp.ncomp.cdap.CdapCluster#getPollingFrequency() + * @see #getCdapCluster() + * @generated + */ + EAttribute getCdapCluster_PollingFrequency(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapCluster#isRemote Remote}'. + * + * + * @return the meta object for the attribute 'Remote'. + * @see org.openecomp.ncomp.cdap.CdapCluster#isRemote() + * @see #getCdapCluster() + * @generated + */ + EAttribute getCdapCluster_Remote(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.cdap.CdapCluster#getConfigurations Configurations}'. + * + * + * @return the meta object for the containment reference list 'Configurations'. + * @see org.openecomp.ncomp.cdap.CdapCluster#getConfigurations() + * @see #getCdapCluster() + * @generated + */ + EReference getCdapCluster_Configurations(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.cdap.CdapCluster#getNamespaces Namespaces}'. + * + * + * @return the meta object for the containment reference list 'Namespaces'. + * @see org.openecomp.ncomp.cdap.CdapCluster#getNamespaces() + * @see #getCdapCluster() + * @generated + */ + EReference getCdapCluster_Namespaces(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapCluster#poll() Poll}' operation. + * + * + * @return the meta object for the 'Poll' operation. + * @see org.openecomp.ncomp.cdap.CdapCluster#poll() + * @generated + */ + EOperation getCdapCluster__Poll(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapApi Api}'. + * + * + * @return the meta object for class 'Api'. + * @see org.openecomp.ncomp.cdap.CdapApi + * @generated + */ + EClass getCdapApi(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#createNamespace(java.lang.String) Create Namespace}' operation. + * + * + * @return the meta object for the 'Create Namespace' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#createNamespace(java.lang.String) + * @generated + */ + EOperation getCdapApi__CreateNamespace__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#deleteNamespace(java.lang.String) Delete Namespace}' operation. + * + * + * @return the meta object for the 'Delete Namespace' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#deleteNamespace(java.lang.String) + * @generated + */ + EOperation getCdapApi__DeleteNamespace__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#deployApp(java.lang.String, java.lang.String) Deploy App}' operation. + * + * + * @return the meta object for the 'Deploy App' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#deployApp(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__DeployApp__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#loadArtifact(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Load Artifact}' operation. + * + * + * @return the meta object for the 'Load Artifact' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#loadArtifact(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__LoadArtifact__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#deleteArtifact(java.lang.String, java.lang.String, java.lang.String) Delete Artifact}' operation. + * + * + * @return the meta object for the 'Delete Artifact' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#deleteArtifact(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__DeleteArtifact__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#startFlow(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Start Flow}' operation. + * + * + * @return the meta object for the 'Start Flow' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#startFlow(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__StartFlow__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#startWorker(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Start Worker}' operation. + * + * + * @return the meta object for the 'Start Worker' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#startWorker(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__StartWorker__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#startService(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Start Service}' operation. + * + * + * @return the meta object for the 'Start Service' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#startService(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__StartService__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#startApp(java.lang.String, java.lang.String) Start App}' operation. + * + * + * @return the meta object for the 'Start App' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#startApp(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__StartApp__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#stopApp(java.lang.String, java.lang.String) Stop App}' operation. + * + * + * @return the meta object for the 'Stop App' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#stopApp(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__StopApp__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#deleteApp(java.lang.String, java.lang.String) Delete App}' operation. + * + * + * @return the meta object for the 'Delete App' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#deleteApp(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__DeleteApp__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#loadPreferencesApp(java.lang.String, java.lang.String, java.lang.String) Load Preferences App}' operation. + * + * + * @return the meta object for the 'Load Preferences App' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#loadPreferencesApp(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__LoadPreferencesApp__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#loadPreferencesFlow(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Load Preferences Flow}' operation. + * + * + * @return the meta object for the 'Load Preferences Flow' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#loadPreferencesFlow(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__LoadPreferencesFlow__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#loadPreferencesNameSpace(java.lang.String, java.lang.String) Load Preferences Name Space}' operation. + * + * + * @return the meta object for the 'Load Preferences Name Space' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#loadPreferencesNameSpace(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__LoadPreferencesNameSpace__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setPreferencesApp(java.lang.String, java.lang.String, java.lang.String) Set Preferences App}' operation. + * + * + * @return the meta object for the 'Set Preferences App' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setPreferencesApp(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__SetPreferencesApp__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setPreferencesFlow(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Set Preferences Flow}' operation. + * + * + * @return the meta object for the 'Set Preferences Flow' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setPreferencesFlow(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__SetPreferencesFlow__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setPreferencesWorker(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Set Preferences Worker}' operation. + * + * + * @return the meta object for the 'Set Preferences Worker' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setPreferencesWorker(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__SetPreferencesWorker__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setPreferencesService(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Set Preferences Service}' operation. + * + * + * @return the meta object for the 'Set Preferences Service' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setPreferencesService(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__SetPreferencesService__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setPreferencesNameSpace(java.lang.String, java.lang.String) Set Preferences Name Space}' operation. + * + * + * @return the meta object for the 'Set Preferences Name Space' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setPreferencesNameSpace(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__SetPreferencesNameSpace__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setFlowRunTimeArgs(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Set Flow Run Time Args}' operation. + * + * + * @return the meta object for the 'Set Flow Run Time Args' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setFlowRunTimeArgs(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__SetFlowRunTimeArgs__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setFlowletInstances(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int) Set Flowlet Instances}' operation. + * + * + * @return the meta object for the 'Set Flowlet Instances' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setFlowletInstances(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int) + * @generated + */ + EOperation getCdapApi__SetFlowletInstances__String_String_String_String_int(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#stopFlow(java.lang.String, java.lang.String, java.lang.String) Stop Flow}' operation. + * + * + * @return the meta object for the 'Stop Flow' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#stopFlow(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__StopFlow__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#stopWorker(java.lang.String, java.lang.String, java.lang.String) Stop Worker}' operation. + * + * + * @return the meta object for the 'Stop Worker' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#stopWorker(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__StopWorker__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#stopService(java.lang.String, java.lang.String, java.lang.String) Stop Service}' operation. + * + * + * @return the meta object for the 'Stop Service' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#stopService(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__StopService__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#truncateDataSet(java.lang.String, java.lang.String) Truncate Data Set}' operation. + * + * + * @return the meta object for the 'Truncate Data Set' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#truncateDataSet(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__TruncateDataSet__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#deleteDataset(java.lang.String, java.lang.String) Delete Dataset}' operation. + * + * + * @return the meta object for the 'Delete Dataset' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#deleteDataset(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__DeleteDataset__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#createStream(java.lang.String, java.lang.String) Create Stream}' operation. + * + * + * @return the meta object for the 'Create Stream' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#createStream(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__CreateStream__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#deleteStream(java.lang.String, java.lang.String) Delete Stream}' operation. + * + * + * @return the meta object for the 'Delete Stream' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#deleteStream(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__DeleteStream__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#getStreamEvents(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int) Get Stream Events}' operation. + * + * + * @return the meta object for the 'Get Stream Events' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#getStreamEvents(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int) + * @generated + */ + EOperation getCdapApi__GetStreamEvents__String_String_String_String_int(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#getStreamStats(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int) Get Stream Stats}' operation. + * + * + * @return the meta object for the 'Get Stream Stats' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#getStreamStats(java.lang.String, java.lang.String, java.lang.String, java.lang.String, int) + * @generated + */ + EOperation getCdapApi__GetStreamStats__String_String_String_String_int(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#sendEventToStream(java.lang.String, java.lang.String, java.lang.String) Send Event To Stream}' operation. + * + * + * @return the meta object for the 'Send Event To Stream' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#sendEventToStream(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__SendEventToStream__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#trucateStream(java.lang.String, java.lang.String) Trucate Stream}' operation. + * + * + * @return the meta object for the 'Trucate Stream' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#trucateStream(java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__TrucateStream__String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setStreamProperties(java.lang.String, java.lang.String, java.lang.String) Set Stream Properties}' operation. + * + * + * @return the meta object for the 'Set Stream Properties' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setStreamProperties(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__SetStreamProperties__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#restartApp(java.lang.String, java.lang.String, java.lang.String) Restart App}' operation. + * + * + * @return the meta object for the 'Restart App' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#restartApp(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__RestartApp__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#createApp(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) Create App}' operation. + * + * + * @return the meta object for the 'Create App' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#createApp(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__CreateApp__String_String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#createAppWithConfig(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) Create App With Config}' operation. + * + * + * @return the meta object for the 'Create App With Config' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#createAppWithConfig(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__CreateAppWithConfig__String_String_String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setDatasetProperties(java.lang.String, java.lang.String, java.lang.String) Set Dataset Properties}' operation. + * + * + * @return the meta object for the 'Set Dataset Properties' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setDatasetProperties(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getCdapApi__SetDatasetProperties__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.cdap.CdapApi#setStreamTTL(java.lang.String, java.lang.String, int) Set Stream TTL}' operation. + * + * + * @return the meta object for the 'Set Stream TTL' operation. + * @see org.openecomp.ncomp.cdap.CdapApi#setStreamTTL(java.lang.String, java.lang.String, int) + * @generated + */ + EOperation getCdapApi__SetStreamTTL__String_String_int(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapConfiguration Configuration}'. + * + * + * @return the meta object for class 'Configuration'. + * @see org.openecomp.ncomp.cdap.CdapConfiguration + * @generated + */ + EClass getCdapConfiguration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapConfiguration#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.cdap.CdapConfiguration#getValue() + * @see #getCdapConfiguration() + * @generated + */ + EAttribute getCdapConfiguration_Value(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapConfiguration#getSource Source}'. + * + * + * @return the meta object for the attribute 'Source'. + * @see org.openecomp.ncomp.cdap.CdapConfiguration#getSource() + * @see #getCdapConfiguration() + * @generated + */ + EAttribute getCdapConfiguration_Source(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapNamespace Namespace}'. + * + * + * @return the meta object for class 'Namespace'. + * @see org.openecomp.ncomp.cdap.CdapNamespace + * @generated + */ + EClass getCdapNamespace(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapNamespace#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.cdap.CdapNamespace#getDescription() + * @see #getCdapNamespace() + * @generated + */ + EAttribute getCdapNamespace_Description(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.cdap.CdapNamespace#getConfig Config}'. + * + * + * @return the meta object for the containment reference list 'Config'. + * @see org.openecomp.ncomp.cdap.CdapNamespace#getConfig() + * @see #getCdapNamespace() + * @generated + */ + EReference getCdapNamespace_Config(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.cdap.CdapNamespace#getDatasets Datasets}'. + * + * + * @return the meta object for the containment reference list 'Datasets'. + * @see org.openecomp.ncomp.cdap.CdapNamespace#getDatasets() + * @see #getCdapNamespace() + * @generated + */ + EReference getCdapNamespace_Datasets(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.cdap.CdapNamespace#getApplications Applications}'. + * + * + * @return the meta object for the containment reference list 'Applications'. + * @see org.openecomp.ncomp.cdap.CdapNamespace#getApplications() + * @see #getCdapNamespace() + * @generated + */ + EReference getCdapNamespace_Applications(); + + /** + * Returns the meta object for the container reference '{@link org.openecomp.ncomp.cdap.CdapNamespace#getCluster Cluster}'. + * + * + * @return the meta object for the container reference 'Cluster'. + * @see org.openecomp.ncomp.cdap.CdapNamespace#getCluster() + * @see #getCdapNamespace() + * @generated + */ + EReference getCdapNamespace_Cluster(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapKeyPair Key Pair}'. + * + * + * @return the meta object for class 'Key Pair'. + * @see org.openecomp.ncomp.cdap.CdapKeyPair + * @generated + */ + EClass getCdapKeyPair(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapKeyPair#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.cdap.CdapKeyPair#getValue() + * @see #getCdapKeyPair() + * @generated + */ + EAttribute getCdapKeyPair_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences Entity With Preferences}'. + * + * + * @return the meta object for class 'Entity With Preferences'. + * @see org.openecomp.ncomp.cdap.CdapEntityWithPreferences + * @generated + */ + EClass getCdapEntityWithPreferences(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences#getPreferences Preferences}'. + * + * + * @return the meta object for the containment reference list 'Preferences'. + * @see org.openecomp.ncomp.cdap.CdapEntityWithPreferences#getPreferences() + * @see #getCdapEntityWithPreferences() + * @generated + */ + EReference getCdapEntityWithPreferences_Preferences(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapDataset Dataset}'. + * + * + * @return the meta object for class 'Dataset'. + * @see org.openecomp.ncomp.cdap.CdapDataset + * @generated + */ + EClass getCdapDataset(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapDataset#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.openecomp.ncomp.cdap.CdapDataset#getType() + * @see #getCdapDataset() + * @generated + */ + EAttribute getCdapDataset_Type(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.cdap.CdapDataset#getProperties Properties}'. + * + * + * @return the meta object for the containment reference list 'Properties'. + * @see org.openecomp.ncomp.cdap.CdapDataset#getProperties() + * @see #getCdapDataset() + * @generated + */ + EReference getCdapDataset_Properties(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.cdap.CdapDataset#getSchema Schema}'. + * + * + * @return the meta object for the containment reference 'Schema'. + * @see org.openecomp.ncomp.cdap.CdapDataset#getSchema() + * @see #getCdapDataset() + * @generated + */ + EReference getCdapDataset_Schema(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapDatasetSchema Dataset Schema}'. + * + * + * @return the meta object for class 'Dataset Schema'. + * @see org.openecomp.ncomp.cdap.CdapDatasetSchema + * @generated + */ + EClass getCdapDatasetSchema(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapDatasetSchema#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.openecomp.ncomp.cdap.CdapDatasetSchema#getType() + * @see #getCdapDatasetSchema() + * @generated + */ + EAttribute getCdapDatasetSchema_Type(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.cdap.CdapDatasetSchema#getFields Fields}'. + * + * + * @return the meta object for the containment reference list 'Fields'. + * @see org.openecomp.ncomp.cdap.CdapDatasetSchema#getFields() + * @see #getCdapDatasetSchema() + * @generated + */ + EReference getCdapDatasetSchema_Fields(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapDatasetSchemaField Dataset Schema Field}'. + * + * + * @return the meta object for class 'Dataset Schema Field'. + * @see org.openecomp.ncomp.cdap.CdapDatasetSchemaField + * @generated + */ + EClass getCdapDatasetSchemaField(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapDatasetSchemaField#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.openecomp.ncomp.cdap.CdapDatasetSchemaField#getType() + * @see #getCdapDatasetSchemaField() + * @generated + */ + EAttribute getCdapDatasetSchemaField_Type(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapApplication Application}'. + * + * + * @return the meta object for class 'Application'. + * @see org.openecomp.ncomp.cdap.CdapApplication + * @generated + */ + EClass getCdapApplication(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapApplication#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.openecomp.ncomp.cdap.CdapApplication#getType() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_Type(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapApplication#getId Id}'. + * + * + * @return the meta object for the attribute 'Id'. + * @see org.openecomp.ncomp.cdap.CdapApplication#getId() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_Id(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapApplication#getVersion Version}'. + * + * + * @return the meta object for the attribute 'Version'. + * @see org.openecomp.ncomp.cdap.CdapApplication#getVersion() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_Version(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapApplication#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.cdap.CdapApplication#getDescription() + * @see #getCdapApplication() + * @generated + */ + EAttribute getCdapApplication_Description(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.cdap.CdapApplication#getArtifact Artifact}'. + * + * + * @return the meta object for the containment reference 'Artifact'. + * @see org.openecomp.ncomp.cdap.CdapApplication#getArtifact() + * @see #getCdapApplication() + * @generated + */ + EReference getCdapApplication_Artifact(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.cdap.CdapArtifact Artifact}'. + * + * + * @return the meta object for class 'Artifact'. + * @see org.openecomp.ncomp.cdap.CdapArtifact + * @generated + */ + EClass getCdapArtifact(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapArtifact#getVersion Version}'. + * + * + * @return the meta object for the attribute 'Version'. + * @see org.openecomp.ncomp.cdap.CdapArtifact#getVersion() + * @see #getCdapArtifact() + * @generated + */ + EAttribute getCdapArtifact_Version(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.cdap.CdapArtifact#getScope Scope}'. + * + * + * @return the meta object for the attribute 'Scope'. + * @see org.openecomp.ncomp.cdap.CdapArtifact#getScope() + * @see #getCdapArtifact() + * @generated + */ + EAttribute getCdapArtifact_Scope(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + CdapFactory getCdapFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl Adaptor}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapAdaptorImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapAdaptor() + * @generated + */ + EClass CDAP_ADAPTOR = eINSTANCE.getCdapAdaptor(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapClusterImpl Cluster}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapClusterImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapCluster() + * @generated + */ + EClass CDAP_CLUSTER = eINSTANCE.getCdapCluster(); + + /** + * The meta object literal for the 'Base Url' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_CLUSTER__BASE_URL = eINSTANCE.getCdapCluster_BaseUrl(); + + /** + * The meta object literal for the 'Polling Frequency' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_CLUSTER__POLLING_FREQUENCY = eINSTANCE.getCdapCluster_PollingFrequency(); + + /** + * The meta object literal for the 'Remote' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_CLUSTER__REMOTE = eINSTANCE.getCdapCluster_Remote(); + + /** + * The meta object literal for the 'Configurations' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_CLUSTER__CONFIGURATIONS = eINSTANCE.getCdapCluster_Configurations(); + + /** + * The meta object literal for the 'Namespaces' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_CLUSTER__NAMESPACES = eINSTANCE.getCdapCluster_Namespaces(); + + /** + * The meta object literal for the 'Poll' operation. + * + * + * @generated + */ + EOperation CDAP_CLUSTER___POLL = eINSTANCE.getCdapCluster__Poll(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapApiImpl Api}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapApiImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapApi() + * @generated + */ + EClass CDAP_API = eINSTANCE.getCdapApi(); + + /** + * The meta object literal for the 'Create Namespace' operation. + * + * + * @generated + */ + EOperation CDAP_API___CREATE_NAMESPACE__STRING = eINSTANCE.getCdapApi__CreateNamespace__String(); + + /** + * The meta object literal for the 'Delete Namespace' operation. + * + * + * @generated + */ + EOperation CDAP_API___DELETE_NAMESPACE__STRING = eINSTANCE.getCdapApi__DeleteNamespace__String(); + + /** + * The meta object literal for the 'Deploy App' operation. + * + * + * @generated + */ + EOperation CDAP_API___DEPLOY_APP__STRING_STRING = eINSTANCE.getCdapApi__DeployApp__String_String(); + + /** + * The meta object literal for the 'Load Artifact' operation. + * + * + * @generated + */ + EOperation CDAP_API___LOAD_ARTIFACT__STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__LoadArtifact__String_String_String_String(); + + /** + * The meta object literal for the 'Delete Artifact' operation. + * + * + * @generated + */ + EOperation CDAP_API___DELETE_ARTIFACT__STRING_STRING_STRING = eINSTANCE.getCdapApi__DeleteArtifact__String_String_String(); + + /** + * The meta object literal for the 'Start Flow' operation. + * + * + * @generated + */ + EOperation CDAP_API___START_FLOW__STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__StartFlow__String_String_String_String(); + + /** + * The meta object literal for the 'Start Worker' operation. + * + * + * @generated + */ + EOperation CDAP_API___START_WORKER__STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__StartWorker__String_String_String_String(); + + /** + * The meta object literal for the 'Start Service' operation. + * + * + * @generated + */ + EOperation CDAP_API___START_SERVICE__STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__StartService__String_String_String_String(); + + /** + * The meta object literal for the 'Start App' operation. + * + * + * @generated + */ + EOperation CDAP_API___START_APP__STRING_STRING = eINSTANCE.getCdapApi__StartApp__String_String(); + + /** + * The meta object literal for the 'Stop App' operation. + * + * + * @generated + */ + EOperation CDAP_API___STOP_APP__STRING_STRING = eINSTANCE.getCdapApi__StopApp__String_String(); + + /** + * The meta object literal for the 'Delete App' operation. + * + * + * @generated + */ + EOperation CDAP_API___DELETE_APP__STRING_STRING = eINSTANCE.getCdapApi__DeleteApp__String_String(); + + /** + * The meta object literal for the 'Load Preferences App' operation. + * + * + * @generated + */ + EOperation CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING = eINSTANCE.getCdapApi__LoadPreferencesApp__String_String_String(); + + /** + * The meta object literal for the 'Load Preferences Flow' operation. + * + * + * @generated + */ + EOperation CDAP_API___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__LoadPreferencesFlow__String_String_String_String(); + + /** + * The meta object literal for the 'Load Preferences Name Space' operation. + * + * + * @generated + */ + EOperation CDAP_API___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING = eINSTANCE.getCdapApi__LoadPreferencesNameSpace__String_String(); + + /** + * The meta object literal for the 'Set Preferences App' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_PREFERENCES_APP__STRING_STRING_STRING = eINSTANCE.getCdapApi__SetPreferencesApp__String_String_String(); + + /** + * The meta object literal for the 'Set Preferences Flow' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__SetPreferencesFlow__String_String_String_String(); + + /** + * The meta object literal for the 'Set Preferences Worker' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__SetPreferencesWorker__String_String_String_String(); + + /** + * The meta object literal for the 'Set Preferences Service' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__SetPreferencesService__String_String_String_String(); + + /** + * The meta object literal for the 'Set Preferences Name Space' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_PREFERENCES_NAME_SPACE__STRING_STRING = eINSTANCE.getCdapApi__SetPreferencesNameSpace__String_String(); + + /** + * The meta object literal for the 'Set Flow Run Time Args' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__SetFlowRunTimeArgs__String_String_String_String(); + + /** + * The meta object literal for the 'Set Flowlet Instances' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT = eINSTANCE.getCdapApi__SetFlowletInstances__String_String_String_String_int(); + + /** + * The meta object literal for the 'Stop Flow' operation. + * + * + * @generated + */ + EOperation CDAP_API___STOP_FLOW__STRING_STRING_STRING = eINSTANCE.getCdapApi__StopFlow__String_String_String(); + + /** + * The meta object literal for the 'Stop Worker' operation. + * + * + * @generated + */ + EOperation CDAP_API___STOP_WORKER__STRING_STRING_STRING = eINSTANCE.getCdapApi__StopWorker__String_String_String(); + + /** + * The meta object literal for the 'Stop Service' operation. + * + * + * @generated + */ + EOperation CDAP_API___STOP_SERVICE__STRING_STRING_STRING = eINSTANCE.getCdapApi__StopService__String_String_String(); + + /** + * The meta object literal for the 'Truncate Data Set' operation. + * + * + * @generated + */ + EOperation CDAP_API___TRUNCATE_DATA_SET__STRING_STRING = eINSTANCE.getCdapApi__TruncateDataSet__String_String(); + + /** + * The meta object literal for the 'Delete Dataset' operation. + * + * + * @generated + */ + EOperation CDAP_API___DELETE_DATASET__STRING_STRING = eINSTANCE.getCdapApi__DeleteDataset__String_String(); + + /** + * The meta object literal for the 'Create Stream' operation. + * + * + * @generated + */ + EOperation CDAP_API___CREATE_STREAM__STRING_STRING = eINSTANCE.getCdapApi__CreateStream__String_String(); + + /** + * The meta object literal for the 'Delete Stream' operation. + * + * + * @generated + */ + EOperation CDAP_API___DELETE_STREAM__STRING_STRING = eINSTANCE.getCdapApi__DeleteStream__String_String(); + + /** + * The meta object literal for the 'Get Stream Events' operation. + * + * + * @generated + */ + EOperation CDAP_API___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT = eINSTANCE.getCdapApi__GetStreamEvents__String_String_String_String_int(); + + /** + * The meta object literal for the 'Get Stream Stats' operation. + * + * + * @generated + */ + EOperation CDAP_API___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT = eINSTANCE.getCdapApi__GetStreamStats__String_String_String_String_int(); + + /** + * The meta object literal for the 'Send Event To Stream' operation. + * + * + * @generated + */ + EOperation CDAP_API___SEND_EVENT_TO_STREAM__STRING_STRING_STRING = eINSTANCE.getCdapApi__SendEventToStream__String_String_String(); + + /** + * The meta object literal for the 'Trucate Stream' operation. + * + * + * @generated + */ + EOperation CDAP_API___TRUCATE_STREAM__STRING_STRING = eINSTANCE.getCdapApi__TrucateStream__String_String(); + + /** + * The meta object literal for the 'Set Stream Properties' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_STREAM_PROPERTIES__STRING_STRING_STRING = eINSTANCE.getCdapApi__SetStreamProperties__String_String_String(); + + /** + * The meta object literal for the 'Restart App' operation. + * + * + * @generated + */ + EOperation CDAP_API___RESTART_APP__STRING_STRING_STRING = eINSTANCE.getCdapApi__RestartApp__String_String_String(); + + /** + * The meta object literal for the 'Create App' operation. + * + * + * @generated + */ + EOperation CDAP_API___CREATE_APP__STRING_STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__CreateApp__String_String_String_String_String(); + + /** + * The meta object literal for the 'Create App With Config' operation. + * + * + * @generated + */ + EOperation CDAP_API___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING = eINSTANCE.getCdapApi__CreateAppWithConfig__String_String_String_String_String_String(); + + /** + * The meta object literal for the 'Set Dataset Properties' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_DATASET_PROPERTIES__STRING_STRING_STRING = eINSTANCE.getCdapApi__SetDatasetProperties__String_String_String(); + + /** + * The meta object literal for the 'Set Stream TTL' operation. + * + * + * @generated + */ + EOperation CDAP_API___SET_STREAM_TTL__STRING_STRING_INT = eINSTANCE.getCdapApi__SetStreamTTL__String_String_int(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapConfigurationImpl Configuration}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapConfigurationImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapConfiguration() + * @generated + */ + EClass CDAP_CONFIGURATION = eINSTANCE.getCdapConfiguration(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_CONFIGURATION__VALUE = eINSTANCE.getCdapConfiguration_Value(); + + /** + * The meta object literal for the 'Source' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_CONFIGURATION__SOURCE = eINSTANCE.getCdapConfiguration_Source(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapNamespaceImpl Namespace}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapNamespaceImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapNamespace() + * @generated + */ + EClass CDAP_NAMESPACE = eINSTANCE.getCdapNamespace(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_NAMESPACE__DESCRIPTION = eINSTANCE.getCdapNamespace_Description(); + + /** + * The meta object literal for the 'Config' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_NAMESPACE__CONFIG = eINSTANCE.getCdapNamespace_Config(); + + /** + * The meta object literal for the 'Datasets' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_NAMESPACE__DATASETS = eINSTANCE.getCdapNamespace_Datasets(); + + /** + * The meta object literal for the 'Applications' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_NAMESPACE__APPLICATIONS = eINSTANCE.getCdapNamespace_Applications(); + + /** + * The meta object literal for the 'Cluster' container reference feature. + * + * + * @generated + */ + EReference CDAP_NAMESPACE__CLUSTER = eINSTANCE.getCdapNamespace_Cluster(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapKeyPairImpl Key Pair}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapKeyPairImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapKeyPair() + * @generated + */ + EClass CDAP_KEY_PAIR = eINSTANCE.getCdapKeyPair(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_KEY_PAIR__VALUE = eINSTANCE.getCdapKeyPair_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapEntityWithPreferencesImpl Entity With Preferences}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapEntityWithPreferencesImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapEntityWithPreferences() + * @generated + */ + EClass CDAP_ENTITY_WITH_PREFERENCES = eINSTANCE.getCdapEntityWithPreferences(); + + /** + * The meta object literal for the 'Preferences' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_ENTITY_WITH_PREFERENCES__PREFERENCES = eINSTANCE.getCdapEntityWithPreferences_Preferences(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapDatasetImpl Dataset}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapDatasetImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapDataset() + * @generated + */ + EClass CDAP_DATASET = eINSTANCE.getCdapDataset(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_DATASET__TYPE = eINSTANCE.getCdapDataset_Type(); + + /** + * The meta object literal for the 'Properties' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_DATASET__PROPERTIES = eINSTANCE.getCdapDataset_Properties(); + + /** + * The meta object literal for the 'Schema' containment reference feature. + * + * + * @generated + */ + EReference CDAP_DATASET__SCHEMA = eINSTANCE.getCdapDataset_Schema(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaImpl Dataset Schema}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapDatasetSchema() + * @generated + */ + EClass CDAP_DATASET_SCHEMA = eINSTANCE.getCdapDatasetSchema(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_DATASET_SCHEMA__TYPE = eINSTANCE.getCdapDatasetSchema_Type(); + + /** + * The meta object literal for the 'Fields' containment reference list feature. + * + * + * @generated + */ + EReference CDAP_DATASET_SCHEMA__FIELDS = eINSTANCE.getCdapDatasetSchema_Fields(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaFieldImpl Dataset Schema Field}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaFieldImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapDatasetSchemaField() + * @generated + */ + EClass CDAP_DATASET_SCHEMA_FIELD = eINSTANCE.getCdapDatasetSchemaField(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_DATASET_SCHEMA_FIELD__TYPE = eINSTANCE.getCdapDatasetSchemaField_Type(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapApplicationImpl Application}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapApplicationImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapApplication() + * @generated + */ + EClass CDAP_APPLICATION = eINSTANCE.getCdapApplication(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_APPLICATION__TYPE = eINSTANCE.getCdapApplication_Type(); + + /** + * The meta object literal for the 'Id' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_APPLICATION__ID = eINSTANCE.getCdapApplication_Id(); + + /** + * The meta object literal for the 'Version' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_APPLICATION__VERSION = eINSTANCE.getCdapApplication_Version(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_APPLICATION__DESCRIPTION = eINSTANCE.getCdapApplication_Description(); + + /** + * The meta object literal for the 'Artifact' containment reference feature. + * + * + * @generated + */ + EReference CDAP_APPLICATION__ARTIFACT = eINSTANCE.getCdapApplication_Artifact(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.cdap.impl.CdapArtifactImpl Artifact}' class. + * + * + * @see org.openecomp.ncomp.cdap.impl.CdapArtifactImpl + * @see org.openecomp.ncomp.cdap.impl.CdapPackageImpl#getCdapArtifact() + * @generated + */ + EClass CDAP_ARTIFACT = eINSTANCE.getCdapArtifact(); + + /** + * The meta object literal for the 'Version' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_ARTIFACT__VERSION = eINSTANCE.getCdapArtifact_Version(); + + /** + * The meta object literal for the 'Scope' attribute feature. + * + * + * @generated + */ + EAttribute CDAP_ARTIFACT__SCOPE = eINSTANCE.getCdapArtifact_Scope(); + + } + +} //CdapPackage diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapAdaptorImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapAdaptorImpl.java new file mode 100644 index 0000000..95e9320 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapAdaptorImpl.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.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapAdaptor; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Adaptor'. + * + *

+ *

+ * + * @generated + */ +public class CdapAdaptorImpl extends MinimalEObjectImpl.Container implements CdapAdaptor { + /** + * + * + * @generated + */ + protected CdapAdaptorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_ADAPTOR; + } + +} //CdapAdaptorImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApiImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApiImpl.java new file mode 100644 index 0000000..132368a --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApiImpl.java @@ -0,0 +1,572 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapApi; +import org.openecomp.ncomp.cdap.CdapPackage; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Api'. + * + *

+ *

+ * + * @generated + */ +public class CdapApiImpl extends MinimalEObjectImpl.Container implements CdapApi { + /** + * + * + * @generated + */ + protected CdapApiImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_API; + } + + /** + * + * + * @generated + */ + public String createNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String deleteNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @generated + */ + public EList 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(); + } + + /** + * + * + * @generated + */ + public EList 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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case CdapPackage.CDAP_API___CREATE_NAMESPACE__STRING: + return createNamespace((String)arguments.get(0)); + case CdapPackage.CDAP_API___DELETE_NAMESPACE__STRING: + return deleteNamespace((String)arguments.get(0)); + case CdapPackage.CDAP_API___DEPLOY_APP__STRING_STRING: + return deployApp((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___DELETE_ARTIFACT__STRING_STRING_STRING: + return deleteArtifact((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___START_APP__STRING_STRING: + return startApp((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___STOP_APP__STRING_STRING: + return stopApp((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___DELETE_APP__STRING_STRING: + return deleteApp((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING: + return loadPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING: + return loadPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___SET_PREFERENCES_APP__STRING_STRING_STRING: + return setPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___SET_PREFERENCES_NAME_SPACE__STRING_STRING: + return setPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___STOP_FLOW__STRING_STRING_STRING: + return stopFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___STOP_WORKER__STRING_STRING_STRING: + return stopWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___STOP_SERVICE__STRING_STRING_STRING: + return stopService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___TRUNCATE_DATA_SET__STRING_STRING: + return truncateDataSet((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___DELETE_DATASET__STRING_STRING: + return deleteDataset((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___CREATE_STREAM__STRING_STRING: + return createStream((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___DELETE_STREAM__STRING_STRING: + return deleteStream((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___SEND_EVENT_TO_STREAM__STRING_STRING_STRING: + return sendEventToStream((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___TRUCATE_STREAM__STRING_STRING: + return trucateStream((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_API___SET_STREAM_PROPERTIES__STRING_STRING_STRING: + return setStreamProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___RESTART_APP__STRING_STRING_STRING: + return restartApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___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 CdapPackage.CDAP_API___SET_DATASET_PROPERTIES__STRING_STRING_STRING: + return setDatasetProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_API___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); + } + +} //CdapApiImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApplicationImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApplicationImpl.java new file mode 100644 index 0000000..4055285 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapApplicationImpl.java @@ -0,0 +1,428 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapApplication; +import org.openecomp.ncomp.cdap.CdapArtifact; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +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; + +/** + * + * An implementation of the model object 'Application'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapApplicationImpl#getType Type}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapApplicationImpl#getId Id}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapApplicationImpl#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapApplicationImpl#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapApplicationImpl#getArtifact Artifact}
  • + *
+ *

+ * + * @generated + */ +public class CdapApplicationImpl extends NamedEntityImpl implements CdapApplication { + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getId() Id}' attribute. + * + * + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The cached value of the '{@link #getArtifact() Artifact}' containment reference. + * + * + * @see #getArtifact() + * @generated + * @ordered + */ + protected CdapArtifact artifact; + + /** + * + * + * @generated + */ + protected CdapApplicationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_APPLICATION; + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public String getId() { + return id; + } + + /** + * + * + * @generated + */ + public void setId(String newId) { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__ID, oldId, id)); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public CdapArtifact getArtifact() { + return artifact; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetArtifact(CdapArtifact newArtifact, NotificationChain msgs) { + CdapArtifact oldArtifact = artifact; + artifact = newArtifact; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__ARTIFACT, oldArtifact, newArtifact); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setArtifact(CdapArtifact newArtifact) { + if (newArtifact != artifact) { + NotificationChain msgs = null; + if (artifact != null) + msgs = ((InternalEObject)artifact).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_APPLICATION__ARTIFACT, null, msgs); + if (newArtifact != null) + msgs = ((InternalEObject)newArtifact).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_APPLICATION__ARTIFACT, null, msgs); + msgs = basicSetArtifact(newArtifact, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_APPLICATION__ARTIFACT, newArtifact, newArtifact)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__ARTIFACT: + return basicSetArtifact(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__TYPE: + return getType(); + case CdapPackage.CDAP_APPLICATION__ID: + return getId(); + case CdapPackage.CDAP_APPLICATION__VERSION: + return getVersion(); + case CdapPackage.CDAP_APPLICATION__DESCRIPTION: + return getDescription(); + case CdapPackage.CDAP_APPLICATION__ARTIFACT: + return getArtifact(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__TYPE: + setType((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__ID: + setId((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__VERSION: + setVersion((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__DESCRIPTION: + setDescription((String)newValue); + return; + case CdapPackage.CDAP_APPLICATION__ARTIFACT: + setArtifact((CdapArtifact)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__TYPE: + setType(TYPE_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__ID: + setId(ID_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CdapPackage.CDAP_APPLICATION__ARTIFACT: + setArtifact((CdapArtifact)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_APPLICATION__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case CdapPackage.CDAP_APPLICATION__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case CdapPackage.CDAP_APPLICATION__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case CdapPackage.CDAP_APPLICATION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CdapPackage.CDAP_APPLICATION__ARTIFACT: + return artifact != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (type: "); + result.append(type); + result.append(", id: "); + result.append(id); + result.append(", version: "); + result.append(version); + result.append(", description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} //CdapApplicationImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapArtifactImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapArtifactImpl.java new file mode 100644 index 0000000..48b3daf --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapArtifactImpl.java @@ -0,0 +1,239 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapArtifact; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Artifact'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapArtifactImpl#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapArtifactImpl#getScope Scope}
  • + *
+ *

+ * + * @generated + */ +public class CdapArtifactImpl extends NamedEntityImpl implements CdapArtifact { + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * The default value of the '{@link #getScope() Scope}' attribute. + * + * + * @see #getScope() + * @generated + * @ordered + */ + protected static final String SCOPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getScope() Scope}' attribute. + * + * + * @see #getScope() + * @generated + * @ordered + */ + protected String scope = SCOPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected CdapArtifactImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_ARTIFACT; + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_ARTIFACT__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + public String getScope() { + return scope; + } + + /** + * + * + * @generated + */ + public void setScope(String newScope) { + String oldScope = scope; + scope = newScope; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_ARTIFACT__SCOPE, oldScope, scope)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__VERSION: + return getVersion(); + case CdapPackage.CDAP_ARTIFACT__SCOPE: + return getScope(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__VERSION: + setVersion((String)newValue); + return; + case CdapPackage.CDAP_ARTIFACT__SCOPE: + setScope((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case CdapPackage.CDAP_ARTIFACT__SCOPE: + setScope(SCOPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_ARTIFACT__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case CdapPackage.CDAP_ARTIFACT__SCOPE: + return SCOPE_EDEFAULT == null ? scope != null : !SCOPE_EDEFAULT.equals(scope); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (version: "); + result.append(version); + result.append(", scope: "); + result.append(scope); + result.append(')'); + return result.toString(); + } + +} //CdapArtifactImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapClusterImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapClusterImpl.java new file mode 100644 index 0000000..6d5c5b5 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapClusterImpl.java @@ -0,0 +1,981 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapApi; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.cdap.CdapConfiguration; +import org.openecomp.ncomp.cdap.CdapNamespace; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Collection; + +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; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Cluster'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapClusterImpl#getBaseUrl Base Url}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapClusterImpl#getPollingFrequency Polling Frequency}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapClusterImpl#isRemote Remote}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapClusterImpl#getConfigurations Configurations}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapClusterImpl#getNamespaces Namespaces}
  • + *
+ *

+ * + * @generated + */ +public class CdapClusterImpl extends NamedEntityImpl implements CdapCluster { + /** + * The default value of the '{@link #getBaseUrl() Base Url}' attribute. + * + * + * @see #getBaseUrl() + * @generated + * @ordered + */ + protected static final String BASE_URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBaseUrl() Base Url}' attribute. + * + * + * @see #getBaseUrl() + * @generated + * @ordered + */ + protected String baseUrl = BASE_URL_EDEFAULT; + + /** + * The default value of the '{@link #getPollingFrequency() Polling Frequency}' attribute. + * + * + * @see #getPollingFrequency() + * @generated + * @ordered + */ + protected static final long POLLING_FREQUENCY_EDEFAULT = 300000L; + + /** + * The cached value of the '{@link #getPollingFrequency() Polling Frequency}' attribute. + * + * + * @see #getPollingFrequency() + * @generated + * @ordered + */ + protected long pollingFrequency = POLLING_FREQUENCY_EDEFAULT; + + /** + * The default value of the '{@link #isRemote() Remote}' attribute. + * + * + * @see #isRemote() + * @generated + * @ordered + */ + protected static final boolean REMOTE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isRemote() Remote}' attribute. + * + * + * @see #isRemote() + * @generated + * @ordered + */ + protected boolean remote = REMOTE_EDEFAULT; + + /** + * The cached value of the '{@link #getConfigurations() Configurations}' containment reference list. + * + * + * @see #getConfigurations() + * @generated + * @ordered + */ + protected EList configurations; + + /** + * The cached value of the '{@link #getNamespaces() Namespaces}' containment reference list. + * + * + * @see #getNamespaces() + * @generated + * @ordered + */ + protected EList namespaces; + + /** + * + * + * @generated + */ + protected CdapClusterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_CLUSTER; + } + + /** + * + * + * @generated + */ + public String getBaseUrl() { + return baseUrl; + } + + /** + * + * + * @generated + */ + public void setBaseUrl(String newBaseUrl) { + String oldBaseUrl = baseUrl; + baseUrl = newBaseUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_CLUSTER__BASE_URL, oldBaseUrl, baseUrl)); + } + + /** + * + * + * @generated + */ + public long getPollingFrequency() { + return pollingFrequency; + } + + /** + * + * + * @generated + */ + public void setPollingFrequency(long newPollingFrequency) { + long oldPollingFrequency = pollingFrequency; + pollingFrequency = newPollingFrequency; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_CLUSTER__POLLING_FREQUENCY, oldPollingFrequency, pollingFrequency)); + } + + /** + * + * + * @generated + */ + public boolean isRemote() { + return remote; + } + + /** + * + * + * @generated + */ + public void setRemote(boolean newRemote) { + boolean oldRemote = remote; + remote = newRemote; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_CLUSTER__REMOTE, oldRemote, remote)); + } + + /** + * + * + * @generated + */ + public EList getConfigurations() { + if (configurations == null) { + configurations = new EObjectContainmentEList(CdapConfiguration.class, this, CdapPackage.CDAP_CLUSTER__CONFIGURATIONS); + } + return configurations; + } + + /** + * + * + * @generated + */ + public EList getNamespaces() { + if (namespaces == null) { + namespaces = new EObjectContainmentWithInverseEList(CdapNamespace.class, this, CdapPackage.CDAP_CLUSTER__NAMESPACES, CdapPackage.CDAP_NAMESPACE__CLUSTER); + } + return namespaces; + } + + /** + * + * + * @generated + */ + public void poll() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String createNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public String deleteNamespace(String namespace) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @generated + */ + public EList 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(); + } + + /** + * + * + * @generated + */ + public EList 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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @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(); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_CLUSTER__NAMESPACES: + return ((InternalEList)(InternalEList)getNamespaces()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_CLUSTER__CONFIGURATIONS: + return ((InternalEList)getConfigurations()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_CLUSTER__NAMESPACES: + return ((InternalEList)getNamespaces()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_CLUSTER__BASE_URL: + return getBaseUrl(); + case CdapPackage.CDAP_CLUSTER__POLLING_FREQUENCY: + return getPollingFrequency(); + case CdapPackage.CDAP_CLUSTER__REMOTE: + return isRemote(); + case CdapPackage.CDAP_CLUSTER__CONFIGURATIONS: + return getConfigurations(); + case CdapPackage.CDAP_CLUSTER__NAMESPACES: + return getNamespaces(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_CLUSTER__BASE_URL: + setBaseUrl((String)newValue); + return; + case CdapPackage.CDAP_CLUSTER__POLLING_FREQUENCY: + setPollingFrequency((Long)newValue); + return; + case CdapPackage.CDAP_CLUSTER__REMOTE: + setRemote((Boolean)newValue); + return; + case CdapPackage.CDAP_CLUSTER__CONFIGURATIONS: + getConfigurations().clear(); + getConfigurations().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_CLUSTER__NAMESPACES: + getNamespaces().clear(); + getNamespaces().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_CLUSTER__BASE_URL: + setBaseUrl(BASE_URL_EDEFAULT); + return; + case CdapPackage.CDAP_CLUSTER__POLLING_FREQUENCY: + setPollingFrequency(POLLING_FREQUENCY_EDEFAULT); + return; + case CdapPackage.CDAP_CLUSTER__REMOTE: + setRemote(REMOTE_EDEFAULT); + return; + case CdapPackage.CDAP_CLUSTER__CONFIGURATIONS: + getConfigurations().clear(); + return; + case CdapPackage.CDAP_CLUSTER__NAMESPACES: + getNamespaces().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_CLUSTER__BASE_URL: + return BASE_URL_EDEFAULT == null ? baseUrl != null : !BASE_URL_EDEFAULT.equals(baseUrl); + case CdapPackage.CDAP_CLUSTER__POLLING_FREQUENCY: + return pollingFrequency != POLLING_FREQUENCY_EDEFAULT; + case CdapPackage.CDAP_CLUSTER__REMOTE: + return remote != REMOTE_EDEFAULT; + case CdapPackage.CDAP_CLUSTER__CONFIGURATIONS: + return configurations != null && !configurations.isEmpty(); + case CdapPackage.CDAP_CLUSTER__NAMESPACES: + return namespaces != null && !namespaces.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == CdapApi.class) { + switch (baseOperationID) { + case CdapPackage.CDAP_API___CREATE_NAMESPACE__STRING: return CdapPackage.CDAP_CLUSTER___CREATE_NAMESPACE__STRING; + case CdapPackage.CDAP_API___DELETE_NAMESPACE__STRING: return CdapPackage.CDAP_CLUSTER___DELETE_NAMESPACE__STRING; + case CdapPackage.CDAP_API___DEPLOY_APP__STRING_STRING: return CdapPackage.CDAP_CLUSTER___DEPLOY_APP__STRING_STRING; + case CdapPackage.CDAP_API___LOAD_ARTIFACT__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___LOAD_ARTIFACT__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___DELETE_ARTIFACT__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___DELETE_ARTIFACT__STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_FLOW__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___START_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_WORKER__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___START_WORKER__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_SERVICE__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___START_SERVICE__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___START_APP__STRING_STRING: return CdapPackage.CDAP_CLUSTER___START_APP__STRING_STRING; + case CdapPackage.CDAP_API___STOP_APP__STRING_STRING: return CdapPackage.CDAP_CLUSTER___STOP_APP__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_APP__STRING_STRING: return CdapPackage.CDAP_CLUSTER___DELETE_APP__STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___LOAD_PREFERENCES_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING: return CdapPackage.CDAP_CLUSTER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_APP__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___SET_PREFERENCES_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_PREFERENCES_NAME_SPACE__STRING_STRING: return CdapPackage.CDAP_CLUSTER___SET_PREFERENCES_NAME_SPACE__STRING_STRING; + case CdapPackage.CDAP_API___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT: return CdapPackage.CDAP_CLUSTER___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___STOP_FLOW__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___STOP_FLOW__STRING_STRING_STRING; + case CdapPackage.CDAP_API___STOP_WORKER__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___STOP_WORKER__STRING_STRING_STRING; + case CdapPackage.CDAP_API___STOP_SERVICE__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___STOP_SERVICE__STRING_STRING_STRING; + case CdapPackage.CDAP_API___TRUNCATE_DATA_SET__STRING_STRING: return CdapPackage.CDAP_CLUSTER___TRUNCATE_DATA_SET__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_DATASET__STRING_STRING: return CdapPackage.CDAP_CLUSTER___DELETE_DATASET__STRING_STRING; + case CdapPackage.CDAP_API___CREATE_STREAM__STRING_STRING: return CdapPackage.CDAP_CLUSTER___CREATE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___DELETE_STREAM__STRING_STRING: return CdapPackage.CDAP_CLUSTER___DELETE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT: return CdapPackage.CDAP_CLUSTER___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT: return CdapPackage.CDAP_CLUSTER___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT; + case CdapPackage.CDAP_API___SEND_EVENT_TO_STREAM__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING; + case CdapPackage.CDAP_API___TRUCATE_STREAM__STRING_STRING: return CdapPackage.CDAP_CLUSTER___TRUCATE_STREAM__STRING_STRING; + case CdapPackage.CDAP_API___SET_STREAM_PROPERTIES__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___SET_STREAM_PROPERTIES__STRING_STRING_STRING; + case CdapPackage.CDAP_API___RESTART_APP__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___RESTART_APP__STRING_STRING_STRING; + case CdapPackage.CDAP_API___CREATE_APP__STRING_STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___CREATE_APP__STRING_STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_DATASET_PROPERTIES__STRING_STRING_STRING: return CdapPackage.CDAP_CLUSTER___SET_DATASET_PROPERTIES__STRING_STRING_STRING; + case CdapPackage.CDAP_API___SET_STREAM_TTL__STRING_STRING_INT: return CdapPackage.CDAP_CLUSTER___SET_STREAM_TTL__STRING_STRING_INT; + default: return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case CdapPackage.CDAP_CLUSTER___POLL: + poll(); + return null; + case CdapPackage.CDAP_CLUSTER___CREATE_NAMESPACE__STRING: + return createNamespace((String)arguments.get(0)); + case CdapPackage.CDAP_CLUSTER___DELETE_NAMESPACE__STRING: + return deleteNamespace((String)arguments.get(0)); + case CdapPackage.CDAP_CLUSTER___DEPLOY_APP__STRING_STRING: + return deployApp((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___DELETE_ARTIFACT__STRING_STRING_STRING: + return deleteArtifact((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___START_APP__STRING_STRING: + return startApp((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___STOP_APP__STRING_STRING: + return stopApp((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___DELETE_APP__STRING_STRING: + return deleteApp((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___LOAD_PREFERENCES_APP__STRING_STRING_STRING: + return loadPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING: + return loadPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___SET_PREFERENCES_APP__STRING_STRING_STRING: + return setPreferencesApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___SET_PREFERENCES_NAME_SPACE__STRING_STRING: + return setPreferencesNameSpace((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___STOP_FLOW__STRING_STRING_STRING: + return stopFlow((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___STOP_WORKER__STRING_STRING_STRING: + return stopWorker((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___STOP_SERVICE__STRING_STRING_STRING: + return stopService((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___TRUNCATE_DATA_SET__STRING_STRING: + return truncateDataSet((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___DELETE_DATASET__STRING_STRING: + return deleteDataset((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___CREATE_STREAM__STRING_STRING: + return createStream((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___DELETE_STREAM__STRING_STRING: + return deleteStream((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___SEND_EVENT_TO_STREAM__STRING_STRING_STRING: + return sendEventToStream((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___TRUCATE_STREAM__STRING_STRING: + return trucateStream((String)arguments.get(0), (String)arguments.get(1)); + case CdapPackage.CDAP_CLUSTER___SET_STREAM_PROPERTIES__STRING_STRING_STRING: + return setStreamProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___RESTART_APP__STRING_STRING_STRING: + return restartApp((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___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 CdapPackage.CDAP_CLUSTER___SET_DATASET_PROPERTIES__STRING_STRING_STRING: + return setDatasetProperties((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case CdapPackage.CDAP_CLUSTER___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); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (baseUrl: "); + result.append(baseUrl); + result.append(", pollingFrequency: "); + result.append(pollingFrequency); + result.append(", remote: "); + result.append(remote); + result.append(')'); + return result.toString(); + } + +} //CdapClusterImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapConfigurationImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapConfigurationImpl.java new file mode 100644 index 0000000..8b87286 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapConfigurationImpl.java @@ -0,0 +1,239 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapConfiguration; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapConfigurationImpl#getValue Value}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapConfigurationImpl#getSource Source}
  • + *
+ *

+ * + * @generated + */ +public class CdapConfigurationImpl extends NamedEntityImpl implements CdapConfiguration { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getSource() Source}' attribute. + * + * + * @see #getSource() + * @generated + * @ordered + */ + protected static final String SOURCE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSource() Source}' attribute. + * + * + * @see #getSource() + * @generated + * @ordered + */ + protected String source = SOURCE_EDEFAULT; + + /** + * + * + * @generated + */ + protected CdapConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_CONFIGURATION__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public String getSource() { + return source; + } + + /** + * + * + * @generated + */ + public void setSource(String newSource) { + String oldSource = source; + source = newSource; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_CONFIGURATION__SOURCE, oldSource, source)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_CONFIGURATION__VALUE: + return getValue(); + case CdapPackage.CDAP_CONFIGURATION__SOURCE: + return getSource(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_CONFIGURATION__VALUE: + setValue((String)newValue); + return; + case CdapPackage.CDAP_CONFIGURATION__SOURCE: + setSource((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_CONFIGURATION__VALUE: + setValue(VALUE_EDEFAULT); + return; + case CdapPackage.CDAP_CONFIGURATION__SOURCE: + setSource(SOURCE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_CONFIGURATION__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + case CdapPackage.CDAP_CONFIGURATION__SOURCE: + return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(", source: "); + result.append(source); + result.append(')'); + return result.toString(); + } + +} //CdapConfigurationImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetImpl.java new file mode 100644 index 0000000..ee92e9f --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetImpl.java @@ -0,0 +1,311 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapDataset; +import org.openecomp.ncomp.cdap.CdapDatasetSchema; +import org.openecomp.ncomp.cdap.CdapKeyPair; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import java.util.Collection; + +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; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dataset'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapDatasetImpl#getType Type}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapDatasetImpl#getProperties Properties}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapDatasetImpl#getSchema Schema}
  • + *
+ *

+ * + * @generated + */ +public class CdapDatasetImpl extends NamedEntityImpl implements CdapDataset { + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * The cached value of the '{@link #getProperties() Properties}' containment reference list. + * + * + * @see #getProperties() + * @generated + * @ordered + */ + protected EList properties; + + /** + * The cached value of the '{@link #getSchema() Schema}' containment reference. + * + * + * @see #getSchema() + * @generated + * @ordered + */ + protected CdapDatasetSchema schema; + + /** + * + * + * @generated + */ + protected CdapDatasetImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_DATASET; + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_DATASET__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public EList getProperties() { + if (properties == null) { + properties = new EObjectContainmentEList(CdapKeyPair.class, this, CdapPackage.CDAP_DATASET__PROPERTIES); + } + return properties; + } + + /** + * + * + * @generated + */ + public CdapDatasetSchema getSchema() { + return schema; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSchema(CdapDatasetSchema newSchema, NotificationChain msgs) { + CdapDatasetSchema oldSchema = schema; + schema = newSchema; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_DATASET__SCHEMA, oldSchema, newSchema); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSchema(CdapDatasetSchema newSchema) { + if (newSchema != schema) { + NotificationChain msgs = null; + if (schema != null) + msgs = ((InternalEObject)schema).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_DATASET__SCHEMA, null, msgs); + if (newSchema != null) + msgs = ((InternalEObject)newSchema).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CdapPackage.CDAP_DATASET__SCHEMA, null, msgs); + msgs = basicSetSchema(newSchema, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_DATASET__SCHEMA, newSchema, newSchema)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_DATASET__PROPERTIES: + return ((InternalEList)getProperties()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_DATASET__SCHEMA: + return basicSetSchema(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_DATASET__TYPE: + return getType(); + case CdapPackage.CDAP_DATASET__PROPERTIES: + return getProperties(); + case CdapPackage.CDAP_DATASET__SCHEMA: + return getSchema(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_DATASET__TYPE: + setType((String)newValue); + return; + case CdapPackage.CDAP_DATASET__PROPERTIES: + getProperties().clear(); + getProperties().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_DATASET__SCHEMA: + setSchema((CdapDatasetSchema)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_DATASET__TYPE: + setType(TYPE_EDEFAULT); + return; + case CdapPackage.CDAP_DATASET__PROPERTIES: + getProperties().clear(); + return; + case CdapPackage.CDAP_DATASET__SCHEMA: + setSchema((CdapDatasetSchema)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_DATASET__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case CdapPackage.CDAP_DATASET__PROPERTIES: + return properties != null && !properties.isEmpty(); + case CdapPackage.CDAP_DATASET__SCHEMA: + return schema != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} //CdapDatasetImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetSchemaFieldImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetSchemaFieldImpl.java new file mode 100644 index 0000000..3de4d77 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetSchemaFieldImpl.java @@ -0,0 +1,185 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapDatasetSchemaField; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Dataset Schema Field'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaFieldImpl#getType Type}
  • + *
+ *

+ * + * @generated + */ +public class CdapDatasetSchemaFieldImpl extends NamedEntityImpl implements CdapDatasetSchemaField { + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected CdapDatasetSchemaFieldImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_DATASET_SCHEMA_FIELD; + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_DATASET_SCHEMA_FIELD__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_DATASET_SCHEMA_FIELD__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_DATASET_SCHEMA_FIELD__TYPE: + setType((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_DATASET_SCHEMA_FIELD__TYPE: + setType(TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_DATASET_SCHEMA_FIELD__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} //CdapDatasetSchemaFieldImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetSchemaImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetSchemaImpl.java new file mode 100644 index 0000000..5900420 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapDatasetSchemaImpl.java @@ -0,0 +1,244 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapDatasetSchema; +import org.openecomp.ncomp.cdap.CdapDatasetSchemaField; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import java.util.Collection; + +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; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dataset Schema'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaImpl#getType Type}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapDatasetSchemaImpl#getFields Fields}
  • + *
+ *

+ * + * @generated + */ +public class CdapDatasetSchemaImpl extends NamedEntityImpl implements CdapDatasetSchema { + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * The cached value of the '{@link #getFields() Fields}' containment reference list. + * + * + * @see #getFields() + * @generated + * @ordered + */ + protected EList fields; + + /** + * + * + * @generated + */ + protected CdapDatasetSchemaImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_DATASET_SCHEMA; + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_DATASET_SCHEMA__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public EList getFields() { + if (fields == null) { + fields = new EObjectContainmentEList(CdapDatasetSchemaField.class, this, CdapPackage.CDAP_DATASET_SCHEMA__FIELDS); + } + return fields; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_DATASET_SCHEMA__FIELDS: + return ((InternalEList)getFields()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_DATASET_SCHEMA__TYPE: + return getType(); + case CdapPackage.CDAP_DATASET_SCHEMA__FIELDS: + return getFields(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_DATASET_SCHEMA__TYPE: + setType((String)newValue); + return; + case CdapPackage.CDAP_DATASET_SCHEMA__FIELDS: + getFields().clear(); + getFields().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_DATASET_SCHEMA__TYPE: + setType(TYPE_EDEFAULT); + return; + case CdapPackage.CDAP_DATASET_SCHEMA__FIELDS: + getFields().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_DATASET_SCHEMA__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case CdapPackage.CDAP_DATASET_SCHEMA__FIELDS: + return fields != null && !fields.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (type: "); + result.append(type); + result.append(')'); + return result.toString(); + } + +} //CdapDatasetSchemaImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapEntityWithPreferencesImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapEntityWithPreferencesImpl.java new file mode 100644 index 0000000..29716b0 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapEntityWithPreferencesImpl.java @@ -0,0 +1,173 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapEntityWithPreferences; +import org.openecomp.ncomp.cdap.CdapKeyPair; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import java.util.Collection; + +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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Entity With Preferences'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapEntityWithPreferencesImpl#getPreferences Preferences}
  • + *
+ *

+ * + * @generated + */ +public class CdapEntityWithPreferencesImpl extends NamedEntityImpl implements CdapEntityWithPreferences { + /** + * The cached value of the '{@link #getPreferences() Preferences}' containment reference list. + * + * + * @see #getPreferences() + * @generated + * @ordered + */ + protected EList preferences; + + /** + * + * + * @generated + */ + protected CdapEntityWithPreferencesImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_ENTITY_WITH_PREFERENCES; + } + + /** + * + * + * @generated + */ + public EList getPreferences() { + if (preferences == null) { + preferences = new EObjectContainmentEList(CdapKeyPair.class, this, CdapPackage.CDAP_ENTITY_WITH_PREFERENCES__PREFERENCES); + } + return preferences; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_ENTITY_WITH_PREFERENCES__PREFERENCES: + return ((InternalEList)getPreferences()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_ENTITY_WITH_PREFERENCES__PREFERENCES: + return getPreferences(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_ENTITY_WITH_PREFERENCES__PREFERENCES: + getPreferences().clear(); + getPreferences().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_ENTITY_WITH_PREFERENCES__PREFERENCES: + getPreferences().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_ENTITY_WITH_PREFERENCES__PREFERENCES: + return preferences != null && !preferences.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //CdapEntityWithPreferencesImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapFactoryImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapFactoryImpl.java new file mode 100644 index 0000000..bb2285d --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapFactoryImpl.java @@ -0,0 +1,237 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CdapFactoryImpl extends EFactoryImpl implements CdapFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static CdapFactory init() { + try { + CdapFactory theCdapFactory = (CdapFactory)EPackage.Registry.INSTANCE.getEFactory(CdapPackage.eNS_URI); + if (theCdapFactory != null) { + return theCdapFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CdapFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public CdapFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CdapPackage.CDAP_ADAPTOR: return createCdapAdaptor(); + case CdapPackage.CDAP_CLUSTER: return createCdapCluster(); + case CdapPackage.CDAP_API: return createCdapApi(); + case CdapPackage.CDAP_CONFIGURATION: return createCdapConfiguration(); + case CdapPackage.CDAP_NAMESPACE: return createCdapNamespace(); + case CdapPackage.CDAP_KEY_PAIR: return createCdapKeyPair(); + case CdapPackage.CDAP_ENTITY_WITH_PREFERENCES: return createCdapEntityWithPreferences(); + case CdapPackage.CDAP_DATASET: return createCdapDataset(); + case CdapPackage.CDAP_DATASET_SCHEMA: return createCdapDatasetSchema(); + case CdapPackage.CDAP_DATASET_SCHEMA_FIELD: return createCdapDatasetSchemaField(); + case CdapPackage.CDAP_APPLICATION: return createCdapApplication(); + case CdapPackage.CDAP_ARTIFACT: return createCdapArtifact(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CdapAdaptor createCdapAdaptor() { + CdapAdaptorImpl cdapAdaptor = new CdapAdaptorImpl(); + return cdapAdaptor; + } + + /** + * + * + * @generated + */ + public CdapCluster createCdapCluster() { + CdapClusterImpl cdapCluster = new CdapClusterImpl(); + return cdapCluster; + } + + /** + * + * + * @generated + */ + public CdapApi createCdapApi() { + CdapApiImpl cdapApi = new CdapApiImpl(); + return cdapApi; + } + + /** + * + * + * @generated + */ + public CdapConfiguration createCdapConfiguration() { + CdapConfigurationImpl cdapConfiguration = new CdapConfigurationImpl(); + return cdapConfiguration; + } + + /** + * + * + * @generated + */ + public CdapNamespace createCdapNamespace() { + CdapNamespaceImpl cdapNamespace = new CdapNamespaceImpl(); + return cdapNamespace; + } + + /** + * + * + * @generated + */ + public CdapKeyPair createCdapKeyPair() { + CdapKeyPairImpl cdapKeyPair = new CdapKeyPairImpl(); + return cdapKeyPair; + } + + /** + * + * + * @generated + */ + public CdapEntityWithPreferences createCdapEntityWithPreferences() { + CdapEntityWithPreferencesImpl cdapEntityWithPreferences = new CdapEntityWithPreferencesImpl(); + return cdapEntityWithPreferences; + } + + /** + * + * + * @generated + */ + public CdapDataset createCdapDataset() { + CdapDatasetImpl cdapDataset = new CdapDatasetImpl(); + return cdapDataset; + } + + /** + * + * + * @generated + */ + public CdapDatasetSchema createCdapDatasetSchema() { + CdapDatasetSchemaImpl cdapDatasetSchema = new CdapDatasetSchemaImpl(); + return cdapDatasetSchema; + } + + /** + * + * + * @generated + */ + public CdapDatasetSchemaField createCdapDatasetSchemaField() { + CdapDatasetSchemaFieldImpl cdapDatasetSchemaField = new CdapDatasetSchemaFieldImpl(); + return cdapDatasetSchemaField; + } + + /** + * + * + * @generated + */ + public CdapApplication createCdapApplication() { + CdapApplicationImpl cdapApplication = new CdapApplicationImpl(); + return cdapApplication; + } + + /** + * + * + * @generated + */ + public CdapArtifact createCdapArtifact() { + CdapArtifactImpl cdapArtifact = new CdapArtifactImpl(); + return cdapArtifact; + } + + /** + * + * + * @generated + */ + public CdapPackage getCdapPackage() { + return (CdapPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static CdapPackage getPackage() { + return CdapPackage.eINSTANCE; + } + +} //CdapFactoryImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapKeyPairImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapKeyPairImpl.java new file mode 100644 index 0000000..43e89b7 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapKeyPairImpl.java @@ -0,0 +1,185 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapKeyPair; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Key Pair'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapKeyPairImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class CdapKeyPairImpl extends NamedEntityImpl implements CdapKeyPair { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected CdapKeyPairImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_KEY_PAIR; + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_KEY_PAIR__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_KEY_PAIR__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_KEY_PAIR__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_KEY_PAIR__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_KEY_PAIR__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //CdapKeyPairImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapNamespaceImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapNamespaceImpl.java new file mode 100644 index 0000000..abde934 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapNamespaceImpl.java @@ -0,0 +1,415 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapApplication; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.cdap.CdapDataset; +import org.openecomp.ncomp.cdap.CdapKeyPair; +import org.openecomp.ncomp.cdap.CdapNamespace; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import java.util.Collection; + +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; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Namespace'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapNamespaceImpl#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapNamespaceImpl#getConfig Config}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapNamespaceImpl#getDatasets Datasets}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapNamespaceImpl#getApplications Applications}
  • + *
  • {@link org.openecomp.ncomp.cdap.impl.CdapNamespaceImpl#getCluster Cluster}
  • + *
+ *

+ * + * @generated + */ +public class CdapNamespaceImpl extends NamedEntityImpl implements CdapNamespace { + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The cached value of the '{@link #getConfig() Config}' containment reference list. + * + * + * @see #getConfig() + * @generated + * @ordered + */ + protected EList config; + + /** + * The cached value of the '{@link #getDatasets() Datasets}' containment reference list. + * + * + * @see #getDatasets() + * @generated + * @ordered + */ + protected EList datasets; + + /** + * The cached value of the '{@link #getApplications() Applications}' containment reference list. + * + * + * @see #getApplications() + * @generated + * @ordered + */ + protected EList applications; + + /** + * + * + * @generated + */ + protected CdapNamespaceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CdapPackage.Literals.CDAP_NAMESPACE; + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_NAMESPACE__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public EList getConfig() { + if (config == null) { + config = new EObjectContainmentEList(CdapKeyPair.class, this, CdapPackage.CDAP_NAMESPACE__CONFIG); + } + return config; + } + + /** + * + * + * @generated + */ + public EList getDatasets() { + if (datasets == null) { + datasets = new EObjectContainmentEList(CdapDataset.class, this, CdapPackage.CDAP_NAMESPACE__DATASETS); + } + return datasets; + } + + /** + * + * + * @generated + */ + public EList getApplications() { + if (applications == null) { + applications = new EObjectContainmentEList(CdapApplication.class, this, CdapPackage.CDAP_NAMESPACE__APPLICATIONS); + } + return applications; + } + + /** + * + * + * @generated + */ + public CdapCluster getCluster() { + if (eContainerFeatureID() != CdapPackage.CDAP_NAMESPACE__CLUSTER) return null; + return (CdapCluster)eContainer(); + } + + /** + * + * + * @generated + */ + public CdapCluster basicGetCluster() { + if (eContainerFeatureID() != CdapPackage.CDAP_NAMESPACE__CLUSTER) return null; + return (CdapCluster)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetCluster(CdapCluster newCluster, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newCluster, CdapPackage.CDAP_NAMESPACE__CLUSTER, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setCluster(CdapCluster newCluster) { + if (newCluster != eInternalContainer() || (eContainerFeatureID() != CdapPackage.CDAP_NAMESPACE__CLUSTER && newCluster != null)) { + if (EcoreUtil.isAncestor(this, newCluster)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newCluster != null) + msgs = ((InternalEObject)newCluster).eInverseAdd(this, CdapPackage.CDAP_CLUSTER__NAMESPACES, CdapCluster.class, msgs); + msgs = basicSetCluster(newCluster, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CdapPackage.CDAP_NAMESPACE__CLUSTER, newCluster, newCluster)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_NAMESPACE__CLUSTER: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetCluster((CdapCluster)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CdapPackage.CDAP_NAMESPACE__CONFIG: + return ((InternalEList)getConfig()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_NAMESPACE__DATASETS: + return ((InternalEList)getDatasets()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_NAMESPACE__APPLICATIONS: + return ((InternalEList)getApplications()).basicRemove(otherEnd, msgs); + case CdapPackage.CDAP_NAMESPACE__CLUSTER: + return basicSetCluster(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case CdapPackage.CDAP_NAMESPACE__CLUSTER: + return eInternalContainer().eInverseRemove(this, CdapPackage.CDAP_CLUSTER__NAMESPACES, CdapCluster.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CdapPackage.CDAP_NAMESPACE__DESCRIPTION: + return getDescription(); + case CdapPackage.CDAP_NAMESPACE__CONFIG: + return getConfig(); + case CdapPackage.CDAP_NAMESPACE__DATASETS: + return getDatasets(); + case CdapPackage.CDAP_NAMESPACE__APPLICATIONS: + return getApplications(); + case CdapPackage.CDAP_NAMESPACE__CLUSTER: + if (resolve) return getCluster(); + return basicGetCluster(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CdapPackage.CDAP_NAMESPACE__DESCRIPTION: + setDescription((String)newValue); + return; + case CdapPackage.CDAP_NAMESPACE__CONFIG: + getConfig().clear(); + getConfig().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_NAMESPACE__DATASETS: + getDatasets().clear(); + getDatasets().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_NAMESPACE__APPLICATIONS: + getApplications().clear(); + getApplications().addAll((Collection)newValue); + return; + case CdapPackage.CDAP_NAMESPACE__CLUSTER: + setCluster((CdapCluster)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_NAMESPACE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case CdapPackage.CDAP_NAMESPACE__CONFIG: + getConfig().clear(); + return; + case CdapPackage.CDAP_NAMESPACE__DATASETS: + getDatasets().clear(); + return; + case CdapPackage.CDAP_NAMESPACE__APPLICATIONS: + getApplications().clear(); + return; + case CdapPackage.CDAP_NAMESPACE__CLUSTER: + setCluster((CdapCluster)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CdapPackage.CDAP_NAMESPACE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case CdapPackage.CDAP_NAMESPACE__CONFIG: + return config != null && !config.isEmpty(); + case CdapPackage.CDAP_NAMESPACE__DATASETS: + return datasets != null && !datasets.isEmpty(); + case CdapPackage.CDAP_NAMESPACE__APPLICATIONS: + return applications != null && !applications.isEmpty(); + case CdapPackage.CDAP_NAMESPACE__CLUSTER: + return basicGetCluster() != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} //CdapNamespaceImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapPackageImpl.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapPackageImpl.java new file mode 100644 index 0000000..50c9fbc --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/impl/CdapPackageImpl.java @@ -0,0 +1,1325 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.impl; + +import org.openecomp.ncomp.cdap.CdapAdaptor; +import org.openecomp.ncomp.cdap.CdapApi; +import org.openecomp.ncomp.cdap.CdapApplication; +import org.openecomp.ncomp.cdap.CdapArtifact; +import org.openecomp.ncomp.cdap.CdapCluster; +import org.openecomp.ncomp.cdap.CdapConfiguration; +import org.openecomp.ncomp.cdap.CdapDataset; +import org.openecomp.ncomp.cdap.CdapDatasetSchema; +import org.openecomp.ncomp.cdap.CdapDatasetSchemaField; +import org.openecomp.ncomp.cdap.CdapEntityWithPreferences; +import org.openecomp.ncomp.cdap.CdapFactory; +import org.openecomp.ncomp.cdap.CdapKeyPair; +import org.openecomp.ncomp.cdap.CdapNamespace; +import org.openecomp.ncomp.cdap.CdapPackage; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class CdapPackageImpl extends EPackageImpl implements CdapPackage { + /** + * + * + * @generated + */ + private EClass cdapAdaptorEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapClusterEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapApiEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapNamespaceEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapKeyPairEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapEntityWithPreferencesEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapDatasetEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapDatasetSchemaEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapDatasetSchemaFieldEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapApplicationEClass = null; + + /** + * + * + * @generated + */ + private EClass cdapArtifactEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.ncomp.cdap.CdapPackage#eNS_URI + * @see #init() + * @generated + */ + private CdapPackageImpl() { + super(eNS_URI, CdapFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link CdapPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CdapPackage init() { + if (isInited) return (CdapPackage)EPackage.Registry.INSTANCE.getEPackage(CdapPackage.eNS_URI); + + // Obtain or create and register package + CdapPackageImpl theCdapPackage = (CdapPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CdapPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CdapPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theCdapPackage.createPackageContents(); + + // Initialize created meta-data + theCdapPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCdapPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CdapPackage.eNS_URI, theCdapPackage); + return theCdapPackage; + } + + /** + * + * + * @generated + */ + public EClass getCdapAdaptor() { + return cdapAdaptorEClass; + } + + /** + * + * + * @generated + */ + public EClass getCdapCluster() { + return cdapClusterEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapCluster_BaseUrl() { + return (EAttribute)cdapClusterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapCluster_PollingFrequency() { + return (EAttribute)cdapClusterEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapCluster_Remote() { + return (EAttribute)cdapClusterEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getCdapCluster_Configurations() { + return (EReference)cdapClusterEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getCdapCluster_Namespaces() { + return (EReference)cdapClusterEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EOperation getCdapCluster__Poll() { + return cdapClusterEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EClass getCdapApi() { + return cdapApiEClass; + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__CreateNamespace__String() { + return cdapApiEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__DeleteNamespace__String() { + return cdapApiEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__DeployApp__String_String() { + return cdapApiEClass.getEOperations().get(2); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__LoadArtifact__String_String_String_String() { + return cdapApiEClass.getEOperations().get(3); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__DeleteArtifact__String_String_String() { + return cdapApiEClass.getEOperations().get(4); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__StartFlow__String_String_String_String() { + return cdapApiEClass.getEOperations().get(5); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__StartWorker__String_String_String_String() { + return cdapApiEClass.getEOperations().get(6); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__StartService__String_String_String_String() { + return cdapApiEClass.getEOperations().get(7); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__StartApp__String_String() { + return cdapApiEClass.getEOperations().get(8); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__StopApp__String_String() { + return cdapApiEClass.getEOperations().get(9); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__DeleteApp__String_String() { + return cdapApiEClass.getEOperations().get(10); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__LoadPreferencesApp__String_String_String() { + return cdapApiEClass.getEOperations().get(11); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__LoadPreferencesFlow__String_String_String_String() { + return cdapApiEClass.getEOperations().get(12); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__LoadPreferencesNameSpace__String_String() { + return cdapApiEClass.getEOperations().get(13); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetPreferencesApp__String_String_String() { + return cdapApiEClass.getEOperations().get(14); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetPreferencesFlow__String_String_String_String() { + return cdapApiEClass.getEOperations().get(15); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetPreferencesWorker__String_String_String_String() { + return cdapApiEClass.getEOperations().get(16); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetPreferencesService__String_String_String_String() { + return cdapApiEClass.getEOperations().get(17); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetPreferencesNameSpace__String_String() { + return cdapApiEClass.getEOperations().get(18); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetFlowRunTimeArgs__String_String_String_String() { + return cdapApiEClass.getEOperations().get(19); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetFlowletInstances__String_String_String_String_int() { + return cdapApiEClass.getEOperations().get(20); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__StopFlow__String_String_String() { + return cdapApiEClass.getEOperations().get(21); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__StopWorker__String_String_String() { + return cdapApiEClass.getEOperations().get(22); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__StopService__String_String_String() { + return cdapApiEClass.getEOperations().get(23); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__TruncateDataSet__String_String() { + return cdapApiEClass.getEOperations().get(24); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__DeleteDataset__String_String() { + return cdapApiEClass.getEOperations().get(25); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__CreateStream__String_String() { + return cdapApiEClass.getEOperations().get(26); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__DeleteStream__String_String() { + return cdapApiEClass.getEOperations().get(27); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__GetStreamEvents__String_String_String_String_int() { + return cdapApiEClass.getEOperations().get(28); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__GetStreamStats__String_String_String_String_int() { + return cdapApiEClass.getEOperations().get(29); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SendEventToStream__String_String_String() { + return cdapApiEClass.getEOperations().get(30); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__TrucateStream__String_String() { + return cdapApiEClass.getEOperations().get(31); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetStreamProperties__String_String_String() { + return cdapApiEClass.getEOperations().get(32); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__RestartApp__String_String_String() { + return cdapApiEClass.getEOperations().get(33); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__CreateApp__String_String_String_String_String() { + return cdapApiEClass.getEOperations().get(34); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__CreateAppWithConfig__String_String_String_String_String_String() { + return cdapApiEClass.getEOperations().get(35); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetDatasetProperties__String_String_String() { + return cdapApiEClass.getEOperations().get(36); + } + + /** + * + * + * @generated + */ + public EOperation getCdapApi__SetStreamTTL__String_String_int() { + return cdapApiEClass.getEOperations().get(37); + } + + /** + * + * + * @generated + */ + public EClass getCdapConfiguration() { + return cdapConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapConfiguration_Value() { + return (EAttribute)cdapConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapConfiguration_Source() { + return (EAttribute)cdapConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getCdapNamespace() { + return cdapNamespaceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapNamespace_Description() { + return (EAttribute)cdapNamespaceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCdapNamespace_Config() { + return (EReference)cdapNamespaceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getCdapNamespace_Datasets() { + return (EReference)cdapNamespaceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getCdapNamespace_Applications() { + return (EReference)cdapNamespaceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getCdapNamespace_Cluster() { + return (EReference)cdapNamespaceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getCdapKeyPair() { + return cdapKeyPairEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapKeyPair_Value() { + return (EAttribute)cdapKeyPairEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getCdapEntityWithPreferences() { + return cdapEntityWithPreferencesEClass; + } + + /** + * + * + * @generated + */ + public EReference getCdapEntityWithPreferences_Preferences() { + return (EReference)cdapEntityWithPreferencesEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getCdapDataset() { + return cdapDatasetEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapDataset_Type() { + return (EAttribute)cdapDatasetEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCdapDataset_Properties() { + return (EReference)cdapDatasetEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getCdapDataset_Schema() { + return (EReference)cdapDatasetEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getCdapDatasetSchema() { + return cdapDatasetSchemaEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapDatasetSchema_Type() { + return (EAttribute)cdapDatasetSchemaEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCdapDatasetSchema_Fields() { + return (EReference)cdapDatasetSchemaEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getCdapDatasetSchemaField() { + return cdapDatasetSchemaFieldEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapDatasetSchemaField_Type() { + return (EAttribute)cdapDatasetSchemaFieldEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getCdapApplication() { + return cdapApplicationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapApplication_Type() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapApplication_Id() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapApplication_Version() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapApplication_Description() { + return (EAttribute)cdapApplicationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getCdapApplication_Artifact() { + return (EReference)cdapApplicationEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getCdapArtifact() { + return cdapArtifactEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCdapArtifact_Version() { + return (EAttribute)cdapArtifactEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCdapArtifact_Scope() { + return (EAttribute)cdapArtifactEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public CdapFactory getCdapFactory() { + return (CdapFactory)getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + cdapAdaptorEClass = createEClass(CDAP_ADAPTOR); + + cdapClusterEClass = createEClass(CDAP_CLUSTER); + createEAttribute(cdapClusterEClass, CDAP_CLUSTER__BASE_URL); + createEAttribute(cdapClusterEClass, CDAP_CLUSTER__POLLING_FREQUENCY); + createEAttribute(cdapClusterEClass, CDAP_CLUSTER__REMOTE); + createEReference(cdapClusterEClass, CDAP_CLUSTER__CONFIGURATIONS); + createEReference(cdapClusterEClass, CDAP_CLUSTER__NAMESPACES); + createEOperation(cdapClusterEClass, CDAP_CLUSTER___POLL); + + cdapApiEClass = createEClass(CDAP_API); + createEOperation(cdapApiEClass, CDAP_API___CREATE_NAMESPACE__STRING); + createEOperation(cdapApiEClass, CDAP_API___DELETE_NAMESPACE__STRING); + createEOperation(cdapApiEClass, CDAP_API___DEPLOY_APP__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___LOAD_ARTIFACT__STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___DELETE_ARTIFACT__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___START_FLOW__STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___START_WORKER__STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___START_SERVICE__STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___START_APP__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___STOP_APP__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___DELETE_APP__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___LOAD_PREFERENCES_APP__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___LOAD_PREFERENCES_FLOW__STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___LOAD_PREFERENCES_NAME_SPACE__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_PREFERENCES_APP__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_PREFERENCES_FLOW__STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_PREFERENCES_WORKER__STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_PREFERENCES_SERVICE__STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_PREFERENCES_NAME_SPACE__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_FLOW_RUN_TIME_ARGS__STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_FLOWLET_INSTANCES__STRING_STRING_STRING_STRING_INT); + createEOperation(cdapApiEClass, CDAP_API___STOP_FLOW__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___STOP_WORKER__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___STOP_SERVICE__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___TRUNCATE_DATA_SET__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___DELETE_DATASET__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___CREATE_STREAM__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___DELETE_STREAM__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___GET_STREAM_EVENTS__STRING_STRING_STRING_STRING_INT); + createEOperation(cdapApiEClass, CDAP_API___GET_STREAM_STATS__STRING_STRING_STRING_STRING_INT); + createEOperation(cdapApiEClass, CDAP_API___SEND_EVENT_TO_STREAM__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___TRUCATE_STREAM__STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_STREAM_PROPERTIES__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___RESTART_APP__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___CREATE_APP__STRING_STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___CREATE_APP_WITH_CONFIG__STRING_STRING_STRING_STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_DATASET_PROPERTIES__STRING_STRING_STRING); + createEOperation(cdapApiEClass, CDAP_API___SET_STREAM_TTL__STRING_STRING_INT); + + cdapConfigurationEClass = createEClass(CDAP_CONFIGURATION); + createEAttribute(cdapConfigurationEClass, CDAP_CONFIGURATION__VALUE); + createEAttribute(cdapConfigurationEClass, CDAP_CONFIGURATION__SOURCE); + + cdapNamespaceEClass = createEClass(CDAP_NAMESPACE); + createEAttribute(cdapNamespaceEClass, CDAP_NAMESPACE__DESCRIPTION); + createEReference(cdapNamespaceEClass, CDAP_NAMESPACE__CONFIG); + createEReference(cdapNamespaceEClass, CDAP_NAMESPACE__DATASETS); + createEReference(cdapNamespaceEClass, CDAP_NAMESPACE__APPLICATIONS); + createEReference(cdapNamespaceEClass, CDAP_NAMESPACE__CLUSTER); + + cdapKeyPairEClass = createEClass(CDAP_KEY_PAIR); + createEAttribute(cdapKeyPairEClass, CDAP_KEY_PAIR__VALUE); + + cdapEntityWithPreferencesEClass = createEClass(CDAP_ENTITY_WITH_PREFERENCES); + createEReference(cdapEntityWithPreferencesEClass, CDAP_ENTITY_WITH_PREFERENCES__PREFERENCES); + + cdapDatasetEClass = createEClass(CDAP_DATASET); + createEAttribute(cdapDatasetEClass, CDAP_DATASET__TYPE); + createEReference(cdapDatasetEClass, CDAP_DATASET__PROPERTIES); + createEReference(cdapDatasetEClass, CDAP_DATASET__SCHEMA); + + cdapDatasetSchemaEClass = createEClass(CDAP_DATASET_SCHEMA); + createEAttribute(cdapDatasetSchemaEClass, CDAP_DATASET_SCHEMA__TYPE); + createEReference(cdapDatasetSchemaEClass, CDAP_DATASET_SCHEMA__FIELDS); + + cdapDatasetSchemaFieldEClass = createEClass(CDAP_DATASET_SCHEMA_FIELD); + createEAttribute(cdapDatasetSchemaFieldEClass, CDAP_DATASET_SCHEMA_FIELD__TYPE); + + cdapApplicationEClass = createEClass(CDAP_APPLICATION); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__TYPE); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__ID); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__VERSION); + createEAttribute(cdapApplicationEClass, CDAP_APPLICATION__DESCRIPTION); + createEReference(cdapApplicationEClass, CDAP_APPLICATION__ARTIFACT); + + cdapArtifactEClass = createEClass(CDAP_ARTIFACT); + createEAttribute(cdapArtifactEClass, CDAP_ARTIFACT__VERSION); + createEAttribute(cdapArtifactEClass, CDAP_ARTIFACT__SCOPE); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdapClusterEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapClusterEClass.getESuperTypes().add(this.getCdapApi()); + cdapConfigurationEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapNamespaceEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapKeyPairEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapEntityWithPreferencesEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapDatasetEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapDatasetSchemaEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapDatasetSchemaFieldEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapApplicationEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + cdapArtifactEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(cdapAdaptorEClass, CdapAdaptor.class, "CdapAdaptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(cdapClusterEClass, CdapCluster.class, "CdapCluster", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapCluster_BaseUrl(), theEcorePackage.getEString(), "baseUrl", null, 0, 1, CdapCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapCluster_PollingFrequency(), theEcorePackage.getELong(), "pollingFrequency", "300000", 0, 1, CdapCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapCluster_Remote(), theEcorePackage.getEBoolean(), "remote", "false", 0, 1, CdapCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapCluster_Configurations(), this.getCdapConfiguration(), null, "configurations", null, 0, -1, CdapCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapCluster_Namespaces(), this.getCdapNamespace(), this.getCdapNamespace_Cluster(), "namespaces", null, 0, -1, CdapCluster.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEOperation(getCdapCluster__Poll(), null, "poll", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(cdapApiEClass, CdapApi.class, "CdapApi", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + EOperation op = initEOperation(getCdapApi__CreateNamespace__String(), theEcorePackage.getEString(), "createNamespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__DeleteNamespace__String(), theEcorePackage.getEString(), "deleteNamespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__DeployApp__String_String(), theEcorePackage.getEString(), "deployApp", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "jarfile", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__LoadArtifact__String_String_String_String(), theEcorePackage.getEString(), "loadArtifact", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "artifactName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "jarfile", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "version", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__DeleteArtifact__String_String_String(), theEcorePackage.getEString(), "deleteArtifact", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "artifactName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "artifactVersion", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__StartFlow__String_String_String_String(), theEcorePackage.getEString(), "startFlow", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "flowId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "extraArgs", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__StartWorker__String_String_String_String(), theEcorePackage.getEString(), "startWorker", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "workerId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "extraArgs", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__StartService__String_String_String_String(), theEcorePackage.getEString(), "startService", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "serviceId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "extraArgs", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__StartApp__String_String(), theEcorePackage.getEString(), "startApp", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__StopApp__String_String(), theEcorePackage.getEString(), "stopApp", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__DeleteApp__String_String(), theEcorePackage.getEString(), "deleteApp", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__LoadPreferencesApp__String_String_String(), theEcorePackage.getEString(), "loadPreferencesApp", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "prefsFile", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__LoadPreferencesFlow__String_String_String_String(), theEcorePackage.getEString(), "loadPreferencesFlow", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "prefsFile", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "flowId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__LoadPreferencesNameSpace__String_String(), theEcorePackage.getEString(), "loadPreferencesNameSpace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "prefsFile", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetPreferencesApp__String_String_String(), theEcorePackage.getEString(), "setPreferencesApp", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "prefsString", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetPreferencesFlow__String_String_String_String(), theEcorePackage.getEString(), "setPreferencesFlow", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "prefsString", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "flowId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetPreferencesWorker__String_String_String_String(), theEcorePackage.getEString(), "setPreferencesWorker", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "prefsString", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "workerId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetPreferencesService__String_String_String_String(), theEcorePackage.getEString(), "setPreferencesService", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "prefsString", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "serviceId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetPreferencesNameSpace__String_String(), theEcorePackage.getEString(), "setPreferencesNameSpace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "prefsString", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetFlowRunTimeArgs__String_String_String_String(), theEcorePackage.getEString(), "setFlowRunTimeArgs", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "flowId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "args", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetFlowletInstances__String_String_String_String_int(), theEcorePackage.getEString(), "setFlowletInstances", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "flowId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "flowletId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEInt(), "nInstances", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__StopFlow__String_String_String(), theEcorePackage.getEString(), "stopFlow", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "flowId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__StopWorker__String_String_String(), theEcorePackage.getEString(), "stopWorker", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "workerId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__StopService__String_String_String(), theEcorePackage.getEString(), "stopService", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "serviceId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__TruncateDataSet__String_String(), theEcorePackage.getEString(), "truncateDataSet", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "datasetName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__DeleteDataset__String_String(), theEcorePackage.getEString(), "deleteDataset", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "datasetName", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__CreateStream__String_String(), theEcorePackage.getEString(), "createStream", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "newStreamId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__DeleteStream__String_String(), theEcorePackage.getEString(), "deleteStream", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "streamId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__GetStreamEvents__String_String_String_String_int(), theEcorePackage.getEString(), "getStreamEvents", 0, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "streamId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "startTime", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "endTime", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEInt(), "limit", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__GetStreamStats__String_String_String_String_int(), theEcorePackage.getEString(), "getStreamStats", 0, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "streamId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "startTime", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "endTime", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEInt(), "limit", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SendEventToStream__String_String_String(), theEcorePackage.getEString(), "sendEventToStream", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "streamId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "event", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__TrucateStream__String_String(), theEcorePackage.getEString(), "trucateStream", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "streamId", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetStreamProperties__String_String_String(), theEcorePackage.getEString(), "setStreamProperties", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "streamId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "propsFile", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__RestartApp__String_String_String(), theEcorePackage.getEString(), "restartApp", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "progTypes", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__CreateApp__String_String_String_String_String(), theEcorePackage.getEString(), "createApp", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "artifactName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "artifactVersion", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "scope", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__CreateAppWithConfig__String_String_String_String_String_String(), theEcorePackage.getEString(), "createAppWithConfig", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appId", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "artifactName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "artifactVersion", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "scope", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "appConfig", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetDatasetProperties__String_String_String(), theEcorePackage.getEString(), "setDatasetProperties", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "datasetName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "datasetProperties", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getCdapApi__SetStreamTTL__String_String_int(), theEcorePackage.getEString(), "setStreamTTL", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "namespace", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "streamName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEInt(), "ttlSeconds", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(cdapConfigurationEClass, CdapConfiguration.class, "CdapConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapConfiguration_Value(), theEcorePackage.getEString(), "value", null, 0, 1, CdapConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapConfiguration_Source(), theEcorePackage.getEString(), "source", null, 0, 1, CdapConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapNamespaceEClass, CdapNamespace.class, "CdapNamespace", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapNamespace_Description(), theEcorePackage.getEString(), "description", null, 0, 1, CdapNamespace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapNamespace_Config(), this.getCdapKeyPair(), null, "config", null, 0, -1, CdapNamespace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapNamespace_Datasets(), this.getCdapDataset(), null, "datasets", null, 0, -1, CdapNamespace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapNamespace_Applications(), this.getCdapApplication(), null, "applications", null, 0, -1, CdapNamespace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapNamespace_Cluster(), this.getCdapCluster(), this.getCdapCluster_Namespaces(), "cluster", null, 0, 1, CdapNamespace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapKeyPairEClass, CdapKeyPair.class, "CdapKeyPair", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapKeyPair_Value(), theEcorePackage.getEString(), "value", null, 0, 1, CdapKeyPair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapEntityWithPreferencesEClass, CdapEntityWithPreferences.class, "CdapEntityWithPreferences", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCdapEntityWithPreferences_Preferences(), this.getCdapKeyPair(), null, "preferences", null, 0, -1, CdapEntityWithPreferences.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(cdapDatasetEClass, CdapDataset.class, "CdapDataset", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapDataset_Type(), theEcorePackage.getEString(), "type", null, 0, 1, CdapDataset.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapDataset_Properties(), this.getCdapKeyPair(), null, "properties", null, 0, -1, CdapDataset.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getCdapDataset_Schema(), this.getCdapDatasetSchema(), null, "schema", null, 0, 1, CdapDataset.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapDatasetSchemaEClass, CdapDatasetSchema.class, "CdapDatasetSchema", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapDatasetSchema_Type(), theEcorePackage.getEString(), "type", null, 0, 1, CdapDatasetSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapDatasetSchema_Fields(), this.getCdapDatasetSchemaField(), null, "fields", null, 0, -1, CdapDatasetSchema.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapDatasetSchemaFieldEClass, CdapDatasetSchemaField.class, "CdapDatasetSchemaField", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapDatasetSchemaField_Type(), theEcorePackage.getEString(), "type", null, 0, 1, CdapDatasetSchemaField.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapApplicationEClass, CdapApplication.class, "CdapApplication", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapApplication_Type(), theEcorePackage.getEString(), "type", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapApplication_Id(), theEcorePackage.getEString(), "id", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapApplication_Version(), theEcorePackage.getEString(), "version", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapApplication_Description(), theEcorePackage.getEString(), "description", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCdapApplication_Artifact(), this.getCdapArtifact(), null, "artifact", null, 0, 1, CdapApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cdapArtifactEClass, CdapArtifact.class, "CdapArtifact", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCdapArtifact_Version(), theEcorePackage.getEString(), "version", null, 0, 1, CdapArtifact.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCdapArtifact_Scope(), theEcorePackage.getEString(), "scope", null, 0, 1, CdapArtifact.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //CdapPackageImpl diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/util/CdapAdapterFactory.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/util/CdapAdapterFactory.java new file mode 100644 index 0000000..9368636 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/util/CdapAdapterFactory.java @@ -0,0 +1,359 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.util; + +import org.openecomp.ncomp.cdap.*; + +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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.cdap.CdapPackage + * @generated + */ +public class CdapAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static CdapPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public CdapAdapterFactory() { + if (modelPackage == null) { + modelPackage = CdapPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @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 createXXX methods. + * + * + * @generated + */ + protected CdapSwitch modelSwitch = + new CdapSwitch() { + @Override + public Adapter caseCdapAdaptor(CdapAdaptor object) { + return createCdapAdaptorAdapter(); + } + @Override + public Adapter caseCdapCluster(CdapCluster object) { + return createCdapClusterAdapter(); + } + @Override + public Adapter caseCdapApi(CdapApi object) { + return createCdapApiAdapter(); + } + @Override + public Adapter caseCdapConfiguration(CdapConfiguration object) { + return createCdapConfigurationAdapter(); + } + @Override + public Adapter caseCdapNamespace(CdapNamespace object) { + return createCdapNamespaceAdapter(); + } + @Override + public Adapter caseCdapKeyPair(CdapKeyPair object) { + return createCdapKeyPairAdapter(); + } + @Override + public Adapter caseCdapEntityWithPreferences(CdapEntityWithPreferences object) { + return createCdapEntityWithPreferencesAdapter(); + } + @Override + public Adapter caseCdapDataset(CdapDataset object) { + return createCdapDatasetAdapter(); + } + @Override + public Adapter caseCdapDatasetSchema(CdapDatasetSchema object) { + return createCdapDatasetSchemaAdapter(); + } + @Override + public Adapter caseCdapDatasetSchemaField(CdapDatasetSchemaField object) { + return createCdapDatasetSchemaFieldAdapter(); + } + @Override + public Adapter caseCdapApplication(CdapApplication object) { + return createCdapApplicationAdapter(); + } + @Override + public Adapter caseCdapArtifact(CdapArtifact object) { + return createCdapArtifactAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapAdaptor Adaptor}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapAdaptor + * @generated + */ + public Adapter createCdapAdaptorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapCluster Cluster}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapCluster + * @generated + */ + public Adapter createCdapClusterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapApi Api}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapApi + * @generated + */ + public Adapter createCdapApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapConfiguration Configuration}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapConfiguration + * @generated + */ + public Adapter createCdapConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapNamespace Namespace}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapNamespace + * @generated + */ + public Adapter createCdapNamespaceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapKeyPair Key Pair}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapKeyPair + * @generated + */ + public Adapter createCdapKeyPairAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapEntityWithPreferences Entity With Preferences}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapEntityWithPreferences + * @generated + */ + public Adapter createCdapEntityWithPreferencesAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapDataset Dataset}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapDataset + * @generated + */ + public Adapter createCdapDatasetAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapDatasetSchema Dataset Schema}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapDatasetSchema + * @generated + */ + public Adapter createCdapDatasetSchemaAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapDatasetSchemaField Dataset Schema Field}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapDatasetSchemaField + * @generated + */ + public Adapter createCdapDatasetSchemaFieldAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapApplication Application}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapApplication + * @generated + */ + public Adapter createCdapApplicationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.cdap.CdapArtifact Artifact}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.cdap.CdapArtifact + * @generated + */ + public Adapter createCdapArtifactAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * 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. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //CdapAdapterFactory diff --git a/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/util/CdapSwitch.java b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/util/CdapSwitch.java new file mode 100644 index 0000000..19fd0ab --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore-gen/org/openecomp/ncomp/cdap/util/CdapSwitch.java @@ -0,0 +1,390 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.cdap.util; + +import org.openecomp.ncomp.cdap.*; + +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; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX 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. + * + * @see org.openecomp.ncomp.cdap.CdapPackage + * @generated + */ +public class CdapSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static CdapPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public CdapSwitch() { + if (modelPackage == null) { + modelPackage = CdapPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @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 caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case CdapPackage.CDAP_ADAPTOR: { + CdapAdaptor cdapAdaptor = (CdapAdaptor)theEObject; + T result = caseCdapAdaptor(cdapAdaptor); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_CLUSTER: { + CdapCluster cdapCluster = (CdapCluster)theEObject; + T result = caseCdapCluster(cdapCluster); + if (result == null) result = caseNamedEntity(cdapCluster); + if (result == null) result = caseCdapApi(cdapCluster); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_API: { + CdapApi cdapApi = (CdapApi)theEObject; + T result = caseCdapApi(cdapApi); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_CONFIGURATION: { + CdapConfiguration cdapConfiguration = (CdapConfiguration)theEObject; + T result = caseCdapConfiguration(cdapConfiguration); + if (result == null) result = caseNamedEntity(cdapConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_NAMESPACE: { + CdapNamespace cdapNamespace = (CdapNamespace)theEObject; + T result = caseCdapNamespace(cdapNamespace); + if (result == null) result = caseNamedEntity(cdapNamespace); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_KEY_PAIR: { + CdapKeyPair cdapKeyPair = (CdapKeyPair)theEObject; + T result = caseCdapKeyPair(cdapKeyPair); + if (result == null) result = caseNamedEntity(cdapKeyPair); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_ENTITY_WITH_PREFERENCES: { + CdapEntityWithPreferences cdapEntityWithPreferences = (CdapEntityWithPreferences)theEObject; + T result = caseCdapEntityWithPreferences(cdapEntityWithPreferences); + if (result == null) result = caseNamedEntity(cdapEntityWithPreferences); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_DATASET: { + CdapDataset cdapDataset = (CdapDataset)theEObject; + T result = caseCdapDataset(cdapDataset); + if (result == null) result = caseNamedEntity(cdapDataset); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_DATASET_SCHEMA: { + CdapDatasetSchema cdapDatasetSchema = (CdapDatasetSchema)theEObject; + T result = caseCdapDatasetSchema(cdapDatasetSchema); + if (result == null) result = caseNamedEntity(cdapDatasetSchema); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_DATASET_SCHEMA_FIELD: { + CdapDatasetSchemaField cdapDatasetSchemaField = (CdapDatasetSchemaField)theEObject; + T result = caseCdapDatasetSchemaField(cdapDatasetSchemaField); + if (result == null) result = caseNamedEntity(cdapDatasetSchemaField); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_APPLICATION: { + CdapApplication cdapApplication = (CdapApplication)theEObject; + T result = caseCdapApplication(cdapApplication); + if (result == null) result = caseNamedEntity(cdapApplication); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CdapPackage.CDAP_ARTIFACT: { + CdapArtifact cdapArtifact = (CdapArtifact)theEObject; + T result = caseCdapArtifact(cdapArtifact); + if (result == null) result = caseNamedEntity(cdapArtifact); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Adaptor'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Adaptor'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapAdaptor(CdapAdaptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Cluster'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cluster'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapCluster(CdapCluster object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Api'. + * @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 'Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapConfiguration(CdapConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Namespace'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Namespace'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapNamespace(CdapNamespace object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Key Pair'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Key Pair'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapKeyPair(CdapKeyPair object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Entity With Preferences'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Entity With Preferences'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapEntityWithPreferences(CdapEntityWithPreferences object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dataset'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dataset'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapDataset(CdapDataset object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dataset Schema'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dataset Schema'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapDatasetSchema(CdapDatasetSchema object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dataset Schema Field'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dataset Schema Field'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapDatasetSchemaField(CdapDatasetSchemaField object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Application'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Application'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapApplication(CdapApplication object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Artifact'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Artifact'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCdapArtifact(CdapArtifact object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @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 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //CdapSwitch diff --git a/ncomp-cdap-model/src/main/xcore/adaptor.xcore b/ncomp-cdap-model/src/main/xcore/adaptor.xcore new file mode 100644 index 0000000..541f275 --- /dev/null +++ b/ncomp-cdap-model/src/main/xcore/adaptor.xcore @@ -0,0 +1,171 @@ + +/*- + * ============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="/ncomp-cdap-model/src/main/xcore-gen") + + +package org.openecomp.ncomp.cdap + + +import org.openecomp.ncomp.core.NamedEntity + +class CdapAdaptor { +} + +class CdapCluster extends NamedEntity, CdapApi { + String baseUrl + long pollingFrequency = "300000" + boolean remote = "false" + contains unordered CdapConfiguration[] configurations + contains unordered CdapNamespace[] namespaces opposite cluster + op void poll() +} + +class CdapApi { + + op String createNamespace(String namespace) + + op String deleteNamespace(String namespace) + + op String deployApp(String namespace, String jarfile) + + op String loadArtifact(String namespace, String artifactName, String jarfile, String version) + + op String deleteArtifact(String namespace, String artifactName, String artifactVersion) + + op String startFlow(String namespace, String appName, String flowId, String extraArgs) + + op String startWorker(String namespace, String appName, String workerId, String extraArgs) + + op String startService(String namespace, String appName, String serviceId, String extraArgs) + + op String startApp(String namespace, String appName) + + op String stopApp(String namespace, String appName) + + op String deleteApp(String namespace, String appName) + + op String loadPreferencesApp(String namespace, String prefsFile, String appId) + + op String loadPreferencesFlow(String namespace, String prefsFile, String appId, String flowId) + + op String loadPreferencesNameSpace(String namespace, String prefsFile) + + op String setPreferencesApp(String namespace, String prefsString, String appId) + + op String setPreferencesFlow(String namespace, String prefsString, String appId, String flowId) + + op String setPreferencesWorker(String namespace, String prefsString, String appId, String workerId) + + op String setPreferencesService(String namespace, String prefsString, String appId, String serviceId) + + op String setPreferencesNameSpace(String namespace, String prefsString) + + op String setFlowRunTimeArgs(String namespace, String appId, String flowId, String args) + + op String setFlowletInstances(String namespace, String appId, String flowId, String flowletId, int nInstances) + + op String stopFlow(String namespace, String appId, String flowId) + + op String stopWorker(String namespace, String appId, String workerId) + + op String stopService(String namespace, String appId, String serviceId) + + op String truncateDataSet(String namespace, String datasetName) + + op String deleteDataset(String namespace, String datasetName) + + op String createStream(String namespace, String newStreamId) + + op String deleteStream(String namespace, String streamId) + + op String[] getStreamEvents(String namespace, String streamId, String startTime, String endTime, int limit) + + op String[] getStreamStats(String namespace, String streamId, String startTime, String endTime, int limit) + + op String sendEventToStream(String namespace, String streamId, String event) + + op String trucateStream(String namespace, String streamId) + + op String setStreamProperties(String namespace, String streamId, String propsFile) + + op String restartApp(String namespace, String appId, String progTypes) + + op String createApp(String namespace, String appId, String artifactName, String artifactVersion, String scope) + + op String createAppWithConfig(String namespace, String appId, String artifactName, String artifactVersion, String scope, + String appConfig) + + op String setDatasetProperties(String namespace, String datasetName, String datasetProperties) + + op String setStreamTTL(String namespace, String streamName, int ttlSeconds) + +} + +class CdapConfiguration extends NamedEntity { + String value + String source +} + +class CdapNamespace extends NamedEntity { + String description + contains unordered CdapKeyPair[] config + contains unordered CdapDataset[] datasets + contains unordered CdapApplication[] applications + refers CdapCluster cluster opposite namespaces +} + +class CdapKeyPair extends NamedEntity { + String value +} + +class CdapEntityWithPreferences extends NamedEntity { + contains unordered CdapKeyPair[] preferences +} + +class CdapDataset extends NamedEntity { + String ^type + contains unordered CdapKeyPair[] properties + contains CdapDatasetSchema schema +} + +class CdapDatasetSchema extends NamedEntity { + String ^type + contains CdapDatasetSchemaField[] fields +} + +class CdapDatasetSchemaField extends NamedEntity { + String ^type +} + + +class CdapApplication extends NamedEntity { + String ^type + String ^id + String version + String description + contains CdapArtifact artifact +} + +class CdapArtifact extends NamedEntity { + String version + String scope +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..a446c5e --- /dev/null +++ b/pom.xml @@ -0,0 +1,80 @@ + + 4.0.0 + + org.openecomp.ncomp.cdap + ncomp-cdap + pom + ncomp-cdap + + + UTF-8 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + ncomp-cdap-adaptor + ncomp-cdap-model + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + -- cgit 1.2.3-korg