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=========================================================
21 package org.openecomp.sdc.be.datatypes.elements;
23 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
24 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
26 import java.util.ArrayList;
27 import java.util.List;
30 public class GroupInstanceDataDefinition extends ToscaDataDefinition {
32 public GroupInstanceDataDefinition() {
35 public GroupInstanceDataDefinition(Map<String, Object> gi) {
38 public GroupInstanceDataDefinition(GroupInstanceDataDefinition other) {
39 this.setUniqueId(other.getUniqueId());
40 this.setName(other.getName());
41 this.setGroupUid(other.getGroupUid());
42 this.setCreationTime(other.getCreationTime());
43 this.setModificationTime(other.getModificationTime());
44 this.setPosX(other.getPosX());
45 this.setPosY(other.getPosY());
46 this.setPropertyValueCounter(other.getPropertyValueCounter());
47 this.setNormalizedName(other.getNormalizedName());
48 this.setCustomizationUUID(other.getCustomizationUUID());
49 this.setGroupName(other.getGroupName());
50 this.setInvariantUUID(other.getInvariantUUID());
51 this.setType(other.getType());
52 this.setGroupUUID(other.getGroupUUID());
53 this.setVersion(other.getVersion());
54 this.setDescription(other.getDescription());
55 if(other.getArtifacts() != null)
56 this.setArtifacts(new ArrayList<>(other.getArtifacts()));
57 if(other.getArtifactsUuid() != null)
58 this.setArtifactsUuid(new ArrayList<>(other.getArtifactsUuid()));
59 if(other.getGroupInstanceArtifacts() != null)
60 this.setGroupInstanceArtifacts(new ArrayList<>(other.getGroupInstanceArtifacts()));
61 if(other.getGroupInstanceArtifactsUuid() != null)
62 this.setGroupInstanceArtifactsUuid(new ArrayList<>(other.getGroupInstanceArtifactsUuid()));
63 if(other.getProperties() != null)
64 this.setProperties(new ArrayList<>(other.getProperties()));
67 public String getUniqueId() {
68 return (String) getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID);
71 public void setUniqueId(String uniqueId) {
72 setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, uniqueId);
75 public String getName() {
76 return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
79 public void setName(String name) {
80 setToscaPresentationValue(JsonPresentationFields.NAME, name);
83 public String getNormalizedName() {
84 return (String) getToscaPresentationValue(JsonPresentationFields.NORMALIZED_NAME);
87 public void setNormalizedName(String normalizedName) {
88 setToscaPresentationValue(JsonPresentationFields.NORMALIZED_NAME, normalizedName);
91 public String getGroupUid() {
92 return (String) getToscaPresentationValue(JsonPresentationFields.GROUP_UNIQUE_ID);
95 public void setGroupUid(String groupUid) {
96 setToscaPresentationValue(JsonPresentationFields.GROUP_UNIQUE_ID, groupUid);
99 public Long getCreationTime() {
100 return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_TIME);
103 public void setCreationTime(Long creationTime) {
104 setToscaPresentationValue(JsonPresentationFields.CREATION_TIME, creationTime);
107 public Long getModificationTime() {
108 return (Long) getToscaPresentationValue(JsonPresentationFields.MODIFICATION_TIME);
111 public void setModificationTime(Long modificationTime) {
112 setToscaPresentationValue(JsonPresentationFields.MODIFICATION_TIME, modificationTime);
115 public String getPosX() {
116 return (String) getToscaPresentationValue(JsonPresentationFields.POS_X);
119 public void setPosX(String posX) {
120 setToscaPresentationValue(JsonPresentationFields.POS_X, posX);
123 public String getPosY() {
124 return (String) getToscaPresentationValue(JsonPresentationFields.POS_Y);
127 public void setPosY(String posY) {
128 setToscaPresentationValue(JsonPresentationFields.POS_Y, posY);
131 public Integer getPropertyValueCounter() {
132 return (Integer) getToscaPresentationValue(JsonPresentationFields.PROPERTY_VALUE_COUNTER);
135 public void setPropertyValueCounter(Integer propertyValueCounter) {
136 setToscaPresentationValue(JsonPresentationFields.PROPERTY_VALUE_COUNTER, propertyValueCounter);
139 public String getCustomizationUUID() {
140 return (String) getToscaPresentationValue(JsonPresentationFields.CUSTOMIZATION_UUID);
143 public void setCustomizationUUID(String customizationUUID) {
144 setToscaPresentationValue(JsonPresentationFields.CUSTOMIZATION_UUID, customizationUUID);
147 public String getGroupName() {
148 return (String) getToscaPresentationValue(JsonPresentationFields.GROUP_NAME);
151 public void setGroupName(String groupName) {
152 setToscaPresentationValue(JsonPresentationFields.GROUP_NAME, groupName);
155 public String getInvariantUUID() {
156 return (String) getToscaPresentationValue(JsonPresentationFields.INVARIANT_UUID);
159 public void setInvariantUUID(String invariantUUID) {
160 setToscaPresentationValue(JsonPresentationFields.INVARIANT_UUID, invariantUUID);
163 public String getType() {
164 return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
167 public void setType(String type) {
168 setToscaPresentationValue(JsonPresentationFields.TYPE, type);
171 public String getGroupUUID() {
172 return (String) getToscaPresentationValue(JsonPresentationFields.GROUP_UUID);
175 public void setGroupUUID(String groupUUID) {
176 setToscaPresentationValue(JsonPresentationFields.GROUP_UUID, groupUUID);
179 public String getVersion() {
180 return (String) getToscaPresentationValue(JsonPresentationFields.VERSION);
183 public void setVersion(String version) {
184 setToscaPresentationValue(JsonPresentationFields.VERSION, version);
187 public String getDescription() {
188 return (String) getToscaPresentationValue(JsonPresentationFields.DESCRIPTION);
191 public void setDescription(String description) {
192 setToscaPresentationValue(JsonPresentationFields.DESCRIPTION, description);
195 @SuppressWarnings("unchecked")
196 public List<String> getArtifacts() {
197 return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS);
200 public void setArtifacts(List<String> artifacts) {
201 setToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS, artifacts);
204 @SuppressWarnings("unchecked")
205 public List<String> getArtifactsUuid() {
206 return (List<String> ) getToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS_UUID);
209 public void setArtifactsUuid(List<String> artifactsUuid) {
210 setToscaPresentationValue(JsonPresentationFields.GROUP_ARTIFACTS_UUID, artifactsUuid);
213 @SuppressWarnings("unchecked")
214 public List<String> getGroupInstanceArtifacts() {
215 return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS);
218 public void setGroupInstanceArtifacts(List<String> groupInstanceArtifacts) {
219 setToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS, groupInstanceArtifacts);
222 @SuppressWarnings("unchecked")
223 public List<String> getGroupInstanceArtifactsUuid() {
224 return (List<String>) getToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS_UUID);
227 public void setGroupInstanceArtifactsUuid(List<String> groupInstanceArtifactsUuid) {
228 setToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_ARTIFACTS_UUID, groupInstanceArtifactsUuid);
231 @SuppressWarnings("unchecked")
232 public List<PropertyDataDefinition> getProperties() {
233 return (List<PropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_PROPERTIES);
236 public void setProperties(List<PropertyDataDefinition> properties) {
237 setToscaPresentationValue(JsonPresentationFields.GROUP_INSTANCE_PROPERTIES, properties);