Merge "HostTracker Bundle Separation"
[controller.git] / opendaylight / usermanager / src / main / java / org / opendaylight / controller / usermanager / AuthResponse.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.usermanager;
11
12 import java.io.Serializable;
13 import java.util.LinkedList;
14 import java.util.List;
15
16 import org.opendaylight.controller.sal.authorization.AuthResultEnum;
17
18 /**
19  * The class describes AAA response status and payload data
20  */
21 public class AuthResponse implements Serializable {
22     private static final long serialVersionUID = 1L;
23     private List<String> data;
24     private AuthResultEnum status;
25     private AuthResultEnum authorStatus;
26
27     public AuthResponse() {
28         this.data = new LinkedList<String>();
29         this.status = AuthResultEnum.AUTH_NONE;
30         this.authorStatus = AuthResultEnum.AUTH_NONE;
31     }
32
33     public void setData(List<String> data) {
34         this.data = data;
35     }
36
37     public void addData(String data) {
38         this.data.add(data);
39     }
40
41     public List<String> getData() {
42         return data;
43     }
44
45     public void setStatus(AuthResultEnum status) {
46         this.status = status;
47     }
48
49     public AuthResultEnum getStatus() {
50         return status;
51     }
52
53     public void setAuthorizationStatus(AuthResultEnum authorStatus) {
54         this.authorStatus = authorStatus;
55     }
56
57     public AuthResultEnum getAuthorizationStatus() {
58         return authorStatus;
59     }
60
61     public String toString() {
62         return ("\nReceived messages: " + data.toString() + "\nStatus: " + status);
63     }
64
65     public void resetData(String rolesData) {
66         // TODO Auto-generated method stub
67
68     }
69 }