2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2018 Ericsson. All rights reserved.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.distribution.reception.handling.sdc;
23 import org.onap.sdc.utils.DistributionStatusEnum;
26 * This class builds an instance of {@link ComponentDoneStatusMessage} class.
28 * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
30 public class ComponentDoneStatusMessageBuilder {
32 private String consumerId;
33 private String distributionId;
34 private DistributionStatusEnum distributionStatus;
35 private long timestamp;
38 * Returns consumer id of this {@link ComponentDoneStatusMessageBuilder} instance.
40 * @return the consumerId
42 public String getConsumerId() {
47 * Returns distribution id of this {@link ComponentDoneStatusMessageBuilder} instance.
49 * @return the distributionId
51 public String getDistributionId() {
52 return distributionId;
56 * Returns distribution status of this {@link ComponentDoneStatusMessageBuilder} instance.
58 * @return the distributionStatus
60 public DistributionStatusEnum getDistributionStatus() {
61 return distributionStatus;
65 * Returns time of this {@link ComponentDoneStatusMessageBuilder} instance.
67 * @return the timestamp
69 public long getTimestamp() {
74 * Set consumer id url to this {@link ComponentDoneStatusMessageBuilder} instance.
76 * @param consumerId the consumerId to set
78 public ComponentDoneStatusMessageBuilder setConsumerId(final String consumerId) {
79 this.consumerId = consumerId;
84 * Set distribution id to this {@link ComponentDoneStatusMessageBuilder} instance.
86 * @param distributionId the distributionId to set
88 public ComponentDoneStatusMessageBuilder setDistributionId(final String distributionId) {
89 this.distributionId = distributionId;
94 * Set distribution status to this {@link ComponentDoneStatusMessageBuilder} instance.
96 * @param distributionStatus the distributionStatus to set
98 public ComponentDoneStatusMessageBuilder setDistributionStatus(final DistributionStatusEnum distributionStatus) {
99 this.distributionStatus = distributionStatus;
104 * Set time to this {@link ComponentDoneStatusMessageBuilder} instance.
106 * @param timestamp the timestamp to set
108 public ComponentDoneStatusMessageBuilder setTimestamp(final long timestamp) {
109 this.timestamp = timestamp;