Title This is Component combination take 2 45/65345/5
authorSatyaki Mallick <developer.satyaki@gmail.com>
Sat, 8 Sep 2018 08:17:06 +0000 (13:47 +0530)
committerMichael Lando <ml636r@att.com>
Tue, 18 Sep 2018 13:06:28 +0000 (16:06 +0300)
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>
catalog-model/src/main/java/org/openecomp/sdc/be/model/Combination.java [new file with mode: 0644]
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java [new file with mode: 0644]

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 (file)
index 0000000..b38e2ff
--- /dev/null
@@ -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 (file)
index 0000000..29fee14
--- /dev/null
@@ -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;
+    }
+}