push addional code
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / main / java / org / openecomp / sdc / vendorsoftwareproduct / types / 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;
22
23 import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Nic;
24
25 import java.util.ArrayList;
26 import java.util.HashMap;
27 import java.util.HashSet;
28 import java.util.List;
29 import java.util.Map;
30 import java.util.Set;
31
32 /**
33  * The type Extract composition data context.
34  */
35 public class ExtractCompositionDataContext {
36   private List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network> networks =
37       new ArrayList<>();
38   private List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component> components =
39       new ArrayList<>();
40   private Map<String, Nic> nics = new HashMap<>();
41   private Set<String> handledServiceTemplates = new HashSet<>();
42   private Set<String> createdComponents = new HashSet<>();
43
44   /**
45    * Gets created components.
46    *
47    * @return the created components
48    */
49   public Set<String> getCreatedComponents() {
50     return createdComponents;
51   }
52
53   /**
54    * Sets created components.
55    *
56    * @param createdComponents the created components
57    */
58   public void setCreatedComponents(Set<String> createdComponents) {
59     this.createdComponents = createdComponents;
60   }
61
62   /**
63    * Gets handled service templates.
64    *
65    * @return the handled service templates
66    */
67   public Set<String> getHandledServiceTemplates() {
68     return handledServiceTemplates;
69   }
70
71   /**
72    * Sets handled service templates.
73    *
74    * @param handledServiceTemplates the handled service templates
75    */
76   public void setHandledServiceTemplates(Set<String> handledServiceTemplates) {
77     this.handledServiceTemplates = handledServiceTemplates;
78   }
79
80   /**
81    * Add handled service templates.
82    *
83    * @param handledServiceTemplate the handled service template
84    */
85   public void addHandledServiceTemplates(String handledServiceTemplate) {
86     this.handledServiceTemplates.add(handledServiceTemplate);
87   }
88
89   /**
90    * Gets networks.
91    *
92    * @return the networks
93    */
94   public List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network> getNetworks() {
95     return networks;
96   }
97
98   /**
99    * Sets networks.
100    *
101    * @param networks the networks
102    */
103   public void setNetworks(
104       List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network> networks) {
105     this.networks = networks;
106   }
107
108   /**
109    * Add network.
110    *
111    * @param network the network
112    */
113   public void addNetwork(
114       org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network network) {
115     if (network != null) {
116       networks.add(network);
117     }
118   }
119
120   /**
121    * Add networks.
122    *
123    * @param network the network
124    */
125   public void addNetworks(
126       List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Network> network) {
127     if (networks != null) {
128       networks.addAll(network);
129     }
130   }
131
132   /**
133    * Gets components.
134    *
135    * @return the components
136    */
137   public List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component> getComponents() {
138     return components;
139   }
140
141   /**
142    * Sets components.
143    *
144    * @param components the components
145    */
146   public void setComponents(
147       List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component> components) {
148     this.components = components;
149   }
150
151   /**
152    * Add component.
153    *
154    * @param component the component
155    */
156   public void addComponent(
157       org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component component) {
158     if (component != null) {
159       components.add(component);
160     }
161   }
162
163   /**
164    * Add components.
165    *
166    * @param components the components
167    */
168   public void addComponents(
169       List<org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component> components) {
170     if (components != null) {
171       this.components.addAll(components);
172     }
173   }
174
175   /**
176    * Gets nics.
177    *
178    * @return the nics
179    */
180   public Map<String, Nic> getNics() {
181     return nics;
182   }
183
184   /**
185    * Sets nics.
186    *
187    * @param nics the nics
188    */
189   public void setNics(Map<String, Nic> nics) {
190     this.nics = nics;
191   }
192
193   /**
194    * Add nic.
195    *
196    * @param nicId the nic id
197    * @param nic   the nic
198    */
199   public void addNic(String nicId, Nic nic) {
200     this.nics.put(nicId, nic);
201   }
202
203
204 }