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=========================================================
20 package org.openecomp.sdc.be.datatypes.elements;
22 import java.util.ArrayList;
23 import java.util.List;
25 import lombok.NoArgsConstructor;
26 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
27 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
30 public class GroupInstanceDataDefinition extends ToscaDataDefinition {
32 public GroupInstanceDataDefinition(Map<String, Object> gi) {
36 public GroupInstanceDataDefinition(GroupInstanceDataDefinition other) {
37 this.setUniqueId(other.getUniqueId());
38 this.setName(other.getName());
39 this.setGroupUid(other.getGroupUid());
40 this.setCreationTime(other.getCreationTime());
41 this.setModificationTime(other.getModificationTime());
42 this.setPosX(other.getPosX());
43 this.setPosY(other.getPosY());
44 this.setPropertyValueCounter(other.getPropertyValueCounter());
45 this.setNormalizedName(other.getNormalizedName());
46 this.setCustomizationUUID(other.getCustomizationUUID());
47 this.setGroupName(other.getGroupName());
48 this.setInvariantUUID(other.getInvariantUUID());
49 this.setType(other.getType());
50 this.setGroupUUID(other.getGroupUUID());
51 this.setVersion(other.getVersion());
52 this.setDescription(other.getDescription());
53 if (other.getArtifacts() != null) {
54 this.setArtifacts(new ArrayList<>(other.getArtifacts()));
56 if (other.getArtifactsUuid() != null) {
57 this.setArtifactsUuid(new ArrayList<>(other.getArtifactsUuid()));
59 if (other.getGroupInstanceArtifacts() != null) {
60 this.setGroupInstanceArtifacts(new ArrayList<>(other.getGroupInstanceArtifacts()));
62 if (other.getGroupInstanceArtifactsUuid() != null) {
63 this.setGroupInstanceArtifactsUuid(new ArrayList<>(other.getGroupInstanceArtifactsUuid()));
65 if (other.getProperties() != null) {
66 this.setProperties(new ArrayList<>(other.getProperties()));
70 public String getUniqueId() {
71 return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
74 public void setUniqueId(String uniqueId) {
75 setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
78 public String getNormalizedName() {
79 return (String) getToscaPresentationValue(JsonPresentationFields.NORMALIZED_NAME);
82 public void setNormalizedName(String normalizedName) {
83 setToscaPresentationValue(JsonPresentationFields.NORMALIZED_NAME, normalizedName);
86 public String getGroupUid() {
87 return (String) getToscaPresentationValue(JsonPresentationFields.GROUP_UNIQUE_ID);
90 public void setGroupUid(String groupUid) {
91 setToscaPresentationValue(JsonPresentationFields.GROUP_UNIQUE_ID, groupUid);
94 public Long getCreationTime() {
95 return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_TIME);
98 public void setCreationTime(Long creationTime) {
99 setToscaPresentationValue(JsonPresentationFields.CREATION_TIME, creationTime);
102 public Long getModificationTime() {
103 return (Long) getToscaPresentationValue(JsonPresentationFields.MODIFICATION_TIME);
106 public void setModificationTime(Long modificationTime) {
107 setToscaPresentationValue(JsonPresentationFields.MODIFICATION_TIME, modificationTime);
110 public String getPosX() {
111 return (String) getToscaPresentationValue(JsonPresentationFields.POS_X);
114 public void setPosX(String posX) {
115 setToscaPresentationValue(JsonPresentationFields.POS_X, posX);
118 public String getPosY() {
119 return (String) getToscaPresentationValue(JsonPresentationFields.POS_Y);
122 public void setPosY(String posY) {
123 setToscaPresentationValue(JsonPresentationFields.POS_Y, posY);
126 public Integer getPropertyValueCounter() {
127 return (Integer) getToscaPresentationValue(JsonPresentationFields.PROPERTY_VALUE_COUNTER);
130 public void setPropertyValueCounter(Integer propertyValueCounter) {
131 setToscaPresentationValue(JsonPresentationFields.PROPERTY_VALUE_COUNTER, propertyValueCounter);
134 public String getCustomizationUUID() {
135 return (String) getToscaPresentationValue(JsonPresentationFields.CUSTOMIZATION_UUID);
138 public void setCustomizationUUID(String customizationUUID) {
139 setToscaPresentationValue(JsonPresentationFields.CUSTOMIZATION_UUID, customizationUUID);
142 public String getGroupName() {
143 return (String) getToscaPresentationValue(JsonPresentationFields.GROUP_NAME);
146 public void setGroupName(String groupName) {
147 setToscaPresentationValue(JsonPresentationFields.GROUP_NAME, groupName);
150 public String getInvariantUUID() {
151 return (String) getToscaPresentationValue(JsonPresentationFields.INVARIANT_UUID);
154 public void setInvariantUUID(String invariantUUID) {
155 setToscaPresentationValue(JsonPresentationFields.INVARIANT_UUID, invariantUUID);
159 public String getType() {
160 return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
164 public void setType(String type) {
165 setToscaPresentationValue(JsonPresentationFields.TYPE, type);
168 public String getGroupUUID() {
169 return (String) getToscaPresentationValue(JsonPresentationFields.GROUP_UUID);
172 public void setGroupUUID(String groupUUID) {
173 setToscaPresentationValue(JsonPresentationFields.GROUP_UUID, groupUUID);
177 public String getVersion() {
178 return (String) getToscaPresentationValue(JsonPresentationFields.VERSION);
181 public void setVersion(String version) {
182 setToscaPresentationValue(JsonPresentationFields.VERSION, version);
185 public String getDescription() {
186 return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
189 public void setDescription(String description) {
190 setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
193 @SuppressWarnings("unchecked")
194 public List<String> getArtifacts() {
195 return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS);
198 public void setArtifacts(List<String> artifacts) {
199 setToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS, artifacts);
202 @SuppressWarnings("unchecked")
203 public List<String> getArtifactsUuid() {
204 return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS_UUID);
207 public void setArtifactsUuid(List<String> artifactsUuid) {
208 setToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS_UUID, artifactsUuid);
211 @SuppressWarnings("unchecked")
212 public List<String> getGroupInstanceArtifacts() {
213 return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS);
216 public void setGroupInstanceArtifacts(List<String> groupInstanceArtifacts) {
217 setToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS, groupInstanceArtifacts);
220 @SuppressWarnings("unchecked")
221 public List<String> getGroupInstanceArtifactsUuid() {
222 return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS_UUID);
225 public void setGroupInstanceArtifactsUuid(List<String> groupInstanceArtifactsUuid) {
226 setToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS_UUID, groupInstanceArtifactsUuid);
229 @SuppressWarnings("unchecked")
230 public List<PropertyDataDefinition> getProperties() {
231 return (List<PropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_PROPERTIES);
234 public void setProperties(List<PropertyDataDefinition> properties) {
235 setToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_PROPERTIES, properties);