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