Implement support for v10 model entities.
[aai/model-loader.git] / src / main / java / org / openecomp / modelloader / notification / DistributionStatusMsg.java
1 /**\r
2  * ============LICENSE_START=======================================================\r
3  * Model Loader\r
4  * ================================================================================\r
5  * Copyright © 2017 AT&T Intellectual Property.\r
6  * Copyright © 2017 Amdocs\r
7  * All rights reserved.\r
8  * ================================================================================\r
9  * Licensed under the Apache License, Version 2.0 (the "License");\r
10  * you may not use this file except in compliance with the License.\r
11  * You may obtain a copy of the License at\r
12  * http://www.apache.org/licenses/LICENSE-2.0\r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END=========================================================\r
19  *\r
20  * ECOMP and OpenECOMP are trademarks\r
21  * and service marks of AT&T Intellectual Property.\r
22  */\r
23 package org.openecomp.modelloader.notification;\r
24 \r
25 import org.openecomp.sdc.api.consumer.IDistributionStatusMessage;\r
26 import org.openecomp.sdc.utils.DistributionStatusEnum;\r
27 \r
28 public class DistributionStatusMsg implements IDistributionStatusMessage {\r
29   private DistributionStatusEnum status;\r
30   private String distributionId;\r
31   private String consumerId;\r
32   private String artifactUrl;\r
33 \r
34   /**\r
35    * Creates a new DistributionStatusMsg instance.\r
36    * \r
37    * @param status         - The distribution status to be reported.\r
38    * @param distributionId - The identifier of the distribution who's status is being rported on.\r
39    * @param consumerId     - Identifier of the consumer associated with the distribution.\r
40    * @param artifactUrl    - Resource identifier for the artifact.\r
41    */\r
42   public DistributionStatusMsg(DistributionStatusEnum status, \r
43                                String distributionId,\r
44                                String consumerId, \r
45                                String artifactUrl) {\r
46     this.status = status;\r
47     this.distributionId = distributionId;\r
48     this.consumerId = consumerId;\r
49     this.artifactUrl = artifactUrl;\r
50   }\r
51 \r
52   @Override\r
53   public long getTimestamp() {\r
54     long currentTimeMillis = System.currentTimeMillis();\r
55     return currentTimeMillis;\r
56   }\r
57 \r
58   @Override\r
59   public DistributionStatusEnum getStatus() {\r
60     return status;\r
61   }\r
62 \r
63   @Override\r
64   public String getDistributionID() {\r
65     return distributionId;\r
66   }\r
67 \r
68   @Override\r
69   public String getConsumerID() {\r
70     return consumerId;\r
71   }\r
72   \r
73   @Override\r
74   public String getArtifactURL() {\r
75     return artifactUrl;\r
76   }\r
77 }\r