[New] added Login and Logout objects

This commit is contained in:
Robert von Burg 2014-09-13 15:23:25 +02:00
parent 21921fbe65
commit f9b3a8ebe4
2 changed files with 111 additions and 0 deletions

View File

@ -0,0 +1,75 @@
/*
* Copyright (c) 2012, Robert von Burg
*
* All rights reserved.
*
* This file is part of the XXX.
*
* XXX is free software: you can redistribute
* it and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* XXX is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XXX. If not, see
* <http://www.gnu.org/licenses/>.
*/
package li.strolch.rest.model;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
/**
* @author Robert von Burg <eitch@eitchnet.ch>
*/
@XmlRootElement(name = "Logout")
@XmlAccessorType(XmlAccessType.NONE)
public class Logout {
@XmlAttribute(name = "username")
private String username;
@XmlAttribute(name = "sessionId")
private String sessionId;
public Logout() {
// no-arg constructor for JAXB
}
/**
* @return the username
*/
public String getUsername() {
return this.username;
}
/**
* @param username
* the username to set
*/
public void setUsername(String username) {
this.username = username;
}
/**
* @return the sessionId
*/
public String getSessionId() {
return this.sessionId;
}
/**
* @param sessionId
* the sessionId to set
*/
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
}

View File

@ -27,6 +27,12 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "LogoutResult")
public class LogoutResult {
@XmlAttribute(name = "username")
private String username;
@XmlAttribute(name = "sessionId")
private String sessionId;
@XmlAttribute(name = "msg")
private String msg;
@ -48,4 +54,34 @@ public class LogoutResult {
public void setMsg(String msg) {
this.msg = msg;
}
/**
* @return the username
*/
public String getUsername() {
return this.username;
}
/**
* @param username
* the username to set
*/
public void setUsername(String username) {
this.username = username;
}
/**
* @return the sessionId
*/
public String getSessionId() {
return this.sessionId;
}
/**
* @param sessionId
* the sessionId to set
*/
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
}