Catalog alignment
[sdc.git] / catalog-be / src / main / java / org / openecomp / sdc / be / info / DistributionStatusInfo.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  * Modifications copyright (c) 2019 Nokia
20  * ================================================================================
21  */
22
23 package org.openecomp.sdc.be.info;
24
25 import org.openecomp.sdc.be.resources.data.auditing.AuditingGenericEvent;
26 import org.openecomp.sdc.common.datastructure.AuditingFieldsKey;
27
28 public class DistributionStatusInfo {
29
30     private String omfComponentID;
31     private String timestamp;
32     private String url;
33     private String status;
34     private String errorReason;
35
36     DistributionStatusInfo() {
37     }
38
39     public DistributionStatusInfo(AuditingGenericEvent distributionStatusEvent) {
40         super();
41         omfComponentID = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_CONSUMER_ID.getDisplayName()));
42         timestamp = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_STATUS_TIME.getDisplayName()));
43         url = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_RESOURCE_URL.getDisplayName()));
44         status = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_STATUS.getDisplayName()));
45         errorReason = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DESC.getDisplayName()));
46     }
47
48     public DistributionStatusInfo(String omfComponentID, String timestamp, String url, String status) {
49         this.omfComponentID = omfComponentID;
50         this.timestamp = timestamp;
51         this.url = url;
52         this.status = status;
53     }
54
55     public String getOmfComponentID() {
56         return omfComponentID;
57     }
58
59     public void setOmfComponentID(String omfComponentID) {
60         this.omfComponentID = omfComponentID;
61     }
62
63     public String getTimestamp() {
64         return timestamp;
65     }
66
67     public void setTimestamp(String timestamp) {
68         this.timestamp = timestamp;
69     }
70
71     public String getUrl() {
72         return url;
73     }
74
75     public void setUrl(String url) {
76         this.url = url;
77     }
78
79     public String getStatus() {
80         return status;
81     }
82
83     public void setStatus(String status) {
84         this.status = status;
85     }
86
87     public String getErrorReason() {
88         return errorReason;
89     }
90
91     public void setErrorReason(String errorReason) {
92         this.errorReason = errorReason;
93     }
94
95 }