X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fadsal%2Fusermanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fusermanager%2FAuthResponse.java;fp=opendaylight%2Fadsal%2Fusermanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fusermanager%2FAuthResponse.java;h=062c3585be6b66dc57bd8557e46ce09fe2e0c7ba;hb=42c32160bfd41de57189bb246fec5ffb48ed8e9e;hp=0000000000000000000000000000000000000000;hpb=edf5bfcee83c750853253ccfd991ba7000f5f65b;p=controller.git diff --git a/opendaylight/adsal/usermanager/api/src/main/java/org/opendaylight/controller/usermanager/AuthResponse.java b/opendaylight/adsal/usermanager/api/src/main/java/org/opendaylight/controller/usermanager/AuthResponse.java new file mode 100644 index 0000000000..062c3585be --- /dev/null +++ b/opendaylight/adsal/usermanager/api/src/main/java/org/opendaylight/controller/usermanager/AuthResponse.java @@ -0,0 +1,69 @@ + +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.usermanager; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +import org.opendaylight.controller.sal.authorization.AuthResultEnum; + +/** + * The class describes AAA response status and payload data + */ +public class AuthResponse implements Serializable { + private static final long serialVersionUID = 1L; + private List data; + private AuthResultEnum status; + private AuthResultEnum authorStatus; + + public AuthResponse() { + this.data = new LinkedList(); + this.status = AuthResultEnum.AUTH_NONE; + this.authorStatus = AuthResultEnum.AUTH_NONE; + } + + public void setData(List data) { + this.data = data; + } + + public void addData(String data) { + this.data.add(data); + } + + public List getData() { + return data; + } + + public void setStatus(AuthResultEnum status) { + this.status = status; + } + + public AuthResultEnum getStatus() { + return status; + } + + public void setAuthorizationStatus(AuthResultEnum authorStatus) { + this.authorStatus = authorStatus; + } + + public AuthResultEnum getAuthorizationStatus() { + return authorStatus; + } + + public String toString() { + return ("\nReceived messages: " + data.toString() + "\nStatus: " + status); + } + + public void resetData(String rolesData) { + // TODO Auto-generated method stub + + } +} \ No newline at end of file