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.onap.vid.model;
23 import org.onap.vid.asdc.beans.tosca.Group;
26 * The Class VolumeGroup.
28 public class VolumeGroup {
33 /** The invariant uuid. */
34 private String invariantUuid;
36 /** The description. */
37 private String description;
43 private String version;
45 /** The customization uuid. */
46 private String customizationUuid;
48 /** The customization uuid. */
49 private String modelCustomizationName;
51 * Instantiates a new volume group.
53 public VolumeGroup() {}
60 public String getUuid() {
64 * Gets the customization uuid.
66 * @return the customization uuid
68 public String getCustomizationUuid() {
69 return customizationUuid;
72 * Gets the customization name.
74 * @return the customization name
76 public String getModelCustomizationName() {
77 return modelCustomizationName;
80 * Gets the invariant uuid.
82 * @return the invariant uuid
84 public String getInvariantUuid() {
89 * Gets the description.
91 * @return the description
93 public String getDescription() {
102 public String getName() {
109 * @return the version
111 public String getVersion() {
118 * @param uuid the new uuid
120 public void setUuid(String uuid) {
125 * Sets the invariant uuid.
127 * @param invariantUuid the new invariant uuid
129 public void setInvariantUuid(String invariantUuid) {
130 this.invariantUuid = invariantUuid;
134 * Sets the description.
136 * @param description the new description
138 public void setDescription(String description) {
139 this.description = description;
145 * @param name the new name
147 public void setName(String name) {
154 * @param version the new version
156 public void setVersion(String version) {
157 this.version = version;
160 * Sets the customization uuid.
162 * @param u the new customization uuid
164 public void setCustomizationUuid(String u) {
165 this.customizationUuid = u;
169 * Sets the customization name.
171 * @param u the new customization name
173 public void setModelCustomizationName(String u) {
174 this.modelCustomizationName = u;
178 * Extract volume group.
180 * @param group the group
181 * @return the volume group
183 public static VolumeGroup extractVolumeGroup(String modelCustomizationName, Group group) {
184 final VolumeGroup volumeGroup = new VolumeGroup();
186 volumeGroup.setUuid(group.getMetadata().getVfModuleModelUUID());
187 volumeGroup.setInvariantUuid(group.getMetadata().getVfModuleModelInvariantUUID());
188 volumeGroup.setDescription(group.getMetadata().getDescription());
189 volumeGroup.setName(group.getMetadata().getVfModuleModelName());
190 volumeGroup.setVersion(group.getMetadata().getVfModuleModelVersion());
191 volumeGroup.setCustomizationUuid(group.getMetadata().getVfModuleModelCustomizationUUID());
192 volumeGroup.setModelCustomizationName(modelCustomizationName);