Catalog alignment
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / catalog / CatalogComponent.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.catalog;
22
23 import static java.util.Objects.requireNonNull;
24
25 import java.util.ArrayList;
26 import java.util.Collections;
27 import java.util.List;
28
29 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
30 import org.openecomp.sdc.be.model.category.CategoryDefinition;
31
32 import com.google.common.collect.ImmutableList;
33
34 public class CatalogComponent {
35
36     private String version;
37     private ComponentTypeEnum componentType;
38     private String icon;
39     private String uniqueId;
40     private String lifecycleState;
41     private long lastUpdateDate;
42     private String name;
43     private String resourceType;
44     private String categoryNormalizedName;
45     private String subCategoryNormalizedName;
46     private String distributionStatus;
47     private String uuid;
48     private String invariantUUID;
49     private String systemName;
50     private String description;
51     private List<String> tags;
52     private Boolean isHighestVersion;
53     private String lastUpdaterUserId;
54    
55
56     private List<CategoryDefinition> categories;
57    
58
59     public String getUuid() {
60         return uuid;
61     }
62
63     public void setUuid(String uuid) {
64         this.uuid = uuid;
65     }
66
67  
68     public String getInvariantUUID() {
69         return invariantUUID;
70     }
71
72     public void setInvariantUUID(String invariantUUID) {
73         this.invariantUUID = invariantUUID;
74     }
75
76     public String getSystemName() {
77         return systemName;
78     }
79
80     public void setSystemName(String systemName) {
81         this.systemName = systemName;
82     }
83
84     public String getDescription() {
85         return description;
86     }
87
88     public void setDescription(String description) {
89         this.description = description;
90     }
91
92   
93     public Boolean getIsHighestVersion() {
94         return isHighestVersion;
95     }
96
97     public void setIsHighestVersion(Boolean isHighestVersion) {
98         this.isHighestVersion = isHighestVersion;
99     }
100
101     public String getCategoryNormalizedName() {
102         return categoryNormalizedName;
103     }
104
105     public void setCategoryNormalizedName(String categoryNormalizedName) {
106         this.categoryNormalizedName = categoryNormalizedName;
107     }
108
109     public String getSubCategoryNormalizedName() {
110         return subCategoryNormalizedName;
111     }
112
113     public void setSubCategoryNormalizedName(String subCategoryNormalizedName) {
114         this.subCategoryNormalizedName = subCategoryNormalizedName;
115     }
116
117     public String getResourceType() {
118         return resourceType;
119     }
120
121     public void setResourceType(String resourceType) {
122         this.resourceType = resourceType;
123     }
124
125     public String getName() {
126         return name;
127     }
128
129     public void setName(String name) {
130         this.name = name;
131     }
132
133     public long getLastUpdateDate() {
134         return lastUpdateDate;
135     }
136
137     public void setLastUpdateDate(long lastUpdateDate) {
138         this.lastUpdateDate = lastUpdateDate;
139     }
140
141     public void setVersion(String version) {
142         this.version = version;
143     }
144
145     public void setComponentType(ComponentTypeEnum componentType) {
146         this.componentType = componentType;
147     }
148
149     public void setIcon(String icon) {
150         this.icon = icon;
151     }
152
153     public void setUniqueId(String uniqueId) {
154         this.uniqueId = uniqueId;
155     }
156
157     public String getVersion() {
158         return version;
159     }
160
161     public ComponentTypeEnum getComponentType() {
162         return componentType;
163     }
164
165     public String getIcon() {
166         return icon;
167     }
168
169     public String getUniqueId() {
170         return uniqueId;
171     }
172
173     public String getLifecycleState() {
174         return lifecycleState;
175     }
176
177     public void setLifecycleState(String lifecycleState) {
178         this.lifecycleState = lifecycleState;
179     }
180
181     public String getDistributionStatus() {
182         return distributionStatus;
183     }
184
185     public void setDistributionStatus(String distributionStatus) {
186         this.distributionStatus = distributionStatus;
187     }
188
189     public List<String> getTags() {
190         return tags == null ? Collections.emptyList() : ImmutableList.copyOf(tags);
191     }
192
193     public void setTags(List<String> tags) {
194         requireNonNull(tags);
195         this.tags = new ArrayList<>(tags);
196     }
197
198     public List<CategoryDefinition> getCategories() {
199         return categories == null ? Collections.emptyList() : ImmutableList.copyOf(categories);
200     }
201
202     public void setCategories(List<CategoryDefinition> categories) {        
203         this.categories = categories;
204     }
205
206     public String getLastUpdaterUserId() {
207         return lastUpdaterUserId;
208     }
209
210     public void setLastUpdaterUserId(String lastUpdaterUserId) {
211         this.lastUpdaterUserId = lastUpdaterUserId;
212     }
213 }