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.info;
23 import org.openecomp.sdc.be.model.GroupDefinition;
24 import org.openecomp.sdc.be.model.GroupInstance;
25 import org.openecomp.sdc.be.model.GroupProperty;
27 import java.util.List;
29 public class GroupDefinitionInfo {
32 // the id is unique per group instance on graph.
33 private String uniqueId;
35 // the id is unique per group instance on graph.
36 private String groupInstanceUniqueId;
38 // the group UUID should be changed when one of the artifacts/component
39 // instances has been changed.
40 private String groupUUID;
42 // version should be changed when there is a change to the group's metadata
43 // or to the groups members
44 // (not necessarily when the VF version is changed). This field cannot be
46 private String version;
48 private String invariantUUID;
49 private String customizationUUID;
51 Boolean isBase = null;
53 // artifacts - list of artifact uid. All artifacts in the group must already
54 // be uploaded to the VF
55 private List<ArtifactDefinitionInfo> artifacts;
57 private List<? extends GroupProperty> properties;
59 public GroupDefinitionInfo() {
63 public GroupDefinitionInfo(GroupDefinition other) {
64 this.setName(other.getName());
65 this.setUniqueId(other.getUniqueId());
66 this.setVersion(other.getVersion());
67 this.setGroupUUID(other.getGroupUUID());
68 this.setInvariantUUID(other.getInvariantUUID());
69 this.setProperties(other.convertToGroupProperties());
74 public GroupDefinitionInfo(GroupInstance other) {
75 this.setName(other.getGroupName());
76 this.setUniqueId(other.getGroupUid());
77 this.setGroupInstanceUniqueId(other.getUniqueId());
78 this.setVersion(other.getVersion());
79 this.setGroupUUID(other.getGroupUUID());
80 this.setCustomizationUUID(other.getCustomizationUUID());
81 this.setInvariantUUID(other.getInvariantUUID());
82 this.setProperties(other.convertToGroupInstancesProperties());
87 public String getInvariantUUID() {
91 public void setInvariantUUID(String invariantUUID) {
92 this.invariantUUID = invariantUUID;
95 public String getName() {
99 public void setName(String name) {
103 public String getUniqueId() {
107 public void setUniqueId(String uniqueId) {
108 this.uniqueId = uniqueId;
111 public String getGroupUUID() {
115 public void setGroupUUID(String groupUUID) {
116 this.groupUUID = groupUUID;
119 public String getVersion() {
123 public void setVersion(String version) {
124 this.version = version;
128 public String getCustomizationUUID() {
129 return customizationUUID;
132 public void setCustomizationUUID(String customizationUUID) {
133 this.customizationUUID = customizationUUID;
136 public Boolean getIsBase() {
140 public void setIsBase(Boolean isBase) {
141 this.isBase = isBase;
144 public List<ArtifactDefinitionInfo> getArtifacts() {
148 public void setArtifacts(List<ArtifactDefinitionInfo> artifacts) {
149 this.artifacts = artifacts;
152 public List<? extends GroupProperty> getProperties() {
156 public void setProperties(List<? extends GroupProperty> properties) {
157 this.properties = properties;
162 public String getGroupInstanceUniqueId() {
163 return groupInstanceUniqueId;
166 public void setGroupInstanceUniqueId(String groupInstanceUniqueId) {
167 this.groupInstanceUniqueId = groupInstanceUniqueId;
171 public String toString() {
172 return "GroupDefinitionInfo [" + super.toString() + ", isBase=" + isBase + ", artifacts=" + artifacts + "]";