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;
 
  22 import org.camunda.bpm.engine.delegate.DelegateExecution;
 
  25  * This class is used to represent the Context used by {@ref ControllerRunnable}.
 
  27 public class ControllerContext<T> {
 
  30      * Action to be executed against controller.
 
  32      * e.g, healthcheck, scaleout, config-assign
 
  34      * Action is case insensitive.
 
  36     private String controllerAction;
 
  41      * e.g., CDS, SDNC, APPC.
 
  43      * actor name is case insensitive.
 
  45     private String controllerActor;
 
  48      * scope: PNF, VNF, VF.
 
  50     private String controllerScope;
 
  53      * Execution context, buildingblockExecution or DelegateExecution.
 
  57     public ControllerContext() {}
 
  59     public void setExecution(T execution) {
 
  60         this.execution = execution;
 
  63     public T getExecution() {
 
  67     public String getControllerAction() {
 
  68         return controllerAction;
 
  71     public void setControllerAction(String controllerAction) {
 
  72         this.controllerAction = controllerAction;
 
  75     public String getControllerActor() {
 
  76         return controllerActor;
 
  79     public void setControllerActor(String controllerActor) {
 
  80         this.controllerActor = controllerActor;
 
  83     public String getControllerScope() {
 
  84         return controllerScope;
 
  87     public void setControllerScope(String controllerScope) {
 
  88         this.controllerScope = controllerScope;
 
  91     public String toString() {
 
  92         return "Controller context for actor: " + controllerActor + ", action: " + controllerAction + ",scope: "