2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2016-2018 Ericsson. All rights reserved.
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
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.apex.client.editor.rest.handling.bean;
23 import java.util.Arrays;
26 import javax.xml.bind.annotation.XmlType;
32 public class BeanState extends BeanBase {
34 private String name = null;
35 private BeanKeyRef trigger = null;
36 private BeanKeyRef defaultTask = null;
37 private BeanKeyRef[] contexts = null;
38 private BeanLogic taskSelectionLogic = null;
39 private Map<String, BeanStateTaskRef> tasks = null;
40 private Map<String, BeanLogic> finalizers = null;
41 private Map<String, BeanStateOutput> stateOutputs = null;
48 public String getName() {
57 public BeanKeyRef getTrigger() {
64 * @return the contexts
66 public BeanKeyRef[] getContexts() {
71 * Gets the task selection logic.
73 * @return the task selection logic
75 public BeanLogic getTaskSelectionLogic() {
76 return taskSelectionLogic;
84 public Map<String, BeanStateTaskRef> getTasks() {
89 * Gets the finalizers.
91 * @return the finalizers
93 public Map<String, BeanLogic> getFinalizers() {
98 * Gets the state outputs.
100 * @return the state outputs
102 public Map<String, BeanStateOutput> getStateOutputs() {
107 * Gets the default task.
109 * @return the default task
111 public BeanKeyRef getDefaultTask() {
116 * Sets the default task.
118 * @param defaultTask the new default task
120 public void setDefaultTask(final BeanKeyRef defaultTask) {
121 this.defaultTask = defaultTask;
128 public String toString() {
129 return "State [name=" + name + ", trigger=" + trigger + ", defaultTask=" + defaultTask + ", contexts="
130 + Arrays.toString(contexts) + ", taskSelectionLogic=" + taskSelectionLogic + ", tasks=" + tasks
131 + ", finalizers=" + finalizers + ", stateOutputs=" + stateOutputs + "]";