package com.bitmonlab.osiris.core.errorhandler; import javax.ws.rs.core.Response.Status; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "response") @XmlAccessorType(XmlAccessType.FIELD) public class ErrorResponse { private Integer status; private String statusReason; private Integer code; private String exception; private String description; private String message; public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public void setStatus(Status status){ this.setStatus(status.getStatusCode()); this.setStatusReason(status.getReasonPhrase()); } public String getStatusReason() { return statusReason; } public void setStatusReason(String statusReason) { this.statusReason = statusReason; } public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public String getException() { return exception; } public void setException(String exception) { this.exception = exception; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }