2 * ============LICENSE_START=======================================================
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
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=========================================================
20 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 package org.openecomp.appc.transactionrecorder.objects;
25 import java.time.Instant;
28 public class TransactionRecord {
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)
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;
53 public Instant getTimeStamp() {
57 public void setTimeStamp(Instant timeStamp) {
58 this.timeStamp = timeStamp;
61 public String getRequestID() {
65 public void setRequestID(String requestID) {
66 this.requestID = requestID;
69 public Instant getStartTime() {
73 public void setStartTime(Instant startTime) {
74 this.startTime = startTime;
77 public Instant getEndTime() {
81 public void setEndTime(Instant endTime) {
82 this.endTime = endTime;
85 public String getTargetID() {
89 public void setTargetID(String targetID) {
90 this.targetID = targetID;
93 public String getTargetType() {
97 public void setTargetType(String targetType) {
98 this.targetType = targetType;
101 public String getSubComponent() {
105 public void setSubComponent(String subComponent) {
106 this.subComponent = subComponent;
109 public String getOperation() {
113 public void setOperation(String operation) {
114 this.operation = operation;
117 public String getResultCode() {
121 public void setResultCode(String resultCode) {
122 this.resultCode = resultCode;
125 public String getDescription() {
129 public void setDescription(String description) {
130 this.description = description;
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 + '\'' +