ActivitySpec - Correcting logger messages
[sdc.git] / common / onap-tosca-datatype / src / main / java / org / onap / sdc / tosca / datatypes / model / ServiceTemplate.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.onap.sdc.tosca.datatypes.model;
18
19 import org.apache.commons.collections4.MapUtils;
20 import org.onap.sdc.tosca.datatypes.model.heatextend.AnnotationType;
21
22 import java.util.HashMap;
23 import java.util.List;
24 import java.util.Map;
25
26
27 public class ServiceTemplate implements Template {
28
29   private String tosca_definitions_version;
30   private Map<String, String> metadata;
31   private Object dsl_definitions;
32   private Map<String, Repository> repositories;
33   private String description;
34   private List<Map<String, Import>> imports;
35   private Map<String, ArtifactType> artifact_types;
36   private Map<String, DataType> data_types;
37   private Map<String, CapabilityType> capability_types;
38   private Map<String, Object> interface_types;
39   private Map<String, RelationshipType> relationship_types;
40   private Map<String, NodeType> node_types;
41   private Map<String, GroupType> group_types;
42   private Map<String, PolicyType> policy_types;
43   private Map<String, AnnotationType> annotation_types;
44   private TopologyTemplate topology_template;
45
46   public String getTosca_definitions_version() {
47     return tosca_definitions_version;
48   }
49
50   public void setTosca_definitions_version(String tosca_definitions_version) {
51     this.tosca_definitions_version = tosca_definitions_version;
52   }
53
54   public Map<String, String> getMetadata() {
55     return metadata;
56   }
57
58   public void setMetadata(Map<String, String> metadata) {
59     this.metadata = metadata;
60   }
61
62   public Object getDsl_definitions() {
63     return dsl_definitions;
64   }
65
66   public void setDsl_definitions(Object dsl_definitions) {
67     this.dsl_definitions = dsl_definitions;
68   }
69
70   public Map<String, Repository> getRepositories() {
71     return repositories;
72   }
73
74   public void setRepositories(
75       Map<String, Repository> repositories) {
76     this.repositories = repositories;
77   }
78
79   public String getDescription() {
80     return description;
81   }
82
83   public void setDescription(String description) {
84     this.description = description;
85   }
86
87   public List<Map<String, Import>> getImports() {
88     return imports;
89   }
90
91   public void setImports(
92       List<Map<String, Import>> imports) {
93     this.imports = imports;
94   }
95
96   public Map<String, ArtifactType> getArtifact_types() {
97     return artifact_types;
98   }
99
100   public void setArtifact_types(Map<String, ArtifactType> artifact_types) {
101     this.artifact_types = artifact_types;
102   }
103
104   public Map<String, DataType> getData_types() {
105     return data_types;
106   }
107
108   public void setData_types(Map<String, DataType> data_types) {
109     this.data_types = data_types;
110   }
111
112   public Map<String, CapabilityType> getCapability_types() {
113     return capability_types;
114   }
115
116   public void setCapability_types(Map<String, CapabilityType> capability_types) {
117     this.capability_types = capability_types;
118   }
119
120   public Map<String, RelationshipType> getRelationship_types() {
121     return relationship_types;
122   }
123
124   public void setRelationship_types(Map<String, RelationshipType> relationship_types) {
125     this.relationship_types = relationship_types;
126   }
127
128   public Map<String, NodeType> getNode_types() {
129     return node_types;
130   }
131
132   public void setNode_types(Map<String, NodeType> node_types) {
133     this.node_types = node_types;
134   }
135
136   public Map<String, GroupType> getGroup_types() {
137     return group_types;
138   }
139
140   public void setGroup_types(Map<String, GroupType> group_types) {
141     this.group_types = group_types;
142   }
143
144   public Map<String, Object> getInterface_types() {
145     return interface_types;
146   }
147
148   public void setInterface_types(Map<String, Object> interface_types) {
149     this.interface_types = interface_types;
150   }
151
152   public void addInterfaceType(String interfaceKey, InterfaceType interfaceType) {
153     if (MapUtils.isEmpty(this.interface_types)) {
154       this.interface_types = new HashMap<>();
155     }
156
157     this.interface_types.put(interfaceKey, interfaceType);
158   }
159
160   public Map<String, PolicyType> getPolicy_types() {
161     return policy_types;
162   }
163
164   public void setPolicy_types(Map<String, PolicyType> policy_types) {
165     this.policy_types = policy_types;
166   }
167
168   public TopologyTemplate getTopology_template() {
169     return topology_template;
170   }
171
172   public void setTopology_template(TopologyTemplate topology_template) {
173     this.topology_template = topology_template;
174   }
175
176   public Map<String, AnnotationType> getAnnotation_types() {
177     return annotation_types;
178   }
179
180   public void setAnnotation_types(Map<String, AnnotationType> annotation_types) {
181     this.annotation_types = annotation_types;
182   }
183
184 }