[sdc] docker file fix for cassandra
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / main / java / org / openecomp / sdc / translator / services / heattotosca / globaltypes / GlobalTypesUtil.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.translator.services.heattotosca.globaltypes;
22
23
24 import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
25 import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
26 import org.openecomp.sdc.tosca.datatypes.model.Import;
27 import org.openecomp.sdc.tosca.services.ToscaUtil;
28
29 import java.util.HashMap;
30 import java.util.Map;
31
32 public class GlobalTypesUtil {
33
34
35   /**
36    * Create common import list map.
37    *
38    * @return the map
39    */
40   public static Map<String, Import> createCommonImportList() {
41     Map<String, Import> importsMap = new HashMap<>();
42     importsMap.put("common_definitions", CommonGlobalTypes.createCommonServiceTemplateImport());
43     return importsMap;
44   }
45
46   /**
47    * Create attachment capability capability definition.
48    *
49    * @return the capability definition
50    */
51   public static CapabilityDefinition createAttachmentCapability() {
52     CapabilityDefinition capability = new CapabilityDefinition();
53     capability.setType(ToscaCapabilityType.ATTACHMENT.getDisplayName());
54
55     return capability;
56   }
57
58   /**
59    * Create service template import import.
60    *
61    * @param serviceTemplateName the service template name
62    * @return the import
63    */
64   public static Import createServiceTemplateImport(String serviceTemplateName) {
65     Import serviceTemplateImport = new Import();
66     serviceTemplateImport.setFile(ToscaUtil.getServiceTemplateFileName(serviceTemplateName));
67     return serviceTemplateImport;
68   }
69 }