Code changes in BPMN infra for RAN Slice Use case
[so.git] / bpmn / so-bpmn-tasks / src / main / java / org / onap / so / bpmn / infrastructure / workflow / tasks / ebb / loader / NetworkSliceSubnetEBBLoader.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2022 DTAG
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.onap.so.bpmn.infrastructure.workflow.tasks.ebb.loader;
22
23 import org.onap.so.bpmn.infrastructure.workflow.tasks.Resource;
24 import org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowType;
25 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
26 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
27 import org.onap.so.client.exception.ExceptionBuilder;
28 import org.slf4j.Logger;
29 import org.slf4j.LoggerFactory;
30 import org.springframework.stereotype.Component;
31 import java.util.ArrayList;
32 import java.util.List;
33
34 @Component
35 public class NetworkSliceSubnetEBBLoader {
36
37     private static final Logger logger = LoggerFactory.getLogger(VnfEBBLoader.class);
38
39     private final BBInputSetupUtils bbInputSetupUtils;
40     private final BBInputSetup bbInputSetup;
41     private final WorkflowActionExtractResourcesAAI workflowActionUtils;
42     private final ExceptionBuilder exceptionBuilder;
43
44     NetworkSliceSubnetEBBLoader(BBInputSetupUtils bbInputSetupUtils, BBInputSetup bbInputSetup,
45             WorkflowActionExtractResourcesAAI workflowActionUtils, ExceptionBuilder exceptionBuilder) {
46         this.bbInputSetupUtils = bbInputSetupUtils;
47         this.bbInputSetup = bbInputSetup;
48         this.workflowActionUtils = workflowActionUtils;
49         this.exceptionBuilder = exceptionBuilder;
50     }
51
52
53     public List<Resource> setNetworkSliceSubnetResource(String serviceId) {
54         Resource networkSliceSubnetResource = new Resource(WorkflowType.NETWORK_SLICE_SUBNET, serviceId, false, null);
55         List<Resource> resourceList = new ArrayList<>();
56         resourceList.add(networkSliceSubnetResource);
57         return resourceList;
58     }
59 }
60