445d7a85a80ec8c8f0e41970909c70c75e0c002a
[appc.git] / appc-dispatcher / appc-dispatcher-common / transaction-recorder / src / main / java / org / openecomp / appc / transactionrecorder / objects / TransactionRecord.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * Copyright (C) 2017 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  * 
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  * 
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21  */
22
23 package org.openecomp.appc.transactionrecorder.objects;
24
25 import java.time.Instant;
26
27
28 public class TransactionRecord {
29
30    /*
31 - Timestamp = RequestHandlerInput.RequestHeader.timeStamp
32 - Request ID = RequestHandlerInput.RequestHeader.requestID
33 - Start time = from flow
34 - End time = from flow
35 - VF_ID = RequestHandlerInput.targetID
36 - VF_type = genericVnf.getVnfType()
37 - Sub-component (optional) e.g. VFC_ID/VM UUID  - ???? empty
38 - Operation e.g. Start, Configure etc.  = CommandContext.Command
39 - Result - Success/Error code + description,as published to the initiator RequestHandlerResponse.ACCEPTED/RequestHandlerResponse.REJECTED + String (description)
40     */
41
42     private Instant timeStamp;
43     private String requestID;
44     private Instant startTime;
45     private Instant endTime;
46     private String targetID;
47     private String targetType;
48     private String subComponent;
49     private String operation;
50     private String resultCode;
51     private String description;
52
53     public Instant getTimeStamp() {
54         return timeStamp;
55     }
56
57     public void setTimeStamp(Instant timeStamp) {
58         this.timeStamp = timeStamp;
59     }
60
61     public String getRequestID() {
62         return requestID;
63     }
64
65     public void setRequestID(String requestID) {
66         this.requestID = requestID;
67     }
68
69     public Instant getStartTime() {
70         return startTime;
71     }
72
73     public void setStartTime(Instant startTime) {
74         this.startTime = startTime;
75     }
76
77     public Instant getEndTime() {
78         return endTime;
79     }
80
81     public void setEndTime(Instant endTime) {
82         this.endTime = endTime;
83     }
84
85     public String getTargetID() {
86         return targetID;
87     }
88
89     public void setTargetID(String targetID) {
90         this.targetID = targetID;
91     }
92
93     public String getTargetType() {
94         return targetType;
95     }
96
97     public void setTargetType(String targetType) {
98         this.targetType = targetType;
99     }
100
101     public String getSubComponent() {
102         return subComponent;
103     }
104
105     public void setSubComponent(String subComponent) {
106         this.subComponent = subComponent;
107     }
108
109     public String getOperation() {
110         return operation;
111     }
112
113     public void setOperation(String operation) {
114         this.operation = operation;
115     }
116
117     public String getResultCode() {
118         return resultCode;
119     }
120
121     public void setResultCode(String resultCode) {
122         this.resultCode = resultCode;
123     }
124
125     public String getDescription() {
126         return description;
127     }
128
129     public void setDescription(String description) {
130         this.description = description;
131     }
132
133     @Override
134     public String toString() {
135         return "TransactionRecord{" +
136                 "timeStamp=" + timeStamp +
137                 ", requestID='" + requestID + '\'' +
138                 ", startTime=" + startTime +
139                 ", endTime=" + endTime +
140                 ", targetID='" + targetID + '\'' +
141                 ", targetType='" + targetType + '\'' +
142                 ", subComponent='" + subComponent + '\'' +
143                 ", operation='" + operation + '\'' +
144                 ", resultCode='" + resultCode + '\'' +
145                 ", description='" + description + '\'' +
146                 '}';
147     }
148 }