e6c0a2d7aec108cc180171b18149b56564f9ff12
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / ui / model / UiServiceMetadata.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.ui.model;
21
22 import java.util.List;
23 import java.util.Map;
24 import lombok.Getter;
25 import lombok.Setter;
26 import org.openecomp.sdc.be.datatypes.components.ServiceMetadataDataDefinition;
27 import org.openecomp.sdc.be.model.category.CategoryDefinition;
28
29 @Getter
30 @Setter
31 public class UiServiceMetadata extends UiComponentMetadata {
32
33     private String distributionStatus;
34     private Boolean ecompGeneratedNaming;
35     private String namingPolicy;
36     private String serviceType;
37     private String serviceRole;
38     private String environmentContext;
39     private String instantiationType;
40     private String serviceFunction;
41     private Map<String, String> categorySpecificMetadata;
42
43     public UiServiceMetadata(List<CategoryDefinition> categories, ServiceMetadataDataDefinition metadata) {
44         super(categories, metadata);
45         this.distributionStatus = metadata.getDistributionStatus();
46         this.ecompGeneratedNaming = metadata.isEcompGeneratedNaming();
47         this.namingPolicy = metadata.getNamingPolicy();
48         this.serviceType = metadata.getServiceType();
49         this.serviceRole = metadata.getServiceRole();
50         this.environmentContext = metadata.getEnvironmentContext();
51         this.instantiationType = metadata.getInstantiationType();
52         this.serviceFunction = metadata.getServiceFunction();
53         this.categorySpecificMetadata = metadata.getCategorySpecificMetadata();
54     }
55 }