2 * ============LICENSE_START=======================================================
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 * ============LICENSE_END=========================================================
25 package org.onap.appc.transactionrecorder.objects;
27 import java.time.Instant;
30 public class TransactionRecord {
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)
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;
55 public Instant getTimeStamp() {
59 public void setTimeStamp(Instant timeStamp) {
60 this.timeStamp = timeStamp;
63 public String getRequestID() {
67 public void setRequestID(String requestID) {
68 this.requestID = requestID;
71 public Instant getStartTime() {
75 public void setStartTime(Instant startTime) {
76 this.startTime = startTime;
79 public Instant getEndTime() {
83 public void setEndTime(Instant endTime) {
84 this.endTime = endTime;
87 public String getTargetID() {
91 public void setTargetID(String targetID) {
92 this.targetID = targetID;
95 public String getTargetType() {
99 public void setTargetType(String targetType) {
100 this.targetType = targetType;
103 public String getSubComponent() {
107 public void setSubComponent(String subComponent) {
108 this.subComponent = subComponent;
111 public String getOperation() {
115 public void setOperation(String operation) {
116 this.operation = operation;
119 public String getResultCode() {
123 public void setResultCode(String resultCode) {
124 this.resultCode = resultCode;
127 public String getDescription() {
131 public void setDescription(String description) {
132 this.description = description;
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 + '\'' +