Fix sonar issues for APPC
[appc.git] / appc-dispatcher / appc-dispatcher-common / domain-model-lib / src / main / java / org / onap / appc / domainmodel / lcm / RuntimeContext.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.domainmodel.lcm;
26
27 import java.time.Instant;
28
29
30 public class RuntimeContext {
31
32     private RequestContext requestContext;
33     private ResponseContext responseContext;
34     private VNFContext vnfContext;
35
36     //TODO move fields timeStart abd isLockAcquired to a better place
37     private Instant timeStart;
38     private boolean isLockAcquired;
39     private String rpcName;
40
41     public String getRpcName() {
42         return rpcName;
43     }
44
45     public void setRpcName(String rpcName) {
46         this.rpcName = rpcName;
47     }
48
49     public Instant getTimeStart() {
50         return timeStart;
51     }
52
53     public boolean isLockAcquired() {
54         return isLockAcquired;
55     }
56
57     public void setIsLockAcquired(boolean isLockAcquired) {
58         this.isLockAcquired = isLockAcquired;
59     }
60
61     public void setTimeStart(Instant timeStart) {
62         this.timeStart = timeStart;
63     }
64
65     public RequestContext getRequestContext() {
66         return requestContext;
67     }
68
69     public void setRequestContext(RequestContext requestContext) {
70         this.requestContext = requestContext;
71     }
72
73     public ResponseContext getResponseContext() {
74         return responseContext;
75     }
76
77     public void setResponseContext(ResponseContext responseContext) {
78         this.responseContext = responseContext;
79     }
80
81     public VNFContext getVnfContext() {
82         return vnfContext;
83     }
84
85     public void setVnfContext(VNFContext vnfContext) {
86         this.vnfContext = vnfContext;
87     }
88
89     @Override
90     public String toString() {
91         return "RuntimeContext{" +
92                 "requestContext=" + requestContext +
93                 ", responseContext=" + responseContext +
94                 ", vnfContext=" + vnfContext +
95                 ", timeStart=" + timeStart +
96                 ", isLockAcquired=" + isLockAcquired +
97                 ", rpcName='" + rpcName + '\'' +
98                 '}';
99     }
100 }