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