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 org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
25 import java.io.Serializable;
26 import java.util.List;
29 public class PolicyTypeDataDefinition extends ToscaDataDefinition implements Serializable {
34 private static final long serialVersionUID = -3783390539788578388L;
36 private String uniqueId;
40 private String version;
42 private String derivedFrom;
44 private List<String> targets;
46 private Map<String, String> metadata;
48 private String description;
51 * Timestamp of data type creation
53 private Long creationTime;
56 * Timestamp of the data type last update
58 private Long modificationTime;
60 private boolean highestVersion;
62 public PolicyTypeDataDefinition() {
66 public PolicyTypeDataDefinition(PolicyTypeDataDefinition p) {
67 this.uniqueId = p.uniqueId;
69 this.version = p.version;
70 this.targets = p.targets;
71 this.metadata = p.metadata;
72 this.derivedFrom = p.derivedFrom;
73 this.description = p.description;
74 this.creationTime = p.creationTime;
75 this.modificationTime = p.modificationTime;
76 this.highestVersion = p.highestVersion;
79 public String getType() {
83 public void setType(String type) {
87 public String getVersion() {
91 public void setVersion(String version) {
92 this.version = version;
95 public List<String> getTargets() {
99 public void setTargets(List<String> members) {
100 this.targets = members;
103 public Map<String, String> getMetadata() {
107 public void setMetadata(Map<String, String> metadata) {
108 this.metadata = metadata;
111 public String getDescription() {
115 public void setDescription(String description) {
116 this.description = description;
119 public String getUniqueId() {
123 public void setUniqueId(String uniqueId) {
124 this.uniqueId = uniqueId;
127 public Long getCreationTime() {
131 public void setCreationTime(Long creationTime) {
132 this.creationTime = creationTime;
135 public Long getModificationTime() {
136 return modificationTime;
139 public void setModificationTime(Long modificationTime) {
140 this.modificationTime = modificationTime;
144 public String toString() {
145 return "PolicyTypeDataDefinition [uniqueId=" + uniqueId + ", type=" + type + ", version=" + version
146 + ", targets=" + targets + ", metadata=" + metadata + ", description=" + description + ", creationTime="
147 + creationTime + ", modificationTime=" + modificationTime + "]";
150 public String getDerivedFrom() {
154 public void setDerivedFrom(String derivedFrom) {
155 this.derivedFrom = derivedFrom;
158 public boolean isHighestVersion() {
159 return highestVersion;
162 public void setHighestVersion(boolean isLatestVersion) {
163 this.highestVersion = isLatestVersion;