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;
30 public class ToscaServiceModel implements AsdcModel {
31 private FileContentHandler artifactFiles;
32 private Map<String, ServiceTemplate> serviceTemplates;
33 private String entryDefinitionServiceTemplate;
36 * Instantiates a new Tosca service model.
38 * @param artifactFiles the artifact files
39 * @param serviceTemplates the service templates
40 * @param entryDefinitionServiceTemplate the entry definition service template
42 public ToscaServiceModel(FileContentHandler artifactFiles,
43 Map<String, ServiceTemplate> serviceTemplates,
44 String entryDefinitionServiceTemplate) {
45 this.artifactFiles = artifactFiles;
46 this.serviceTemplates = serviceTemplates;
47 this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate;
51 public FileContentHandler getArtifactFiles() {
52 return artifactFiles;//MapUtils.isEmpty(artifactFiles) ? Collections.EMPTY_MAP
53 // : Collections.unmodifiableMap(artifactFiles);
57 public Map<String, ServiceTemplate> getServiceTemplates() {
58 return Collections.unmodifiableMap(serviceTemplates);
61 public void setServiceTemplates(Map<String, ServiceTemplate> serviceTemplates) {
62 this.serviceTemplates = serviceTemplates;
65 public String getEntryDefinitionServiceTemplate() {
66 return entryDefinitionServiceTemplate;
69 public void setEntryDefinitionServiceTemplate(String entryDefinitionServiceTemplate) {
70 this.entryDefinitionServiceTemplate = entryDefinitionServiceTemplate;