Changes for checkstyle 8.32
[policy/apex-pdp.git] / client / client-editor / src / main / java / org / onap / policy / apex / client / editor / rest / handling / bean / BeanState.java
1 /*-
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
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.apex.client.editor.rest.handling.bean;
22
23 import java.util.Arrays;
24 import java.util.Map;
25 import javax.xml.bind.annotation.XmlType;
26
27 /**
28  * The State Bean.
29  */
30 @XmlType
31 public class BeanState extends BeanBase {
32
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;
41
42     /**
43      * Gets the name.
44      *
45      * @return the name
46      */
47     public String getName() {
48         return name;
49     }
50
51     /**
52      * Gets the trigger.
53      *
54      * @return the trigger
55      */
56     public BeanKeyRef getTrigger() {
57         return trigger;
58     }
59
60     /**
61      * Gets the contexts.
62      *
63      * @return the contexts
64      */
65     public BeanKeyRef[] getContexts() {
66         return contexts;
67     }
68
69     /**
70      * Gets the task selection logic.
71      *
72      * @return the task selection logic
73      */
74     public BeanLogic getTaskSelectionLogic() {
75         return taskSelectionLogic;
76     }
77
78     /**
79      * Gets the tasks.
80      *
81      * @return the tasks
82      */
83     public Map<String, BeanStateTaskRef> getTasks() {
84         return tasks;
85     }
86
87     /**
88      * Gets the finalizers.
89      *
90      * @return the finalizers
91      */
92     public Map<String, BeanLogic> getFinalizers() {
93         return finalizers;
94     }
95
96     /**
97      * Gets the state outputs.
98      *
99      * @return the state outputs
100      */
101     public Map<String, BeanStateOutput> getStateOutputs() {
102         return stateOutputs;
103     }
104
105     /**
106      * Gets the default task.
107      *
108      * @return the default task
109      */
110     public BeanKeyRef getDefaultTask() {
111         return defaultTask;
112     }
113
114     /**
115      * Sets the default task.
116      *
117      * @param defaultTask the new default task
118      */
119     public void setDefaultTask(final BeanKeyRef defaultTask) {
120         this.defaultTask = defaultTask;
121     }
122
123     /**
124      * {@inheritDoc}.
125      */
126     @Override
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 + "]";
131     }
132
133 }