Catalog alignment
[sdc.git] / catalog-be / src / main / java / org / openecomp / sdc / be / components / distribution / engine / DistributionStatusNotification.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.components.distribution.engine;
22
23 public class DistributionStatusNotification {
24
25     String distributionID;
26     String consumerID;
27     long timestamp;
28     String artifactURL;
29     DistributionStatusNotificationEnum status;
30     String errorReason;
31
32     public String getDistributionID() {
33         return distributionID;
34     }
35
36     public void setDistributionID(String distributionId) {
37         this.distributionID = distributionId;
38     }
39
40     public String getConsumerID() {
41         return consumerID;
42     }
43
44     public void setConsumerID(String consumerId) {
45         this.consumerID = consumerId;
46     }
47
48     public long getTimestamp() {
49         return timestamp;
50     }
51
52     public void setTimestamp(long timestamp) {
53         this.timestamp = timestamp;
54     }
55
56     public String getArtifactURL() {
57         return artifactURL;
58     }
59
60     public void setArtifactURL(String artifactURL) {
61         this.artifactURL = artifactURL;
62     }
63
64     public DistributionStatusNotificationEnum getStatus() {
65         return status;
66     }
67
68     public void setStatus(DistributionStatusNotificationEnum status) {
69         this.status = status;
70     }
71
72     public String getErrorReason() {
73         return errorReason;
74     }
75
76     public void setErrorReason(String errorReason) {
77         this.errorReason = errorReason;
78     }
79
80     public boolean isDistributionCompleteNotification() {
81         return DistributionStatusNotificationEnum.DISTRIBUTION_COMPLETE_OK == status || DistributionStatusNotificationEnum.DISTRIBUTION_COMPLETE_ERROR == status;
82     }
83
84     @Override
85     public String toString() {
86         return "DistributionStatusNotification [distributionId=" + distributionID + ", consumerId=" + consumerID + ", timestamp=" + timestamp + ", artifactURL=" + artifactURL + ", status=" + status + ", errorReason=" + errorReason + "]";
87     }
88 }