2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.vendorsoftwareproduct.types;
23 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
25 import java.util.ArrayList;
26 import java.util.HashMap;
27 import java.util.HashSet;
28 import java.util.List;
33 * The type Extract composition data context.
35 public class ExtractCompositionDataContext {
36 private List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network> networks =
38 private List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component> components =
40 private Map<String, Nic> nics = new HashMap<>();
41 private Set<String> handledServiceTemplates = new HashSet<>();
42 private Set<String> createdComponents = new HashSet<>();
45 * Gets created components.
47 * @return the created components
49 public Set<String> getCreatedComponents() {
50 return createdComponents;
54 * Sets created components.
56 * @param createdComponents the created components
58 public void setCreatedComponents(Set<String> createdComponents) {
59 this.createdComponents = createdComponents;
63 * Gets handled service templates.
65 * @return the handled service templates
67 public Set<String> getHandledServiceTemplates() {
68 return handledServiceTemplates;
72 * Sets handled service templates.
74 * @param handledServiceTemplates the handled service templates
76 public void setHandledServiceTemplates(Set<String> handledServiceTemplates) {
77 this.handledServiceTemplates = handledServiceTemplates;
81 * Add handled service templates.
83 * @param handledServiceTemplate the handled service template
85 public void addHandledServiceTemplates(String handledServiceTemplate) {
86 this.handledServiceTemplates.add(handledServiceTemplate);
92 * @return the networks
94 public List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network> getNetworks() {
101 * @param networks the networks
103 public void setNetworks(
104 List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network> networks) {
105 this.networks = networks;
111 * @param network the network
113 public void addNetwork(
114 org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network network) {
115 if (network != null) {
116 networks.add(network);
123 * @param network the network
125 public void addNetworks(
126 List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network> network) {
127 if (networks != null) {
128 networks.addAll(network);
135 * @return the components
137 public List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component> getComponents() {
144 * @param components the components
146 public void setComponents(
147 List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component> components) {
148 this.components = components;
154 * @param component the component
156 public void addComponent(
157 org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component component) {
158 if (component != null) {
159 components.add(component);
166 * @param components the components
168 public void addComponents(
169 List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component> components) {
170 if (components != null) {
171 this.components.addAll(components);
180 public Map<String, Nic> getNics() {
187 * @param nics the nics
189 public void setNics(Map<String, Nic> nics) {
196 * @param nicId the nic id
199 public void addNic(String nicId, Nic nic) {
200 this.nics.put(nicId, nic);