2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.vid.model;
\r
23 import org.openecomp.vid.asdc.beans.tosca.Group;
\r
26 * The Class VolumeGroup.
\r
28 public class VolumeGroup {
\r
31 private String uuid;
\r
33 /** The invariant uuid. */
\r
34 private String invariantUuid;
\r
36 /** The description. */
\r
37 private String description;
\r
40 private String name;
\r
43 private String version;
\r
45 /** The customization uuid. */
\r
46 private String customizationUuid;
\r
48 /** The customization uuid. */
\r
49 private String modelCustomizationName;
\r
51 * Instantiates a new volume group.
\r
53 public VolumeGroup() {}
\r
60 public String getUuid() {
\r
64 * Gets the customization uuid.
\r
66 * @return the customization uuid
\r
68 public String getCustomizationUuid() {
\r
69 return customizationUuid;
\r
72 * Gets the customization name.
\r
74 * @return the customization name
\r
76 public String getModelCustomizationName() {
\r
77 return modelCustomizationName;
\r
80 * Gets the invariant uuid.
\r
82 * @return the invariant uuid
\r
84 public String getInvariantUuid() {
\r
85 return invariantUuid;
\r
89 * Gets the description.
\r
91 * @return the description
\r
93 public String getDescription() {
\r
102 public String getName() {
\r
107 * Gets the version.
\r
109 * @return the version
\r
111 public String getVersion() {
\r
118 * @param uuid the new uuid
\r
120 public void setUuid(String uuid) {
\r
125 * Sets the invariant uuid.
\r
127 * @param invariantUuid the new invariant uuid
\r
129 public void setInvariantUuid(String invariantUuid) {
\r
130 this.invariantUuid = invariantUuid;
\r
134 * Sets the description.
\r
136 * @param description the new description
\r
138 public void setDescription(String description) {
\r
139 this.description = description;
\r
145 * @param name the new name
\r
147 public void setName(String name) {
\r
152 * Sets the version.
\r
154 * @param version the new version
\r
156 public void setVersion(String version) {
\r
157 this.version = version;
\r
160 * Sets the customization uuid.
\r
162 * @param u the new customization uuid
\r
164 private void setCustomizationUuid(String u) {
\r
165 this.customizationUuid = u;
\r
169 * Sets the customization name.
\r
171 * @param u the new customization name
\r
173 public void setModelCustomizationName(String u) {
\r
174 this.modelCustomizationName = u;
\r
178 * Extract volume group.
\r
180 * @param group the group
\r
181 * @return the volume group
\r
183 public static VolumeGroup extractVolumeGroup(String modelCustomizationName, Group group) {
\r
184 final VolumeGroup volumeGroup = new VolumeGroup();
\r
186 volumeGroup.setUuid(group.getMetadata().getVfModuleModelUUID());
\r
187 volumeGroup.setInvariantUuid(group.getMetadata().getVfModuleModelInvariantUUID());
\r
188 volumeGroup.setDescription(group.getMetadata().getDescription());
\r
189 volumeGroup.setName(group.getMetadata().getVfModuleModelName());
\r
190 volumeGroup.setVersion(group.getMetadata().getVfModuleModelVersion());
\r
191 volumeGroup.setCustomizationUuid(group.getMetadata().getVfModuleModelCustomizationUUID());
\r
192 volumeGroup.setModelCustomizationName(modelCustomizationName);
\r
193 return volumeGroup;
\r