2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.policy.controlloop;
23 import java.io.Serializable;
24 import java.util.UUID;
26 public abstract class ControlLoopEvent implements Serializable {
28 private static final long serialVersionUID = 2391252138583119195L;
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;
37 private String policyScope;
38 private String policyName;
39 private String policyVersion;
40 private ControlLoopEventStatus closedLoopEventStatus;
42 public ControlLoopEvent() {
46 public ControlLoopEvent(ControlLoopEvent event) {
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;
62 public boolean isEventStatusValid() {
63 return this.closedLoopEventStatus != null;
66 public String getClosedLoopControlName() {
67 return closedLoopControlName;
70 public void setClosedLoopControlName(String closedLoopControlName) {
71 this.closedLoopControlName = closedLoopControlName;
74 public String getVersion() {
78 public void setVersion(String version) {
79 this.version = version;
82 public UUID getRequestID() {
86 public void setRequestID(UUID requestID) {
87 this.requestID = requestID;
90 public String getClosedLoopEventClient() {
91 return closedLoopEventClient;
94 public void setClosedLoopEventClient(String closedLoopEventClient) {
95 this.closedLoopEventClient = closedLoopEventClient;
98 public ControlLoopTargetType getTargetType() {
102 public void setTargetType(ControlLoopTargetType targetType) {
103 this.targetType = targetType;
106 public String getTarget() {
110 public void setTarget(String target) {
111 this.target = target;
114 public String getFrom() {
118 public void setFrom(String from) {
122 public String getPolicyScope() {
126 public void setPolicyScope(String policyScope) {
127 this.policyScope = policyScope;
130 public String getPolicyName() {
134 public void setPolicyName(String policyName) {
135 this.policyName = policyName;
138 public String getPolicyVersion() {
139 return policyVersion;
142 public void setPolicyVersion(String policyVersion) {
143 this.policyVersion = policyVersion;
146 public ControlLoopEventStatus getClosedLoopEventStatus() {
147 return closedLoopEventStatus;
150 public void setClosedLoopEventStatus(ControlLoopEventStatus closedLoopEventStatus) {
151 this.closedLoopEventStatus = closedLoopEventStatus;