re base code
[sdc.git] / openecomp-be / lib / openecomp-sdc-vendor-software-product-lib / openecomp-sdc-vendor-software-product-api / src / main / java / org / openecomp / sdc / vendorsoftwareproduct / types / composition / ExtractCompositionDataContext.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
22
23 import java.util.*;
24
25 public class ExtractCompositionDataContext {
26   private List<Network> networks = new ArrayList<>();
27   private List<Component> components = new ArrayList<>();
28   private Map<String, Nic> nics = new HashMap<>();
29   private Map<String, Image> images = new HashMap<>();
30   private Map<String, ComputeData> computes = new HashMap<>();
31   private Set<String> handledServiceTemplates = new HashSet<>();
32   private Set<String> createdComponents = new HashSet<>();
33
34   public Set<String> getCreatedComponents() {
35     return createdComponents;
36   }
37
38   public void setCreatedComponents(Set<String> createdComponents) {
39     this.createdComponents = createdComponents;
40   }
41
42   public Set<String> getHandledServiceTemplates() {
43     return handledServiceTemplates;
44   }
45
46   public void setHandledServiceTemplates(Set<String> handledServiceTemplates) {
47     this.handledServiceTemplates = handledServiceTemplates;
48   }
49
50   public void addHandledServiceTemplates(String handledServiceTemplate) {
51     this.handledServiceTemplates.add(handledServiceTemplate);
52   }
53
54   public List<Network> getNetworks() {
55     return networks;
56   }
57
58   public void setNetworks(List<Network> networks) {
59     this.networks = networks;
60   }
61
62   /**
63    * Add network.
64    *
65    * @param network the network
66    */
67   public void addNetwork(Network network) {
68     if (network != null) {
69       networks.add(network);
70     }
71   }
72
73   /**
74    * Add networks.
75    *
76    * @param network the network
77    */
78   public void addNetworks(List<Network> network) {
79     if (networks != null) {
80       networks.addAll(network);
81     }
82   }
83
84   public List<Component> getComponents() {
85     return components;
86   }
87
88   public void setComponents(List<Component> components) {
89     this.components = components;
90   }
91
92   /**
93    * Add component.
94    *
95    * @param component the component
96    */
97   public void addComponent(Component component) {
98     if (component != null) {
99       components.add(component);
100     }
101   }
102
103   /**
104    * Add components.
105    *
106    * @param components the components
107    */
108   public void addComponents(List<Component> components) {
109     if (components != null) {
110       this.components.addAll(components);
111     }
112   }
113
114   public Map<String, Nic> getNics() {
115     return nics;
116   }
117
118   public void setNics(Map<String, Nic> nics) {
119     this.nics = nics;
120   }
121
122   public void addNic(String nicId, Nic nic) {
123     this.nics.put(nicId, nic);
124   }
125
126   public Map<String, Image> getImages() {
127     return images;
128   }
129
130   public void setImages(Map<String, Image> images) {
131     this.images = images;
132   }
133
134   public void addImage(String imageId, Image image) {
135     this.images.put(imageId, image);
136   }
137
138
139   public Map<String, ComputeData> getComputes() {
140     return computes;
141   }
142
143   public void setComputes(
144       Map<String, ComputeData> computes) {
145     this.computes = computes;
146   }
147
148   public void addCompute(String computeId, ComputeData computedata ){
149     this.computes.put(computeId,computedata);
150   }
151 }