aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
authorSatyaki Mallick <developer.satyaki@gmail.com>2018-09-08 13:47:06 +0530
committerMichael Lando <ml636r@att.com>2018-09-18 16:06:28 +0300
commit0eb1beb6210c884672d8ddf3ea7842f807281527 (patch)
tree6c23a6e640731598026c6aeeb195132110d3fce6 /catalog-model/src
parent261668459b34b1bd6dd49c3ad29d7d2e0672f86a (diff)
Title This is Component combination take 2
Added Combination and Combination UI Model classes. The UI class take inputs from the UI and sest in to Combination Model class Issue-ID: SDC-1460 Change-Id: Ic7704f692b36d6d4f2c26aa358a2646207b0c6d7 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/Combination.java110
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java46
2 files changed, 156 insertions, 0 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Combination.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Combination.java
new file mode 100644
index 0000000000..b38e2ff04a
--- /dev/null
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Combination.java
@@ -0,0 +1,110 @@
+/*
+ *
+ * Copyright (C) 2018 Huawei 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.
+ *
+ *
+ */
+
+package org.openecomp.sdc.be.model;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import java.util.List;
+import java.util.Map;
+import org.openecomp.sdc.be.ui.model.UiCombination;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Combination {
+
+ private String uniqueId;
+ private String name;
+ private String description;
+ private List<ComponentInstance> componentInstances;
+ private List<RequirementCapabilityRelDef> componentInstancesRelations;
+ private Map<String, List<ComponentInstanceInput>> componentInstancesInputs;
+ private Map<String, List<ComponentInstanceProperty>> componentInstancesProperties;
+ private Map<String, List<ComponentInstanceProperty>> componentInstancesAttributes;
+
+ public Combination() {
+ }
+ // To form the combination object with the data received from UI
+ public Combination(UiCombination UICombination) {
+ name = UICombination.getName();
+ description = UICombination.getDescription();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDesc() {
+ return description;
+ }
+
+ public void setDesc(String description) {
+ this.description = description;
+ }
+
+ public String getUniqueId() {
+ return uniqueId;
+ }
+
+ public void setUniqueId(String uniqueId) {
+ this.uniqueId = uniqueId;
+ }
+
+ public List<ComponentInstance> getComponentInstances() {
+ return componentInstances;
+ }
+
+ public void setComponentInstances(List<ComponentInstance> componentInstances) {
+ this.componentInstances = componentInstances;
+ }
+
+ public List<RequirementCapabilityRelDef> getComponentInstancesRelations() {
+ return componentInstancesRelations;
+ }
+
+ public void setComponentInstancesRelations(List<RequirementCapabilityRelDef> componentInstancesRelations) {
+ this.componentInstancesRelations = componentInstancesRelations;
+ }
+
+ public Map<String, List<ComponentInstanceInput>> getComponentInstancesInputs() {
+ return componentInstancesInputs;
+ }
+
+ public void setComponentInstancesInputs(Map<String, List<ComponentInstanceInput>> componentInstancesInputs) {
+ this.componentInstancesInputs = componentInstancesInputs;
+ }
+
+ public Map<String, List<ComponentInstanceProperty>> getComponentInstancesProperties() {
+ return componentInstancesProperties;
+ }
+
+ public void setComponentInstancesProperties(Map<String, List<ComponentInstanceProperty>> componentInstancesProperties) {
+ this.componentInstancesProperties = componentInstancesProperties;
+ }
+
+ public Map<String, List<ComponentInstanceProperty>> getComponentInstancesAttributes() {
+ return componentInstancesAttributes;
+ }
+
+ public void setComponentInstancesAttributes(Map<String, List<ComponentInstanceProperty>> componentInstancesAttributes) {
+ this.componentInstancesAttributes = componentInstancesAttributes;
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java
new file mode 100644
index 0000000000..29fee14e97
--- /dev/null
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2018 Huawei 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.
+ *
+ *
+ */
+
+package org.openecomp.sdc.be.ui.model;
+
+public class UiCombination {
+
+ String name;
+ String description;
+
+ public UiCombination(String name, String description) {
+ this.name = name;
+ this.description = description;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}