re base code
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / Product.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
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 org.openecomp.sdc.be.datatypes.elements.ProductMetadataDataDefinition;
24 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
25
26 import java.util.List;
27
28 public class Product extends Component {
29
30     public Product() {
31         super(new ProductMetadataDefinition());
32         this.getComponentMetadataDefinition().getMetadataDataDefinition().setComponentType(ComponentTypeEnum.PRODUCT);
33     }
34
35     public Product(ProductMetadataDefinition productMetadataDefinition) {
36         super(productMetadataDefinition);
37         this.getComponentMetadataDefinition().getMetadataDataDefinition().setComponentType(ComponentTypeEnum.PRODUCT);
38     }
39
40     public String getFullName() {
41         return getProductMetadataDefinition().getFullName();
42     }
43
44     public void setFullName(String fullName) {
45         getProductMetadataDefinition().setFullName(fullName);
46     }
47
48     public String getInvariantUUID() {
49         return getProductMetadataDefinition().getInvariantUUID();
50     }
51
52     public void setInvariantUUID(String invariantUUID) {
53         getProductMetadataDefinition().setInvariantUUID(invariantUUID);
54     }
55
56     public List<String> getContacts() {
57         return getProductMetadataDefinition().getContacts();
58     }
59
60     public void setContacts(List<String> contacts) {
61         getProductMetadataDefinition().setContacts(contacts);
62     }
63
64     public void addContact(String contact) {
65         getProductMetadataDefinition().addContact(contact);
66     }
67
68     public Boolean getIsActive() {
69         return getProductMetadataDefinition().getIsActive();
70     }
71
72     public void setIsActive(Boolean isActive) {
73         getProductMetadataDefinition().setIsActive(isActive);
74     }
75
76     private ProductMetadataDataDefinition getProductMetadataDefinition() {
77         return (ProductMetadataDataDefinition) getComponentMetadataDefinition().getMetadataDataDefinition();
78     }
79
80 }