/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.geofence.services.rest.model;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* @author ETj (etj at geo-solutions.it)
*/
@XmlRootElement(name = "ShortUser")
@XmlType(propOrder = {"id", "extId", "userName"})
public class RESTShortUser {
private Long id;
private String extId;
private String userName;
private boolean enabled;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
// @XmlAttribute(name = "extid")
public String getExtId() {
return extId;
}
public void setExtId(String extId) {
this.extId = extId;
}
@XmlElement
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
@XmlAttribute(name = "enabled")
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ '['
+ "id:" + id
+ " name:" + userName
+ (extId!=null? " ext:" + extId : "")
+ (enabled ? " enabled" : " disabled")
+ ']';
}
}