ade5fd21f3436e4c906b69ae350f313f381169fc
[sdc.git] /
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 import org.openecomp.sdc.translator.services.heattotosca.impl.functiontranslation.FunctionTranslator;
24
25 public interface ConsolidationDataHandler {
26
27     /**
28      * Add node connected out from current consolidation entity.
29      *
30      * @param nodeTemplateId        the node template id of target node - node connected out from current node
31      * @param requirementId         the requirement id of requirement assignment
32      * @param requirementAssignment the requirement assignment data connected to target node
33      */
34     void addNodesConnectedOut(TranslateTo translateTo, String nodeTemplateId,
35                                      String requirementId, RequirementAssignment requirementAssignment);
36
37     /**
38      * Add source node connected in to target node consolidation entity.
39      *
40      * @param sourceNodeTemplateId  the node template id of source node connected to consolidation entity
41      * @param targetNodeTemplateId  the node template id of consolidation entity node
42      * @param targetResourceId      the resource id of consolidation entity node
43      * @param requirementId         the requirement id of source node
44      * @param requirementAssignment the requirement assignment data of source node
45      */
46     void addNodesConnectedIn(TranslateTo translateTo,  String sourceNodeTemplateId,
47                                     String targetNodeTemplateId,
48                                     String targetResourceId, String requirementId,
49                                     RequirementAssignment requirementAssignment);
50
51     void removeParamNameFromAttrFuncList(ServiceTemplate serviceTemplate,
52                                                 HeatOrchestrationTemplate heatOrchestrationTemplate,
53                                                 String paramName, String contrailSharedResourceId,
54                                                 String sharedTranslatedResourceId);
55
56     void addNodesGetAttrOut(FunctionTranslator functionTranslator, String nodeTemplateId,
57             String resourceTranslatedId, String propertyName, String attributeName);
58
59     void addNodesGetAttrIn(FunctionTranslator functionTranslator,String nodeTemplateId,
60             String targetResourceId, String targetResourceTranslatedId,  String propertyName, String attributeName);
61
62     void addOutputParamGetAttrIn(FunctionTranslator functionTranslator, String targetResourceId,
63             String targetResourceTranslatedId, String propertyName, String attributeName);
64 }