Sync Integ to Master
[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.AuditingFieldsKeysEnum;
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(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID.getDisplayName());
36         timestamp = (String) distributionStatusEvent.getFields().get(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_STATUS_TIME.getDisplayName());// distributionStatusEvent.getStatusTime();
37         url = (String) distributionStatusEvent.getFields().get(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL.getDisplayName());// distributionStatusEvent.getResoureURL();
38         status = (String) distributionStatusEvent.getFields().get(AuditingFieldsKeysEnum.AUDIT_STATUS.getDisplayName());// distributionStatusEvent.getStatus();
39         errorReason = (String) distributionStatusEvent.getFields().get(AuditingFieldsKeysEnum.AUDIT_DESC.getDisplayName());
40
41     }
42
43     public DistributionStatusInfo(String omfComponentID, String timestamp, String url, String status) {
44         super();
45         this.omfComponentID = omfComponentID;
46         this.timestamp = timestamp;
47         this.url = url;
48         this.status = status;
49     }
50
51     public String getOmfComponentID() {
52         return omfComponentID;
53     }
54
55     public void setOmfComponentID(String omfComponentID) {
56         this.omfComponentID = omfComponentID;
57     }
58
59     public String getTimestamp() {
60         return timestamp;
61     }
62
63     public void setTimestamp(String timestamp) {
64         this.timestamp = timestamp;
65     }
66
67     public String getUrl() {
68         return url;
69     }
70
71     public void setUrl(String url) {
72         this.url = url;
73     }
74
75     public String getStatus() {
76         return status;
77     }
78
79     public void setStatus(String status) {
80         this.status = status;
81     }
82
83     public String getErrorReason() {
84         return errorReason;
85     }
86
87     public void setErrorReason(String errorReason) {
88         this.errorReason = errorReason;
89     }
90
91 }