Added oparent to sdc main
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / ComponentDependency.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.openecomp.sdc.be.model;
22
23 import java.util.ArrayList;
24 import java.util.List;
25
26
27 public class ComponentDependency {
28     private String name;
29     private String version;
30     private String uniqueId;
31     private String type;
32     private String icon;
33     private String state;
34     private List<String> instanceNames;
35     
36     private List<ComponentDependency> dependencies;
37
38     public String getName() {
39         return name;
40     }
41
42     public void setName(String name) {
43         this.name = name;
44     }
45
46     public String getVersion() {
47         return version;
48     }
49
50     public void setVersion(String version) {
51         this.version = version;
52     }
53
54     public String getUniqueId() {
55         return uniqueId;
56     }
57
58     public void setUniqueId(String uniqueId) {
59         this.uniqueId = uniqueId;
60     }
61
62     public String getType() {
63         return type;
64     }
65
66     public void setType(String type) {
67         this.type = type;
68     }
69
70     public List<ComponentDependency> getDependencies() {
71         return dependencies;
72     }
73
74     public String getIcon() {
75         return icon;
76     }
77
78     public void setIcon(String icon) {
79         this.icon = icon;
80     }
81
82     public String getState() {
83         return state;
84     }
85
86     public void setState(String state) {
87         this.state = state;
88     }
89
90     public List<String> getInstanceNames() {
91         return instanceNames;
92     }
93
94     public void setInstanceNames(List<String> instanceNames) {
95         this.instanceNames = instanceNames;
96     }
97
98     public void setDependencies(List<ComponentDependency> dependencies) {
99         this.dependencies = dependencies;
100     }
101     public void addDependencies(List<ComponentDependency> dependencies) {
102         if ( this.dependencies == null ){
103             this.dependencies = new ArrayList<>();
104         }
105         this.dependencies.addAll(dependencies);
106    }
107
108     public void addDependency(ComponentDependency dependency){
109         if ( dependencies == null ){
110             dependencies = new ArrayList<>();
111         }
112         dependencies.add(dependency);
113     }
114 }