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.onap.so.bpmn.servicedecomposition.tasks;
23 import java.util.ArrayList;
24 import java.util.Arrays;
25 import java.util.List;
27 import java.util.Optional;
29 import org.modelmapper.ModelMapper;
30 import org.modelmapper.convention.MatchingStrategies;
31 import org.onap.so.bpmn.servicedecomposition.bbobjects.AllottedResource;
32 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
33 import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection;
34 import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
35 import org.onap.so.bpmn.servicedecomposition.bbobjects.CtagAssignment;
36 import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
37 import org.onap.so.bpmn.servicedecomposition.bbobjects.Entitlement;
38 import org.onap.so.bpmn.servicedecomposition.bbobjects.Evc;
39 import org.onap.so.bpmn.servicedecomposition.bbobjects.ForwarderEvc;
40 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
41 import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network;
42 import org.onap.so.bpmn.servicedecomposition.bbobjects.LagInterface;
43 import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness;
44 import org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy;
45 import org.onap.so.bpmn.servicedecomposition.bbobjects.OwningEntity;
46 import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
47 import org.onap.so.bpmn.servicedecomposition.bbobjects.Project;
48 import org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference;
49 import org.onap.so.bpmn.servicedecomposition.bbobjects.SegmentationAssignment;
50 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
51 import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription;
52 import org.onap.so.bpmn.servicedecomposition.bbobjects.Subnet;
53 import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
54 import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
55 import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
56 import org.onap.so.bpmn.servicedecomposition.generalobjects.License;
57 import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext;
58 import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
59 import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters;
60 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoCollection;
61 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoConfiguration;
62 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf;
63 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoInstanceGroup;
64 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoNetwork;
65 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance;
66 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule;
67 import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
68 import org.onap.so.db.catalog.beans.CollectionResource;
69 import org.onap.so.db.catalog.beans.CollectionResourceCustomization;
70 import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
71 import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
72 import org.onap.so.db.catalog.beans.InstanceGroup;
73 import org.onap.so.db.catalog.beans.InstanceGroupType;
74 import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
75 import org.onap.so.db.catalog.beans.OrchestrationStatus;
76 import org.onap.so.db.catalog.beans.Service;
77 import org.onap.so.db.catalog.beans.VfModuleCustomization;
78 import org.onap.so.db.catalog.beans.VnfResourceCustomization;
79 import org.onap.so.logger.MsoLogger;
80 import org.onap.so.serviceinstancebeans.CloudConfiguration;
81 import org.onap.so.serviceinstancebeans.RequestDetails;
82 import org.springframework.stereotype.Component;
84 @Component("BBInputSetupMapperLayer")
85 public class BBInputSetupMapperLayer {
87 private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
88 BBInputSetupMapperLayer.class);
90 private ModelMapper modelMapper = new ModelMapper();
92 public Customer mapAAICustomer(org.onap.aai.domain.yang.Customer customerAAI) {
93 return modelMapper.map(customerAAI, Customer.class);
96 public ServiceSubscription mapAAIServiceSubscription(
97 org.onap.aai.domain.yang.ServiceSubscription serviceSubscriptionAAI) {
98 return modelMapper.map(serviceSubscriptionAAI, ServiceSubscription.class);
101 protected Project mapAAIProject(org.onap.aai.domain.yang.Project aaiProject) {
102 return modelMapper.map(aaiProject, Project.class);
105 protected OwningEntity mapAAIOwningEntity(org.onap.aai.domain.yang.OwningEntity aaiOwningEntity) {
106 return modelMapper.map(aaiOwningEntity, OwningEntity.class);
109 protected Platform mapAAIPlatform(org.onap.aai.domain.yang.Platform aaiPlatform) {
110 return modelMapper.map(aaiPlatform, Platform.class);
113 protected LineOfBusiness mapAAILineOfBusiness(org.onap.aai.domain.yang.LineOfBusiness aaiLineOfBusiness) {
114 return modelMapper.map(aaiLineOfBusiness, LineOfBusiness.class);
117 protected SegmentationAssignment mapAAISegmentationAssignment(
118 org.onap.aai.domain.yang.SegmentationAssignment aaiSegmentationAssignment) {
119 return modelMapper.map(aaiSegmentationAssignment, SegmentationAssignment.class);
122 protected CtagAssignment mapAAICtagAssignment(org.onap.aai.domain.yang.CtagAssignment aaiCtagAssignment) {
123 return modelMapper.map(aaiCtagAssignment, CtagAssignment.class);
126 protected Subnet mapAAISubnet(org.onap.aai.domain.yang.Subnet aaiSubnet) {
127 return modelMapper.map(aaiSubnet, Subnet.class);
130 protected License mapAAILicense(org.onap.aai.domain.yang.License aaiLicense) {
131 return modelMapper.map(aaiLicense, License.class);
134 protected Entitlement mapAAIEntitlement(org.onap.aai.domain.yang.Entitlement aaiEntitlement) {
135 return modelMapper.map(aaiEntitlement, Entitlement.class);
138 protected LagInterface mapAAILagInterface(org.onap.aai.domain.yang.LagInterface aaiLagInterface) {
139 return modelMapper.map(aaiLagInterface, LagInterface.class);
142 protected VfModule mapAAIVfModule(org.onap.aai.domain.yang.VfModule aaiVfModule) {
143 VfModule vfModule = modelMapper.map(aaiVfModule, VfModule.class);
144 vfModule.setOrchestrationStatus(this.mapOrchestrationStatusFromAAI(aaiVfModule.getOrchestrationStatus()));
148 public NetworkPolicy mapAAINetworkPolicy(org.onap.aai.domain.yang.NetworkPolicy aaiNetworkPolicy) {
149 return modelMapper.map(aaiNetworkPolicy, NetworkPolicy.class);
152 protected VolumeGroup mapAAIVolumeGroup(org.onap.aai.domain.yang.VolumeGroup aaiVolumeGroup) {
153 VolumeGroup volumeGroup = modelMapper.map(aaiVolumeGroup, VolumeGroup.class);
154 volumeGroup.setOrchestrationStatus(this.mapOrchestrationStatusFromAAI(aaiVolumeGroup.getOrchestrationStatus()));
158 protected void setPlatformAndLOBIntoServiceInstance(Platform platformMSO, LineOfBusiness lineOfBusinessMSO,
159 ServiceInstance serviceInstance, Map<ResourceKey, String> resourcesToBeOrchestrated) {
160 String vnfId = resourcesToBeOrchestrated.get(ResourceKey.GENERIC_VNF_ID);
161 if (vnfId != null && !serviceInstance.getVnfs().isEmpty()) {
162 for (GenericVnf vnf : serviceInstance.getVnfs()) {
163 if (vnf.getVnfId().equalsIgnoreCase(vnfId)) {
164 vnf.setPlatform(platformMSO);
165 vnf.setLineOfBusiness(lineOfBusinessMSO);
172 public ModelInfoServiceInstance mapCatalogServiceIntoServiceInstance(Service service) {
173 return modelMapper.map(service, ModelInfoServiceInstance.class);
176 protected ModelInfoInstanceGroup mapCatalogInstanceGroupToInstanceGroup(CollectionResourceCustomization collectionCust, InstanceGroup instanceGroup) {
177 ModelInfoInstanceGroup modelInfoInstanceGroup = modelMapper.map(instanceGroup, ModelInfoInstanceGroup.class);
178 if(instanceGroup.getType().equals(InstanceGroupType.L3_NETWORK))
179 modelInfoInstanceGroup.setType(ModelInfoInstanceGroup.TYPE_L3_NETWORK);
181 modelInfoInstanceGroup.setType(ModelInfoInstanceGroup.TYPE_VNFC);
182 if(collectionCust != null) {
183 List<CollectionResourceInstanceGroupCustomization> instanceGroupCustList = instanceGroup.getCollectionInstanceGroupCustomizations();
184 for(CollectionResourceInstanceGroupCustomization collectionInsatnceGroupCust : instanceGroupCustList) {
185 if(collectionInsatnceGroupCust.getModelCustomizationUUID().equalsIgnoreCase(collectionCust.getModelCustomizationUUID())) {
186 modelInfoInstanceGroup.setFunction(collectionInsatnceGroupCust.getFunction());
187 modelInfoInstanceGroup.setDescription(collectionInsatnceGroupCust.getDescription());
192 return modelInfoInstanceGroup;
195 protected ModelInfoCollection mapCatalogCollectionToCollection(CollectionResourceCustomization collectionCust,
196 CollectionResource collectionResource) {
197 ModelInfoCollection modelInfoCollection = new ModelInfoCollection();
198 modelInfoCollection.setCollectionFunction(collectionCust.getFunction());
199 modelInfoCollection.setCollectionRole(collectionCust.getRole());
200 modelInfoCollection.setCollectionType(collectionCust.getType());
201 modelInfoCollection.setDescription(collectionResource.getDescription());
202 modelInfoCollection.setModelInvariantUUID(collectionResource.getModelInvariantUUID());
203 modelInfoCollection.setModelVersionId(collectionResource.getModelUUID());
204 modelInfoCollection.setModelCustomizationUUID(collectionCust.getModelCustomizationUUID());
205 return modelInfoCollection;
208 public ServiceInstance mapAAIServiceInstanceIntoServiceInstance(
209 org.onap.aai.domain.yang.ServiceInstance aaiServiceInstance) {
210 ServiceInstance serviceInstance = modelMapper.map(aaiServiceInstance, ServiceInstance.class);
211 if (aaiServiceInstance.getAllottedResources() != null) {
212 for (org.onap.aai.domain.yang.AllottedResource allottedResource : aaiServiceInstance.getAllottedResources()
213 .getAllottedResource()) {
214 serviceInstance.getAllottedResources().add(mapAAIAllottedResource(allottedResource));
217 serviceInstance.setOrchestrationStatus(
218 this.mapOrchestrationStatusFromAAI(aaiServiceInstance.getOrchestrationStatus()));
219 return serviceInstance;
222 protected AllottedResource mapAAIAllottedResource(org.onap.aai.domain.yang.AllottedResource aaiAllottedResource) {
223 AllottedResource allottedResource = modelMapper.map(aaiAllottedResource, AllottedResource.class);
224 return allottedResource;
227 protected L3Network mapAAIL3Network(org.onap.aai.domain.yang.L3Network aaiL3Network) {
228 L3Network network = modelMapper.map(aaiL3Network, L3Network.class);
229 mapAllSubnetsIntoL3Network(aaiL3Network, network);
230 mapAllCtagAssignmentsIntoL3Network(aaiL3Network, network);
231 mapAllSegmentationAssignmentsIntoL3Network(aaiL3Network, network);
232 network.setOrchestrationStatus(this.mapOrchestrationStatusFromAAI(aaiL3Network.getOrchestrationStatus()));
236 protected void mapAllSegmentationAssignmentsIntoL3Network(org.onap.aai.domain.yang.L3Network aaiL3Network,
238 if (aaiL3Network.getSegmentationAssignments() != null) {
239 for (org.onap.aai.domain.yang.SegmentationAssignment aaiSegmentationAssignment : aaiL3Network
240 .getSegmentationAssignments().getSegmentationAssignment()) {
241 network.getSegmentationAssignments().add(mapAAISegmentationAssignment(aaiSegmentationAssignment));
246 protected void mapAllCtagAssignmentsIntoL3Network(org.onap.aai.domain.yang.L3Network aaiL3Network,
248 if (aaiL3Network.getCtagAssignments() != null) {
249 for (org.onap.aai.domain.yang.CtagAssignment aaiCtagAssignment : aaiL3Network.getCtagAssignments()
250 .getCtagAssignment()) {
251 network.getCtagAssignments().add(mapAAICtagAssignment(aaiCtagAssignment));
256 protected void mapAllSubnetsIntoL3Network(org.onap.aai.domain.yang.L3Network aaiL3Network, L3Network network) {
257 if (aaiL3Network.getSubnets() != null) {
258 for (org.onap.aai.domain.yang.Subnet aaiSubnet : aaiL3Network.getSubnets().getSubnet()) {
259 network.getSubnets().add(mapAAISubnet(aaiSubnet));
264 protected GenericVnf mapAAIGenericVnfIntoGenericVnf(org.onap.aai.domain.yang.GenericVnf aaiGenericVnf) {
265 GenericVnf genericVnf = modelMapper.map(aaiGenericVnf, GenericVnf.class);
266 mapAllVfModulesIntoGenericVnf(aaiGenericVnf, genericVnf);
267 mapAllLagInterfacesIntoGenericVnf(aaiGenericVnf, genericVnf);
268 mapAllEntitlementsIntoGenericVnf(aaiGenericVnf, genericVnf);
269 mapAllLicensesIntoGenericVnf(aaiGenericVnf, genericVnf);
270 genericVnf.setOrchestrationStatus(this.mapOrchestrationStatusFromAAI(aaiGenericVnf.getOrchestrationStatus()));
274 protected void mapAllLicensesIntoGenericVnf(org.onap.aai.domain.yang.GenericVnf aaiGenericVnf,
275 GenericVnf genericVnf) {
276 if (aaiGenericVnf.getLicenses() != null) {
277 for (org.onap.aai.domain.yang.License aaiLicense : aaiGenericVnf.getLicenses().getLicense()) {
278 genericVnf.setLicense(mapAAILicense(aaiLicense));
283 protected void mapAllEntitlementsIntoGenericVnf(org.onap.aai.domain.yang.GenericVnf aaiGenericVnf,
284 GenericVnf genericVnf) {
285 if (aaiGenericVnf.getEntitlements() != null) {
286 for (org.onap.aai.domain.yang.Entitlement aaiEntitlement : aaiGenericVnf.getEntitlements()
288 genericVnf.getEntitlements().add(mapAAIEntitlement(aaiEntitlement));
293 protected void mapAllLagInterfacesIntoGenericVnf(org.onap.aai.domain.yang.GenericVnf aaiGenericVnf,
294 GenericVnf genericVnf) {
295 if (aaiGenericVnf.getLagInterfaces() != null) {
296 for (org.onap.aai.domain.yang.LagInterface aaiLagInterface : aaiGenericVnf.getLagInterfaces()
297 .getLagInterface()) {
298 genericVnf.getLagInterfaces().add(mapAAILagInterface(aaiLagInterface));
303 protected void mapAllVfModulesIntoGenericVnf(org.onap.aai.domain.yang.GenericVnf aaiGenericVnf,
304 GenericVnf genericVnf) {
305 if (aaiGenericVnf.getVfModules() != null) {
306 for (org.onap.aai.domain.yang.VfModule aaiVfModule : aaiGenericVnf.getVfModules().getVfModule()) {
307 VfModule vfModule = mapAAIVfModule(aaiVfModule);
308 genericVnf.getVfModules().add(vfModule);
313 public OrchestrationStatus mapOrchestrationStatusFromAAI(String orchestrationStatus) {
315 Optional<OrchestrationStatus> result = Arrays.asList(OrchestrationStatus.values()).stream()
316 .filter(item -> item.fuzzyMap(orchestrationStatus))
319 return result.orElse(null);
323 public RequestContext mapRequestContext(RequestDetails requestDetails) {
324 RequestContext context = new RequestContext();
325 modelMapper.map(requestDetails.getRequestInfo(), context);
326 org.onap.so.serviceinstancebeans.RequestParameters requestParameters = requestDetails.getRequestParameters();
327 if (null != requestParameters) {
328 context.setSubscriptionServiceType(requestParameters.getSubscriptionServiceType());
329 context.setRequestParameters(this.mapRequestParameters(requestDetails.getRequestParameters()));
334 protected RequestParameters mapRequestParameters(org.onap.so.serviceinstancebeans.RequestParameters requestParameters) {
335 RequestParameters requestParams = new RequestParameters();
336 requestParams.setaLaCarte(requestParameters.getALaCarte());
337 requestParams.setSubscriptionServiceType(requestParameters.getSubscriptionServiceType());
338 requestParams.setUserParams(requestParameters.getUserParams());
339 return requestParams;
342 protected OrchestrationContext mapOrchestrationContext(RequestDetails requestDetails) {
343 OrchestrationContext context = new OrchestrationContext();
344 context.setIsRollbackEnabled((requestDetails.getRequestInfo().getSuppressRollback()));
348 protected CloudRegion mapCloudRegion(CloudConfiguration cloudConfiguration, org.onap.aai.domain.yang.CloudRegion aaiCloudRegion, String cloudOwner) {
349 CloudRegion cloudRegion = new CloudRegion();
350 if(cloudConfiguration != null)
351 cloudRegion = modelMapper.map(cloudConfiguration, CloudRegion.class);
352 if(aaiCloudRegion != null)
353 modelMapper.map(aaiCloudRegion, cloudRegion);
354 if(cloudOwner != null)
355 cloudRegion.setCloudOwner(cloudOwner);
359 protected Collection mapAAICollectionIntoCollection(org.onap.aai.domain.yang.Collection aaiCollection) {
360 Collection collection = new Collection();
361 collection.setId(aaiCollection.getCollectionId());
362 collection.setOrchestrationStatus(this.mapOrchestrationStatusFromAAI(aaiCollection.getOrchestrationStatus()));
366 protected org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup mapAAIInstanceGroupIntoInstanceGroup(
367 org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup) {
368 return modelMapper.map(aaiInstanceGroup,
369 org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup.class);
372 public RouteTableReference mapAAIRouteTableReferenceIntoRouteTableReference(
373 org.onap.aai.domain.yang.RouteTableReference aaiRouteTableReference) {
374 return modelMapper.map(aaiRouteTableReference, RouteTableReference.class);
377 protected ModelInfoNetwork mapCatalogNetworkToNetwork(NetworkResourceCustomization networkResourceCustomization) {
378 modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);
379 ModelInfoNetwork modelInfoNetwork = modelMapper.map(networkResourceCustomization, ModelInfoNetwork.class);
380 modelMapper.map(networkResourceCustomization.getNetworkResource(), modelInfoNetwork);
381 modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STANDARD);
382 return modelInfoNetwork;
385 protected ModelInfoGenericVnf mapCatalogVnfToVnf(VnfResourceCustomization vnfResourceCustomization) {
386 ModelInfoGenericVnf modelInfoVnf = modelMapper.map(vnfResourceCustomization, ModelInfoGenericVnf.class);
387 modelMapper.map(vnfResourceCustomization.getVnfResources(), modelInfoVnf);
391 protected ModelInfoVfModule mapCatalogVfModuleToVfModule(VfModuleCustomization vfResourceCustomization) {
392 ModelInfoVfModule modelInfoVfModule = modelMapper.map(vfResourceCustomization, ModelInfoVfModule.class);
393 modelMapper.map(vfResourceCustomization.getVfModule(), modelInfoVfModule);
394 return modelInfoVfModule;
397 protected Platform mapRequestPlatform(org.onap.so.serviceinstancebeans.Platform platform) {
398 return modelMapper.map(platform, Platform.class);
401 protected LineOfBusiness mapRequestLineOfBusiness(
402 org.onap.so.serviceinstancebeans.LineOfBusiness lineOfBusiness) {
403 return modelMapper.map(lineOfBusiness, LineOfBusiness.class);
406 public Configuration mapAAIConfiguration(org.onap.aai.domain.yang.Configuration configurationAAI) {
407 modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);
408 Configuration configuration = modelMapper.map(configurationAAI, Configuration.class);
409 modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STANDARD);
410 configuration.getForwarderEvcs().addAll(mapAllForwarderEvcs(configurationAAI));
411 configuration.getEvcs().addAll(mapAllEvcs(configurationAAI));
412 configuration.setOrchestrationStatus(this.mapOrchestrationStatusFromAAI(configurationAAI.getOrchestrationStatus()));
413 return configuration;
416 protected List<Evc> mapAllEvcs(org.onap.aai.domain.yang.Configuration configurationAAI) {
417 List<Evc> listOfEvcs = new ArrayList<>();
418 if (configurationAAI.getEvcs() != null) {
419 for (org.onap.aai.domain.yang.Evc aaiEvc : configurationAAI.getEvcs().getEvc()) {
420 listOfEvcs.add(mapEvc(aaiEvc));
426 protected Evc mapEvc(org.onap.aai.domain.yang.Evc aaiEvc) {
427 return modelMapper.map(aaiEvc, Evc.class);
430 protected List<ForwarderEvc> mapAllForwarderEvcs(org.onap.aai.domain.yang.Configuration configurationAAI) {
431 List<ForwarderEvc> listOfForwarderEvcs = new ArrayList<>();
432 if (configurationAAI.getForwarderEvcs() != null) {
433 for (org.onap.aai.domain.yang.ForwarderEvc aaiForwarderEvc : configurationAAI.getForwarderEvcs().getForwarderEvc()) {
434 listOfForwarderEvcs.add(mapForwarderEvc(aaiForwarderEvc));
437 return listOfForwarderEvcs;
440 protected ForwarderEvc mapForwarderEvc(org.onap.aai.domain.yang.ForwarderEvc aaiForwarderEvc) {
441 return modelMapper.map(aaiForwarderEvc, ForwarderEvc.class);
444 protected OwningEntity mapRequestOwningEntity(org.onap.so.serviceinstancebeans.OwningEntity owningEntity) {
445 return modelMapper.map(owningEntity, OwningEntity.class);
448 protected Project mapRequestProject(org.onap.so.serviceinstancebeans.Project project) {
449 return modelMapper.map(project, Project.class);
452 protected ModelInfoConfiguration mapCatalogConfigurationToConfiguration(
453 ConfigurationResourceCustomization configurationResourceCustomization) {
454 ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration();
455 modelInfoConfiguration.setModelVersionId(configurationResourceCustomization.getConfigurationResource().getModelUUID());
456 modelInfoConfiguration.setModelCustomizationId(configurationResourceCustomization.getModelCustomizationUUID());
457 modelInfoConfiguration.setModelInvariantId(configurationResourceCustomization.getConfigurationResource().getModelInvariantUUID());
458 return modelInfoConfiguration;
461 public NetworkResourceCustomization mapCollectionNetworkResourceCustToNetworkResourceCust(
462 CollectionNetworkResourceCustomization collectionNetworkResourceCust) {
463 return modelMapper.map(collectionNetworkResourceCust, NetworkResourceCustomization.class);