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 public class ExtractCompositionDataContext {
31 private List<Network> networks = new ArrayList<>();
32 private List<Component> components = new ArrayList<>();
33 private Map<String, Nic> nics = new HashMap<>();
34 private Map<String, Image> images = new HashMap<>();
35 private Map<String, ComputeData> computes = new HashMap<>();
36 private Set<String> handledServiceTemplates = new HashSet<>();
37 private Set<String> createdComponents = new HashSet<>();
39 public Set<String> getCreatedComponents() {
40 return createdComponents;
43 public void setCreatedComponents(Set<String> createdComponents) {
44 this.createdComponents = createdComponents;
47 public Set<String> getHandledServiceTemplates() {
48 return handledServiceTemplates;
51 public void setHandledServiceTemplates(Set<String> handledServiceTemplates) {
52 this.handledServiceTemplates = handledServiceTemplates;
55 public void addHandledServiceTemplates(String handledServiceTemplate) {
56 this.handledServiceTemplates.add(handledServiceTemplate);
59 public List<Network> getNetworks() {
63 public void setNetworks(List<Network> networks) {
64 this.networks = networks;
70 * @param network the network
72 public void addNetwork(Network network) {
73 if (network != null) {
74 networks.add(network);
81 * @param network the network
83 public void addNetworks(List<Network> network) {
84 if (networks != null) {
85 networks.addAll(network);
89 public List<Component> getComponents() {
93 public void setComponents(List<Component> components) {
94 this.components = components;
100 * @param component the component
102 public void addComponent(Component component) {
103 if (component != null) {
104 components.add(component);
111 * @param components the components
113 public void addComponents(List<Component> components) {
114 if (components != null) {
115 this.components.addAll(components);
119 public Map<String, Nic> getNics() {
123 public void setNics(Map<String, Nic> nics) {
127 public void addNic(String nicId, Nic nic) {
128 this.nics.put(nicId, nic);
131 public Map<String, Image> getImages() {
135 public void setImages(Map<String, Image> images) {
136 this.images = images;
139 public void addImage(String imageId, Image image) {
140 this.images.put(imageId, image);
144 public Map<String, ComputeData> getComputes() {
148 public void setComputes(
149 Map<String, ComputeData> computes) {
150 this.computes = computes;
153 public void addCompute(String computeId, ComputeData computedata ){
154 this.computes.put(computeId,computedata);