Reformat catalog-model
[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 package org.openecomp.sdc.be.model;
21
22 import java.util.List;
23 import org.openecomp.sdc.be.datatypes.elements.ProductMetadataDataDefinition;
24 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
25
26 public class Product extends Component {
27
28     public Product() {
29         super(new ProductMetadataDefinition());
30         this.getComponentMetadataDefinition().getMetadataDataDefinition().setComponentType(ComponentTypeEnum.PRODUCT);
31     }
32
33     public Product(ProductMetadataDefinition productMetadataDefinition) {
34         super(productMetadataDefinition);
35         this.getComponentMetadataDefinition().getMetadataDataDefinition().setComponentType(ComponentTypeEnum.PRODUCT);
36     }
37
38     public String getFullName() {
39         return getProductMetadataDefinition().getFullName();
40     }
41
42     public void setFullName(String fullName) {
43         getProductMetadataDefinition().setFullName(fullName);
44     }
45
46     @Override
47     public String getInvariantUUID() {
48         return getProductMetadataDefinition().getInvariantUUID();
49     }
50
51     @Override
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 }