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 org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component;
24 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network;
25 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
27 import java.util.ArrayList;
28 import java.util.HashMap;
29 import java.util.HashSet;
30 import java.util.List;
34 public class ExtractCompositionDataContext {
35 private List<Network> networks = new ArrayList<>();
36 private List<Component> components = new ArrayList<>();
37 private Map<String, Nic> nics = new HashMap<>();
38 private Set<String> handledServiceTemplates = new HashSet<>();
39 private Set<String> createdComponents = new HashSet<>();
41 public Set<String> getCreatedComponents() {
42 return createdComponents;
45 public void setCreatedComponents(Set<String> createdComponents) {
46 this.createdComponents = createdComponents;
49 public Set<String> getHandledServiceTemplates() {
50 return handledServiceTemplates;
53 public void setHandledServiceTemplates(Set<String> handledServiceTemplates) {
54 this.handledServiceTemplates = handledServiceTemplates;
57 public void addHandledServiceTemplates(String handledServiceTemplate) {
58 this.handledServiceTemplates.add(handledServiceTemplate);
61 public List<Network> getNetworks() {
65 public void setNetworks(List<Network> networks) {
66 this.networks = networks;
72 * @param network the network
74 public void addNetwork(Network network) {
75 if (network != null) {
76 networks.add(network);
83 * @param network the network
85 public void addNetworks(List<Network> network) {
86 if (networks != null) {
87 networks.addAll(network);
91 public List<Component> getComponents() {
95 public void setComponents(List<Component> components) {
96 this.components = components;
102 * @param component the component
104 public void addComponent(Component component) {
105 if (component != null) {
106 components.add(component);
113 * @param components the components
115 public void addComponents(List<Component> components) {
116 if (components != null) {
117 this.components.addAll(components);
121 public Map<String, Nic> getNics() {
125 public void setNics(Map<String, Nic> nics) {
129 public void addNic(String nicId, Nic nic) {
130 this.nics.put(nicId, nic);