[SDC] rebase code
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / ComponentInstanceDataDefinition.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
25 import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum;
26 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
27
28 public class ComponentInstanceDataDefinition extends ToscaDataDefinition implements Serializable {
29
30         /**
31          * 
32          */
33         
34         private static final long serialVersionUID = 7215033872921497743L;
35
36         private String icon;
37         
38         private String uniqueId;
39
40         private String name;
41         
42         private String normalizedName;
43
44         private String componentUid;
45
46         private Long creationTime;
47
48         private Long modificationTime;
49
50         private String description;
51
52         private String posX;
53
54         private String posY;
55         private Integer propertyValueCounter = 1;
56         private Integer attributeValueCounter;
57         private Integer inputValueCounter = 1;
58         private OriginTypeEnum originType;
59         private String customizationUUID;
60         private String componentName;
61         private String componentVersion;
62         private String toscaComponentName;
63         private String invariantName;
64         
65         public ComponentInstanceDataDefinition() {
66                 super();
67         }
68
69         public ComponentInstanceDataDefinition(ComponentInstanceDataDefinition dataDefinition) {
70                 this.icon = dataDefinition.icon;
71                 this.uniqueId = dataDefinition.uniqueId;
72                 this.name = dataDefinition.name;
73                 this.componentUid = dataDefinition.componentUid;
74                 this.creationTime = dataDefinition.creationTime;
75                 this.modificationTime = dataDefinition.modificationTime;
76                 this.description = dataDefinition.description;
77                 this.posX = dataDefinition.posX;
78                 this.posY = dataDefinition.posY;
79                 this.propertyValueCounter = dataDefinition.propertyValueCounter;
80                 this.normalizedName = dataDefinition.normalizedName;
81                 this.originType = dataDefinition.originType;
82                 this.customizationUUID = dataDefinition.customizationUUID;
83                 this.componentName = dataDefinition.componentName;
84                 this.componentVersion = dataDefinition.componentVersion;
85                 this.toscaComponentName = dataDefinition.toscaComponentName;
86                 this.invariantName = dataDefinition.invariantName;
87         }
88         
89         public String getIcon() {
90                 return icon;
91         }
92
93         public void setIcon(String icon) {
94                 this.icon = icon;
95         }
96         public String getUniqueId() {
97                 return uniqueId;
98         }
99
100         public void setUniqueId(String uniqueId) {
101                 this.uniqueId = uniqueId;
102         }
103
104         public Long getCreationTime() {
105                 return creationTime;
106         }
107
108         public void setCreationTime(Long creationTime) {
109                 this.creationTime = creationTime;
110         }
111
112         public Long getModificationTime() {
113                 return modificationTime;
114         }
115
116         public void setModificationTime(Long modificationTime) {
117                 this.modificationTime = modificationTime;
118         }
119
120         public String getDescription() {
121                 return description;
122         }
123
124         public void setDescription(String description) {
125                 this.description = description;
126         }
127
128         public String getPosX() {
129                 return posX;
130         }
131
132         public void setPosX(String posX) {
133                 this.posX = posX;
134         }
135
136         public String getPosY() {
137                 return posY;
138         }
139
140         public void setPosY(String posY) {
141                 this.posY = posY;
142         }
143
144         public String getComponentUid() {
145                 return componentUid;
146         }
147
148         public void setComponentUid(String resourceUid) {
149                 this.componentUid = resourceUid;
150         }
151
152         public String getName() {
153                 return name;
154         }
155
156         public void setName(String name) {
157                 if(invariantName == null){
158                         invariantName = name;
159                 }
160                 this.name = name;
161         }
162         
163         public String getInvariantName() {
164                 return invariantName;
165         }
166
167         public void setInvariantName(String invariantName) {
168                 this.invariantName = invariantName;
169         }
170
171         public Integer getPropertyValueCounter() {
172                 return propertyValueCounter;
173         }
174
175         public void setPropertyValueCounter(Integer propertyValueCounter) {
176                 this.propertyValueCounter = propertyValueCounter;
177         }
178
179         public String getNormalizedName() {
180                 return normalizedName;
181         }
182
183         public void setNormalizedName(String normalizedName) {
184                 this.normalizedName = normalizedName;
185         }
186
187         public OriginTypeEnum getOriginType() {
188                 return originType;
189         }
190
191         public void setOriginType(OriginTypeEnum originType) {
192                 this.originType = originType;
193         }
194
195         public Integer getAttributeValueCounter() {
196                 return attributeValueCounter;
197         }
198
199         public void setAttributeValueCounter(Integer attributeValueCounter) {
200                 this.attributeValueCounter = attributeValueCounter;
201         }
202
203         public Integer getInputValueCounter() {
204                 return inputValueCounter;
205         }
206
207         public void setInputValueCounter(Integer inputValueCounter) {
208                 this.inputValueCounter = inputValueCounter;
209         }
210
211         public String getCustomizationUUID() {
212                 return customizationUUID;
213         }
214
215         public void setCustomizationUUID(String customizationUUID) {
216                 this.customizationUUID = customizationUUID;
217         }
218
219         public String getComponentName() {
220                 return componentName;
221         }
222
223         public void setComponentName(String resourceName) {
224                 this.componentName = resourceName;
225         }
226
227         public String getComponentVersion() {
228                 return componentVersion;
229         }
230
231         public String getToscaComponentName() {
232                 return toscaComponentName;
233         }
234
235         public void setToscaComponentName(String toscaComponentName) {
236                 this.toscaComponentName = toscaComponentName;
237         }
238
239         public void setComponentVersion(String resourceVersion) {
240                 this.componentVersion = resourceVersion;
241         }
242
243         @Override
244         public String toString() {
245                 return "ComponentInstanceDataDefinition [icon=" + icon + ", uniqueId=" + uniqueId + ", name=" + name + ", normalizedName=" + normalizedName + ", componentUid=" + componentUid + ", creationTime=" + creationTime + ", modificationTime="
246                                 + modificationTime + ", description=" + description + ", posX=" + posX + ", posY=" + posY + ", propertyValueCounter=" + propertyValueCounter + ", attributeValueCounter=" + attributeValueCounter + ", inputValueCounter="
247                                 + inputValueCounter + ", originType=" + originType + ", customizationUUID=" + customizationUUID + ", componentName=" + componentName + ", componentVersion=" + componentVersion + ", toscaComponentName=" + toscaComponentName + "]";
248         }
249
250 }