2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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 * ================================================================================
23 package org.openecomp.sdc.be.info;
25 import org.openecomp.sdc.be.resources.data.auditing.AuditingGenericEvent;
26 import org.openecomp.sdc.common.datastructure.AuditingFieldsKey;
28 public class DistributionStatusInfo {
30 private String omfComponentID;
31 private String timestamp;
33 private String status;
34 private String errorReason;
36 DistributionStatusInfo() {
39 public DistributionStatusInfo(AuditingGenericEvent distributionStatusEvent) {
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()));
48 public DistributionStatusInfo(String omfComponentID, String timestamp, String url, String status) {
49 this.omfComponentID = omfComponentID;
50 this.timestamp = timestamp;
55 public String getOmfComponentID() {
56 return omfComponentID;
59 public void setOmfComponentID(String omfComponentID) {
60 this.omfComponentID = omfComponentID;
63 public String getTimestamp() {
67 public void setTimestamp(String timestamp) {
68 this.timestamp = timestamp;
71 public String getUrl() {
75 public void setUrl(String url) {
79 public String getStatus() {
83 public void setStatus(String status) {
87 public String getErrorReason() {
91 public void setErrorReason(String errorReason) {
92 this.errorReason = errorReason;