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.be.datatypes.elements;
23 import java.util.List;
26 public class PolicyTypeDataDefinition extends ToscaTypeDataDefinition {
28 private String uniqueId;
29 private String version;
30 private String derivedFrom;
31 private List<String> targets;
32 private Map<String, String> metadata;
33 private String description;
36 * Timestamp of data type creation
38 private Long creationTime;
41 * Timestamp of the data type last update
43 private Long modificationTime;
44 private boolean highestVersion;
46 public PolicyTypeDataDefinition() {
49 public PolicyTypeDataDefinition(PolicyTypeDataDefinition p) {
51 this.uniqueId = p.uniqueId;
52 this.version = p.version;
53 this.targets = p.targets;
54 this.metadata = p.metadata;
55 this.derivedFrom = p.derivedFrom;
56 this.description = p.description;
57 this.creationTime = p.creationTime;
58 this.modificationTime = p.modificationTime;
59 this.highestVersion = p.highestVersion;
62 public String getVersion() {
66 public void setVersion(String version) {
67 this.version = version;
70 public List<String> getTargets() {
74 public void setTargets(List<String> members) {
75 this.targets = members;
78 public Map<String, String> getMetadata() {
82 public void setMetadata(Map<String, String> metadata) {
83 this.metadata = metadata;
86 public String getDescription() {
90 public void setDescription(String description) {
91 this.description = description;
94 public String getUniqueId() {
98 public void setUniqueId(String uniqueId) {
99 this.uniqueId = uniqueId;
102 public Long getCreationTime() {
106 public void setCreationTime(Long creationTime) {
107 this.creationTime = creationTime;
110 public Long getModificationTime() {
111 return modificationTime;
114 public void setModificationTime(Long modificationTime) {
115 this.modificationTime = modificationTime;
119 public String toString() {
120 return "PolicyTypeDataDefinition [uniqueId=" + uniqueId + ", type=" + getType() + ", name=" + getName() + ", icon=" + getIcon() + ", version=" + version
121 + ", targets=" + targets + ", metadata=" + metadata + ", description=" + description + ", creationTime="
122 + creationTime + ", modificationTime=" + modificationTime + "]";
125 public String getDerivedFrom() {
129 public void setDerivedFrom(String derivedFrom) {
130 this.derivedFrom = derivedFrom;
133 public boolean isHighestVersion() {
134 return highestVersion;
137 public void setHighestVersion(boolean isLatestVersion) {
138 this.highestVersion = isLatestVersion;