Sync Integ to Master
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / PolicyTypeDataDefinition.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.datatypes.elements;
22
23 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
24
25 import java.io.Serializable;
26 import java.util.List;
27 import java.util.Map;
28
29 public class PolicyTypeDataDefinition extends ToscaDataDefinition implements Serializable {
30
31     /**
32      *
33      */
34     private static final long serialVersionUID = -3783390539788578388L;
35
36     private String uniqueId;
37
38     private String type;
39
40     private String version;
41
42     private String derivedFrom;
43
44     private List<String> targets;
45
46     private Map<String, String> metadata;
47
48     private String description;
49
50     /**
51      * Timestamp of data type creation
52      */
53     private Long creationTime;
54
55     /**
56      * Timestamp of the data type last update
57      */
58     private Long modificationTime;
59
60     private boolean highestVersion;
61
62     public PolicyTypeDataDefinition() {
63
64     }
65
66     public PolicyTypeDataDefinition(PolicyTypeDataDefinition p) {
67         this.uniqueId = p.uniqueId;
68         this.type = p.type;
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;
77     }
78
79     public String getType() {
80         return type;
81     }
82
83     public void setType(String type) {
84         this.type = type;
85     }
86
87     public String getVersion() {
88         return version;
89     }
90
91     public void setVersion(String version) {
92         this.version = version;
93     }
94
95     public List<String> getTargets() {
96         return targets;
97     }
98
99     public void setTargets(List<String> members) {
100         this.targets = members;
101     }
102
103     public Map<String, String> getMetadata() {
104         return metadata;
105     }
106
107     public void setMetadata(Map<String, String> metadata) {
108         this.metadata = metadata;
109     }
110
111     public String getDescription() {
112         return description;
113     }
114
115     public void setDescription(String description) {
116         this.description = description;
117     }
118
119     public String getUniqueId() {
120         return uniqueId;
121     }
122
123     public void setUniqueId(String uniqueId) {
124         this.uniqueId = uniqueId;
125     }
126
127     public Long getCreationTime() {
128         return creationTime;
129     }
130
131     public void setCreationTime(Long creationTime) {
132         this.creationTime = creationTime;
133     }
134
135     public Long getModificationTime() {
136         return modificationTime;
137     }
138
139     public void setModificationTime(Long modificationTime) {
140         this.modificationTime = modificationTime;
141     }
142
143     @Override
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 + "]";
148     }
149
150     public String getDerivedFrom() {
151         return derivedFrom;
152     }
153
154     public void setDerivedFrom(String derivedFrom) {
155         this.derivedFrom = derivedFrom;
156     }
157
158     public boolean isHighestVersion() {
159         return highestVersion;
160     }
161
162     public void setHighestVersion(boolean isLatestVersion) {
163         this.highestVersion = isLatestVersion;
164     }
165
166 }