1d85ccb77d23b73ba91f9ae0644f1bbdfa71bb5a
[policy/drools-applications.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * controlloop
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.controlloop;
22
23 import java.io.Serializable;
24 import java.util.UUID;
25
26 public abstract class ControlLoopEvent implements Serializable {
27         
28         private static final long serialVersionUID = 2391252138583119195L;
29         
30         private String closedLoopControlName;
31         private String version = "1.0.2";
32         private UUID requestID;
33         private String closedLoopEventClient;
34         private ControlLoopTargetType targetType;
35         private String target;
36         private String from;
37         private String policyScope;
38         private String policyName;
39         private String policyVersion;
40         private ControlLoopEventStatus closedLoopEventStatus;
41         
42         public ControlLoopEvent() {
43                 
44         }
45         
46         public ControlLoopEvent(ControlLoopEvent event) {
47                 if (event == null) {
48                         return;
49                 }
50                 this.closedLoopControlName = event.closedLoopControlName;
51                 this.requestID = event.requestID;
52                 this.closedLoopEventClient = event.closedLoopEventClient;
53                 this.targetType = event.targetType;
54                 this.target = event.target;
55                 this.from = event.from;
56                 this.policyScope = event.policyScope;
57                 this.policyName = event.policyName;
58                 this.policyVersion = event.policyVersion;
59                 this.closedLoopEventStatus = event.closedLoopEventStatus;
60         }
61
62         public boolean isEventStatusValid() {
63                 return this.closedLoopEventStatus != null;
64         }
65
66         public String getClosedLoopControlName() {
67                 return closedLoopControlName;
68         }
69
70         public void setClosedLoopControlName(String closedLoopControlName) {
71                 this.closedLoopControlName = closedLoopControlName;
72         }
73
74         public String getVersion() {
75                 return version;
76         }
77
78         public void setVersion(String version) {
79                 this.version = version;
80         }
81
82         public UUID getRequestID() {
83                 return requestID;
84         }
85
86         public void setRequestID(UUID requestID) {
87                 this.requestID = requestID;
88         }
89
90         public String getClosedLoopEventClient() {
91                 return closedLoopEventClient;
92         }
93
94         public void setClosedLoopEventClient(String closedLoopEventClient) {
95                 this.closedLoopEventClient = closedLoopEventClient;
96         }
97
98         public ControlLoopTargetType getTargetType() {
99                 return targetType;
100         }
101
102         public void setTargetType(ControlLoopTargetType targetType) {
103                 this.targetType = targetType;
104         }
105
106         public String getTarget() {
107                 return target;
108         }
109
110         public void setTarget(String target) {
111                 this.target = target;
112         }
113
114         public String getFrom() {
115                 return from;
116         }
117
118         public void setFrom(String from) {
119                 this.from = from;
120         }
121
122         public String getPolicyScope() {
123                 return policyScope;
124         }
125
126         public void setPolicyScope(String policyScope) {
127                 this.policyScope = policyScope;
128         }
129
130         public String getPolicyName() {
131                 return policyName;
132         }
133
134         public void setPolicyName(String policyName) {
135                 this.policyName = policyName;
136         }
137
138         public String getPolicyVersion() {
139                 return policyVersion;
140         }
141
142         public void setPolicyVersion(String policyVersion) {
143                 this.policyVersion = policyVersion;
144         }
145
146         public ControlLoopEventStatus getClosedLoopEventStatus() {
147                 return closedLoopEventStatus;
148         }
149
150         public void setClosedLoopEventStatus(ControlLoopEventStatus closedLoopEventStatus) {
151                 this.closedLoopEventStatus = closedLoopEventStatus;
152         }
153 }