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=========================================================
21 package org.openecomp.sdc.be.info;
23 import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum;
24 import org.openecomp.sdc.common.datastructure.ESTimeBasedEvent;
26 public class DistributionStatusInfo {
27 String omfComponentID;
33 public DistributionStatusInfo(ESTimeBasedEvent distributionStatusEvent) {
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());
43 public DistributionStatusInfo(String omfComponentID, String timestamp, String url, String status) {
45 this.omfComponentID = omfComponentID;
46 this.timestamp = timestamp;
51 public String getOmfComponentID() {
52 return omfComponentID;
55 public void setOmfComponentID(String omfComponentID) {
56 this.omfComponentID = omfComponentID;
59 public String getTimestamp() {
63 public void setTimestamp(String timestamp) {
64 this.timestamp = timestamp;
67 public String getUrl() {
71 public void setUrl(String url) {
75 public String getStatus() {
79 public void setStatus(String status) {
83 public String getErrorReason() {
87 public void setErrorReason(String errorReason) {
88 this.errorReason = errorReason;