Replaced all tabs with spaces in java and pom.xml
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / openstack / beans / StackInfo.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.openstack.beans;
22
23
24 import java.util.HashMap;
25 import java.util.Map;
26
27 /*
28  * This Java bean class relays Heat stack status information to ActiveVOS processes.
29  * 
30  * This bean is returned by all Heat-specific adapter operations (create, query, delete)
31  */
32
33 public class StackInfo {
34     // Set defaults for everything
35     private String name = "";
36     private String canonicalName = "";
37     private HeatStatus status = HeatStatus.UNKNOWN;
38     private String statusMessage = "";
39     private Map<String, Object> outputs = new HashMap<>();
40     private Map<String, Object> parameters = new HashMap<>();
41
42     public StackInfo() {}
43
44     public StackInfo(String name, HeatStatus status, String statusMessage, Map<String, Object> outputs) {
45         this.name = name;
46         this.canonicalName = name; // Don't have an ID, so just use name
47
48         this.status = status;
49         if (statusMessage != null)
50             this.statusMessage = statusMessage;
51         if (outputs != null)
52             this.outputs = outputs;
53     }
54
55     public StackInfo(String name, HeatStatus status) {
56         this.name = name;
57         this.canonicalName = name; // Don't have an ID, so just use name
58         this.status = status;
59     }
60
61     public String getName() {
62         return name;
63     }
64
65     public void setName(String name) {
66         this.name = name;
67     }
68
69     public String getCanonicalName() {
70         return canonicalName;
71     }
72
73     public void setCanonicalName(String name) {
74         this.canonicalName = name;
75     }
76
77     public HeatStatus getStatus() {
78         return status;
79     }
80
81     public void setStatus(HeatStatus status) {
82         this.status = status;
83     }
84
85     public String getStatusMessage() {
86         return statusMessage;
87     }
88
89     public void setStatusMessage(String statusMessage) {
90         this.statusMessage = statusMessage;
91     }
92
93     public Map<String, Object> getOutputs() {
94         return outputs;
95     }
96
97     public void setOutputs(Map<String, Object> outputs) {
98         this.outputs = outputs;
99     }
100
101     public Map<String, Object> getParameters() {
102         return parameters;
103     }
104
105     public void setParameters(Map<String, Object> parameters) {
106         this.parameters = parameters;
107     }
108
109 }
110