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.openecomp.sdc.tosca.datatypes;
23 import org.openecomp.core.utilities.file.FileContentHandler;
24 import org.openecomp.sdc.datatypes.model.AsdcModel;
25 import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
27 import java.util.Collections;
31 * Tosca service model.
33 public class ToscaServiceModel implements AsdcModel {
34 private FileContentHandler artifactFiles;
35 private Map<String, ServiceTemplate> serviceTemplates;
36 private String entryDefinitionServiceTemplate;
39 * Instantiates a new Tosca service model.
41 * @param artifactFiles the artifact files
42 * @param serviceTemplates the service templates
43 * @param entryDefinitionServiceTemplate the entry definition service template
45 public ToscaServiceModel(FileContentHandler artifactFiles,
46 Map<String, ServiceTemplate> serviceTemplates,
47 String entryDefinitionServiceTemplate) {
48 this.artifactFiles = artifactFiles;
49 this.serviceTemplates = serviceTemplates;
50 this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate;
55 * Gets artifact files.
57 * @return the artifact files
59 public FileContentHandler getArtifactFiles() {
65 * Gets service templates.
67 * @return the service templates
69 public Map<String, ServiceTemplate> getServiceTemplates() {
70 return Collections.unmodifiableMap(serviceTemplates);
74 * Sets service templates.
76 * @param serviceTemplates the service templates
78 public void setServiceTemplates(Map<String, ServiceTemplate> serviceTemplates) {
79 this.serviceTemplates = serviceTemplates;
83 * Gets entry definition service template.
85 * @return the entry definition service template
87 public String getEntryDefinitionServiceTemplate() {
88 return entryDefinitionServiceTemplate;
92 * Sets entry definition service template.
94 * @param entryDefinitionServiceTemplate the entry definition service template
96 public void setEntryDefinitionServiceTemplate(String entryDefinitionServiceTemplate) {
97 this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate;