re base code
[sdc.git] / catalog-be / src / main / java / org / openecomp / sdc / be / tosca / model / ToscaTopolgyTemplate.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.be.tosca.model;
22
23 import java.util.HashMap;
24 import java.util.Map;
25
26 public class ToscaTopolgyTemplate {
27     private Map<String, ToscaProperty> inputs;
28     private Map<String, ToscaNodeTemplate> node_templates;
29     private Map<String, ToscaGroupTemplate> groups;
30     private Map<String, ToscaPolicyTemplate> policies;
31     private SubstitutionMapping substitution_mappings;
32
33     public Map<String, ToscaNodeTemplate> getNode_templates() {
34         return node_templates;
35     }
36
37     public void setNode_templates(Map<String, ToscaNodeTemplate> node_templates) {
38         this.node_templates = node_templates;
39     }
40
41     public Map<String, ToscaGroupTemplate> getGroups() {
42         return groups;
43     }
44
45     public void addGroups(Map<String, ToscaGroupTemplate> groups) {
46         if ( this.groups == null ){
47             this.groups = new HashMap<>();
48         }
49         this.groups.putAll(groups);
50     }
51
52     public SubstitutionMapping getSubstitution_mappings() {
53         return substitution_mappings;
54     }
55
56     public void setSubstitution_mappings(SubstitutionMapping substitution_mapping) {
57         this.substitution_mappings = substitution_mapping;
58     }
59
60     public Map<String, ToscaProperty> getInputs() {
61         return inputs;
62     }
63
64     public void setInputs(Map<String, ToscaProperty> inputs) {
65         this.inputs = inputs;
66     }
67
68         public void addPolicies(Map<String, ToscaPolicyTemplate> policiesMap) {
69                 if ( this.policies == null ){
70             this.policies = new HashMap<>();
71         }
72         this.policies.putAll(policiesMap);              
73         }
74
75         public Map<String, ToscaPolicyTemplate> getPolicies() {
76                 return policies;
77         }
78 }