re base code
[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.util.List;
24 import java.util.Map;
25
26 public class PolicyTypeDataDefinition extends ToscaTypeDataDefinition {
27
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;
34
35     /**
36      * Timestamp of data type creation
37      */
38     private Long creationTime;
39
40     /**
41      * Timestamp of the data type last update
42      */
43     private Long modificationTime;
44     private boolean highestVersion;
45
46     public PolicyTypeDataDefinition() {
47     }
48
49     public PolicyTypeDataDefinition(PolicyTypeDataDefinition p) {
50         super(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;
60     }
61
62     public String getVersion() {
63         return version;
64     }
65
66     public void setVersion(String version) {
67         this.version = version;
68     }
69
70     public List<String> getTargets() {
71         return targets;
72     }
73
74     public void setTargets(List<String> members) {
75         this.targets = members;
76     }
77
78     public Map<String, String> getMetadata() {
79         return metadata;
80     }
81
82     public void setMetadata(Map<String, String> metadata) {
83         this.metadata = metadata;
84     }
85
86     public String getDescription() {
87         return description;
88     }
89
90     public void setDescription(String description) {
91         this.description = description;
92     }
93
94     public String getUniqueId() {
95         return uniqueId;
96     }
97
98     public void setUniqueId(String uniqueId) {
99         this.uniqueId = uniqueId;
100     }
101
102     public Long getCreationTime() {
103         return creationTime;
104     }
105
106     public void setCreationTime(Long creationTime) {
107         this.creationTime = creationTime;
108     }
109
110     public Long getModificationTime() {
111         return modificationTime;
112     }
113
114     public void setModificationTime(Long modificationTime) {
115         this.modificationTime = modificationTime;
116     }
117
118     @Override
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 + "]";
123     }
124
125     public String getDerivedFrom() {
126         return derivedFrom;
127     }
128
129     public void setDerivedFrom(String derivedFrom) {
130         this.derivedFrom = derivedFrom;
131     }
132
133     public boolean isHighestVersion() {
134         return highestVersion;
135     }
136
137     public void setHighestVersion(boolean isLatestVersion) {
138         this.highestVersion = isLatestVersion;
139     }
140 }