@ JsonIgnore public static Message errorMessage ( String detailMessage ) { Message message = new Message ( ) ; message . setDetailMessage ( detailMessage ) ; message . setSeverity ( "ERROR" ) ; message . setType ( "" ) ; return message ; }
Returns a Message with Severity set to ERROR and the detailMessage set to what is passed in .