From 0eb1beb6210c884672d8ddf3ea7842f807281527 Mon Sep 17 00:00:00 2001 From: Satyaki Mallick Date: Sat, 8 Sep 2018 13:47:06 +0530 Subject: 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 --- .../org/openecomp/sdc/be/model/Combination.java | 110 +++++++++++++++++++++ .../openecomp/sdc/be/ui/model/UiCombination.java | 46 +++++++++ 2 files changed, 156 insertions(+) create mode 100644 catalog-model/src/main/java/org/openecomp/sdc/be/model/Combination.java create mode 100644 catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java 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 componentInstances; + private List componentInstancesRelations; + private Map> componentInstancesInputs; + private Map> componentInstancesProperties; + private Map> 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 getComponentInstances() { + return componentInstances; + } + + public void setComponentInstances(List componentInstances) { + this.componentInstances = componentInstances; + } + + public List getComponentInstancesRelations() { + return componentInstancesRelations; + } + + public void setComponentInstancesRelations(List componentInstancesRelations) { + this.componentInstancesRelations = componentInstancesRelations; + } + + public Map> getComponentInstancesInputs() { + return componentInstancesInputs; + } + + public void setComponentInstancesInputs(Map> componentInstancesInputs) { + this.componentInstancesInputs = componentInstancesInputs; + } + + public Map> getComponentInstancesProperties() { + return componentInstancesProperties; + } + + public void setComponentInstancesProperties(Map> componentInstancesProperties) { + this.componentInstancesProperties = componentInstancesProperties; + } + + public Map> getComponentInstancesAttributes() { + return componentInstancesAttributes; + } + + public void setComponentInstancesAttributes(Map> 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; + } +} -- cgit 1.2.3-korg