2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 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.model;
23 import java.util.ArrayList;
24 import java.util.List;
27 public class ComponentDependency {
29 private String version;
30 private String uniqueId;
34 private List<String> instanceNames;
36 private List<ComponentDependency> dependencies;
38 public String getName() {
42 public void setName(String name) {
46 public String getVersion() {
50 public void setVersion(String version) {
51 this.version = version;
54 public String getUniqueId() {
58 public void setUniqueId(String uniqueId) {
59 this.uniqueId = uniqueId;
62 public String getType() {
66 public void setType(String type) {
70 public List<ComponentDependency> getDependencies() {
74 public String getIcon() {
78 public void setIcon(String icon) {
82 public String getState() {
86 public void setState(String state) {
90 public List<String> getInstanceNames() {
94 public void setInstanceNames(List<String> instanceNames) {
95 this.instanceNames = instanceNames;
98 public void setDependencies(List<ComponentDependency> dependencies) {
99 this.dependencies = dependencies;
101 public void addDependencies(List<ComponentDependency> dependencies) {
102 if ( this.dependencies == null ){
103 this.dependencies = new ArrayList<>();
105 this.dependencies.addAll(dependencies);
108 public void addDependency(ComponentDependency dependency){
109 if ( dependencies == null ){
110 dependencies = new ArrayList<>();
112 dependencies.add(dependency);