[POLICY-122] Policy GUI Fixes
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / openecomp / policy / std / StdPolicyResponse.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * PolicyEngineAPI
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
22 package org.openecomp.policy.std;
23
24 import java.util.Map;
25
26 import org.openecomp.policy.api.PolicyResponse;
27 import org.openecomp.policy.api.PolicyResponseStatus;
28
29 /**
30  * PolicyResponse Implementation class. 
31  * 
32  * @version 0.1 
33  *
34  */
35 public class StdPolicyResponse implements PolicyResponse{
36         private PolicyResponseStatus policyResponseStatus; 
37         private Map<String,String> actionAdvised;
38         private Map<String,String> actionTaken;
39         private Map<String,String> requestAttributes;
40         private String policyResponseMessage; 
41         
42         @Override
43         public PolicyResponseStatus getPolicyResponseStatus() {
44                 return policyResponseStatus;
45         }
46
47         @Override
48         public Map<String, String> getActionAdvised() {
49                 return actionAdvised;
50         }
51
52         @Override
53         public Map<String, String> getActionTaken() {
54                 return actionTaken;
55         }
56
57         @Override
58         public Map<String, String> getRequestAttributes() {
59                 return requestAttributes;
60         }
61
62         @Override
63         public String getPolicyResponseMessage() {
64                 return policyResponseMessage;
65         }
66
67         public void setPolicyResponseStatus(PolicyResponseStatus policyResponseStatus) {
68                 this.policyResponseStatus = policyResponseStatus;
69         }
70
71         public void setActionAdvised(Map<String, String> actionAdvised) {
72                 this.actionAdvised = actionAdvised;
73         }
74
75         public void setActionTaken(Map<String, String> actionTaken) {
76                 this.actionTaken = actionTaken;
77         }
78
79         public void setRequestAttributes(Map<String, String> requestAttributes) {
80                 this.requestAttributes = requestAttributes;
81         }
82
83         public void setPolicyResponseMessage(String policyResponseMessage) {
84                 this.policyResponseMessage = policyResponseMessage;
85         }
86         
87         public void setPolicyResponseStatus(String policyResponseMessage, PolicyResponseStatus policyResponseStatus) {
88                 this.policyResponseMessage = policyResponseMessage;
89                 this.policyResponseStatus = policyResponseStatus;
90         }
91         
92         @Override
93         public String toString() {
94                 return "PolicyResponse [ policyResponseStatus=" + policyResponseStatus + ", policyResponseMessage=" + policyResponseMessage + ", " +
95                                 ""
96                                 + "]";
97         }
98 }