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.model;
23 import org.openecomp.sdc.tosca.services.YamlUtil;
25 import java.util.List;
29 public class NodeTemplate implements Template {
32 private String description;
33 private List<String> directives;
34 private Map<String, Object> properties;
35 private Map<String, Object> attributes;
36 private List<Map<String, RequirementAssignment>> requirements;
37 private List<Map<String, CapabilityAssignment>> capabilities;
38 private Map<String, InterfaceDefinition> interfaces;
39 private Map<String, ArtifactDefinition> artifacts;
40 private NodeFilter node_filter;
43 public String getType() {
47 public void setType(String type) {
51 public String getDescription() {
55 public void setDescription(String description) {
56 this.description = description;
59 public List<String> getDirectives() {
63 public void setDirectives(List<String> directives) {
64 this.directives = directives;
67 public Map<String, Object> getProperties() {
71 public void setProperties(Map<String, Object> properties) {
72 this.properties = properties;
75 public Map<String, Object> getAttributes() {
79 public void setAttributes(Map<String, Object> attributes) {
80 this.attributes = attributes;
83 public List<Map<String, RequirementAssignment>> getRequirements() {
87 public void setRequirements(List<Map<String, RequirementAssignment>> requirements) {
88 this.requirements = requirements;
91 public List<Map<String, CapabilityAssignment>> getCapabilities() {
95 public void setCapabilities(List<Map<String, CapabilityAssignment>> capabilities) {
96 this.capabilities = capabilities;
99 public Map<String, InterfaceDefinition> getInterfaces() {
103 public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
104 this.interfaces = interfaces;
107 public Map<String, ArtifactDefinition> getArtifacts() {
111 public void setArtifacts(Map<String, ArtifactDefinition> artifacts) {
112 this.artifacts = artifacts;
115 public NodeFilter getNode_filter() {
119 public void setNode_filter(NodeFilter node_filter) {
120 this.node_filter = node_filter;
123 public String getCopy() {
127 public void setCopy(String copy) {
132 public NodeTemplate clone() {
133 YamlUtil yamlUtil = new YamlUtil();
134 NodeTemplate clone = yamlUtil.yamlToObject(yamlUtil.objectToYaml(this), NodeTemplate.class);