TOSCA Consolidation Data handling - Refactoring
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / main / java / org / openecomp / sdc / translator / datatypes / heattotosca / unifiedmodel / consolidation / ConsolidationDataHandler.java
1 /*
2  * Copyright © 2016-2018 European Support Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation;
18
19 import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
20 import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
21 import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
22 import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
23
24 public interface ConsolidationDataHandler {
25
26     /**
27      * Add node connected out from current consolidation entity.
28      *
29      * @param nodeTemplateId        the node template id of target node - node connected out from current node
30      * @param requirementId         the requirement id of requirement assignment
31      * @param requirementAssignment the requirement assignment data connected to target node
32      */
33     void addNodesConnectedOut(TranslateTo translateTo, String nodeTemplateId,
34                                      String requirementId, RequirementAssignment requirementAssignment);
35
36     /**
37      * Add source node connected in to target node consolidation entity.
38      *
39      * @param sourceNodeTemplateId  the node template id of source node connected to consolidation entity
40      * @param targetNodeTemplateId  the node template id of consolidation entity node
41      * @param targetResourceId      the resource id of consolidation entity node
42      * @param requirementId         the requirement id of source node
43      * @param requirementAssignment the requirement assignment data of source node
44      */
45     void addNodesConnectedIn(TranslateTo translateTo,  String sourceNodeTemplateId,
46                                     String targetNodeTemplateId,
47                                     String targetResourceId, String requirementId,
48                                     RequirementAssignment requirementAssignment);
49
50     void removeParamNameFromAttrFuncList(ServiceTemplate serviceTemplate,
51                                                 HeatOrchestrationTemplate heatOrchestrationTemplate,
52                                                 String paramName, String contrailSharedResourceId,
53                                                 String sharedTranslatedResourceId);
54 }