2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
22 package org.openecomp.appc.transactionrecorder.objects;
24 import java.time.Instant;
27 public class TransactionRecord {
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)
41 private Instant timeStamp;
42 private String requestID;
43 private Instant startTime;
44 private Instant 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;
52 public Instant getTimeStamp() {
56 public void setTimeStamp(Instant timeStamp) {
57 this.timeStamp = timeStamp;
60 public String getRequestID() {
64 public void setRequestID(String requestID) {
65 this.requestID = requestID;
68 public Instant getStartTime() {
72 public void setStartTime(Instant startTime) {
73 this.startTime = startTime;
76 public Instant getEndTime() {
80 public void setEndTime(Instant endTime) {
81 this.endTime = endTime;
84 public String getTargetID() {
88 public void setTargetID(String targetID) {
89 this.targetID = targetID;
92 public String getTargetType() {
96 public void setTargetType(String targetType) {
97 this.targetType = targetType;
100 public String getSubComponent() {
104 public void setSubComponent(String subComponent) {
105 this.subComponent = subComponent;
108 public String getOperation() {
112 public void setOperation(String operation) {
113 this.operation = operation;
116 public String getResultCode() {
120 public void setResultCode(String resultCode) {
121 this.resultCode = resultCode;
124 public String getDescription() {
128 public void setDescription(String description) {
129 this.description = description;
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 + '\'' +