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;
25 import javax.xml.bind.annotation.XmlType;
31 public class BeanState extends BeanBase {
33 private String name = null;
34 private BeanKeyRef trigger = null;
35 private BeanKeyRef defaultTask = null;
36 private BeanKeyRef[] contexts = null;
37 private BeanLogic taskSelectionLogic = null;
38 private Map<String, BeanStateTaskRef> tasks = null;
39 private Map<String, BeanLogic> finalizers = null;
40 private Map<String, BeanStateOutput> stateOutputs = null;
47 public String getName() {
56 public BeanKeyRef getTrigger() {
63 * @return the contexts
65 public BeanKeyRef[] getContexts() {
70 * Gets the task selection logic.
72 * @return the task selection logic
74 public BeanLogic getTaskSelectionLogic() {
75 return taskSelectionLogic;
83 public Map<String, BeanStateTaskRef> getTasks() {
88 * Gets the finalizers.
90 * @return the finalizers
92 public Map<String, BeanLogic> getFinalizers() {
97 * Gets the state outputs.
99 * @return the state outputs
101 public Map<String, BeanStateOutput> getStateOutputs() {
106 * Gets the default task.
108 * @return the default task
110 public BeanKeyRef getDefaultTask() {
115 * Sets the default task.
117 * @param defaultTask the new default task
119 public void setDefaultTask(final BeanKeyRef defaultTask) {
120 this.defaultTask = defaultTask;
127 public String toString() {
128 return "State [name=" + name + ", trigger=" + trigger + ", defaultTask=" + defaultTask + ", contexts="
129 + Arrays.toString(contexts) + ", taskSelectionLogic=" + taskSelectionLogic + ", tasks=" + tasks
130 + ", finalizers=" + finalizers + ", stateOutputs=" + stateOutputs + "]";