Change nexus values to properties
[appc.git] / appc-dispatcher / appc-dispatcher-common / transaction-recorder / src / main / java / org / openecomp / appc / transactionrecorder / objects / TransactionRecord.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * openECOMP : APP-C
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights
6  *                                              reserved.
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  */
21
22 package org.openecomp.appc.transactionrecorder.objects;
23
24 import java.util.Date;
25
26
27 public class TransactionRecord {
28
29    /*
30 - Timestamp = RequestHandlerInput.RequestHeader.timeStamp
31 - Request ID = RequestHandlerInput.RequestHeader.requestID
32 - Start time = from flow
33 - End time = from flow
34 - VF_ID = RequestHandlerInput.targetID
35 - VF_type = genericVnf.getVnfType()
36 - Sub-component (optional) e.g. VFC_ID/VM UUID  - ???? empty
37 - Operation e.g. Start, Configure etc.  = CommandContext.Command
38 - Result - Success/Error code + description,as published to the initiator RequestHandlerResponse.ACCEPTED/RequestHandlerResponse.REJECTED + String (description)
39     */
40
41     private Date timeStamp;
42     private String requestID;
43     private Date startTime;
44     private Date endTime;
45     private String targetID;
46     private String targetType;
47     private String subComponent;
48     private String operation;
49     private String resultCode;
50     private String description;
51
52     public Date getTimeStamp() {
53         return timeStamp;
54     }
55
56     public void setTimeStamp(Date timeStamp) {
57         this.timeStamp = timeStamp;
58     }
59
60     public String getRequestID() {
61         return requestID;
62     }
63
64     public void setRequestID(String requestID) {
65         this.requestID = requestID;
66     }
67
68     public Date getStartTime() {
69         return startTime;
70     }
71
72     public void setStartTime(Date startTime) {
73         this.startTime = startTime;
74     }
75
76     public Date getEndTime() {
77         return endTime;
78     }
79
80     public void setEndTime(Date endTime) {
81         this.endTime = endTime;
82     }
83
84     public String getTargetID() {
85         return targetID;
86     }
87
88     public void setTargetID(String targetID) {
89         this.targetID = targetID;
90     }
91
92     public String getTargetType() {
93         return targetType;
94     }
95
96     public void setTargetType(String targetType) {
97         this.targetType = targetType;
98     }
99
100     public String getSubComponent() {
101         return subComponent;
102     }
103
104     public void setSubComponent(String subComponent) {
105         this.subComponent = subComponent;
106     }
107
108     public String getOperation() {
109         return operation;
110     }
111
112     public void setOperation(String operation) {
113         this.operation = operation;
114     }
115
116     public String getResultCode() {
117         return resultCode;
118     }
119
120     public void setResultCode(String resultCode) {
121         this.resultCode = resultCode;
122     }
123
124     public String getDescription() {
125         return description;
126     }
127
128     public void setDescription(String description) {
129         this.description = description;
130     }
131
132     @Override
133     public String toString() {
134         return "TransactionRecord{" +
135                 "timeStamp=" + timeStamp +
136                 ", requestID='" + requestID + '\'' +
137                 ", startTime=" + startTime +
138                 ", endTime=" + endTime +
139                 ", targetID='" + targetID + '\'' +
140                 ", targetType='" + targetType + '\'' +
141                 ", subComponent='" + subComponent + '\'' +
142                 ", operation='" + operation + '\'' +
143                 ", resultCode='" + resultCode + '\'' +
144                 ", description='" + description + '\'' +
145                 '}';
146     }
147 }