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.composition;
23 import java.util.ArrayList;
24 import java.util.HashMap;
25 import java.util.HashSet;
26 import java.util.List;
30 import lombok.NoArgsConstructor;
34 public class ExtractCompositionDataContext {
36 private List<Network> networks = new ArrayList<>();
37 private List<Component> components = new ArrayList<>();
38 private Map<String, Nic> nics = new HashMap<>();
39 private Map<String, Image> images = new HashMap<>();
40 private Map<String, ComputeData> computes = new HashMap<>();
41 private Set<String> handledServiceTemplates = new HashSet<>();
42 private Set<String> createdComponents = new HashSet<>();
44 public void addHandledServiceTemplates(String handledServiceTemplate) {
45 this.handledServiceTemplates.add(handledServiceTemplate);
51 * @param network the network
53 public void addNetwork(Network network) {
54 if (network != null) {
55 networks.add(network);
62 * @param network the network
64 public void addNetworks(List<Network> network) {
65 if (networks != null) {
66 networks.addAll(network);
73 * @param component the component
75 public void addComponent(Component component) {
76 if (component != null) {
77 components.add(component);
84 * @param components the components
86 public void addComponents(List<Component> components) {
87 if (components != null) {
88 this.components.addAll(components);
92 public void addNic(String nicId, Nic nic) {
93 this.nics.put(nicId, nic);
96 public void addImage(String imageId, Image image) {
97 this.images.put(imageId, image);
100 public void addCompute(String computeId, ComputeData computedata) {
101 this.computes.put(computeId, computedata);