Class ErrorResponse
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.web.controller.api.exception.ErrorResponse
-
public class ErrorResponse extends java.lang.Object
Error message response class to be serialzed to Json and returned from theControllerExceptionHandler
-
-
Constructor Summary
Constructors Constructor Description ErrorResponse()
ErrorResponse(java.lang.String message)
ErrorResponse(java.lang.String message, java.util.Map<java.lang.String,java.lang.Object> otherProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperty(java.lang.String key, java.lang.Object value)
Add an additional map property to be serialized to JSONjava.lang.String
getMessage()
Get the message for this responsejava.util.Map<java.lang.String,java.lang.Object>
getOtherProperties()
Get the other properties defined in the mapvoid
setMessage(java.lang.String message)
Set the message for this responsevoid
setOtherProperties(java.util.Map<java.lang.String,java.lang.Object> otherProperties)
Set the additional properties to display for this response
-
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Get the message for this response- Returns:
- the message for this response
-
setMessage
public void setMessage(java.lang.String message)
Set the message for this response- Parameters:
message
- the message for this response
-
addProperty
public void addProperty(java.lang.String key, java.lang.Object value)
Add an additional map property to be serialized to JSON- Parameters:
key
- the key of the additional propertyvalue
- the value of the additional property
-
getOtherProperties
public java.util.Map<java.lang.String,java.lang.Object> getOtherProperties()
Get the other properties defined in the map- Returns:
- the other properties defined in the map
-
setOtherProperties
public void setOtherProperties(java.util.Map<java.lang.String,java.lang.Object> otherProperties)
Set the additional properties to display for this response- Parameters:
otherProperties
- the additional properties to display for this message.
-
-