2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2019 Nordix
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 * SPDX-License-Identifier: Apache-2.0
17 * ============LICENSE_END=========================================================
19 package org.onap.so.bpmn.infrastructure.decisionpoint.api;
21 import org.camunda.bpm.engine.delegate.DelegateExecution;
24 * This class is used to represent the Context used by {@ref ControllerRunnable}.
26 public class ControllerContext<T> {
29 * Action to be executed against controller.
31 * e.g, healthcheck, scaleout, config-assign
33 * Action is case insensitive.
35 private String controllerAction;
40 * e.g., CDS, SDNC, APPC.
42 * actor name is case insensitive.
44 private String controllerActor;
47 * scope: PNF, VNF, VF.
49 private String controllerScope;
52 * Execution context, buildingblockExecution or DelegateExecution.
56 public ControllerContext() {}
58 public void setExecution(T execution) {
59 this.execution = execution;
62 public T getExecution() {
66 public String getControllerAction() {
67 return controllerAction;
70 public void setControllerAction(String controllerAction) {
71 this.controllerAction = controllerAction;
74 public String getControllerActor() {
75 return controllerActor;
78 public void setControllerActor(String controllerActor) {
79 this.controllerActor = controllerActor;
82 public String getControllerScope() {
83 return controllerScope;
86 public void setControllerScope(String controllerScope) {
87 this.controllerScope = controllerScope;
90 public String toString() {
91 return "Controller context for actor: " + controllerActor + ", action: " + controllerAction + ",scope: "