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