@Scope(value="singleton") @Provider public class BroadleafRestExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<Throwable>, org.springframework.context.MessageSourceAware, org.springframework.context.ApplicationContextAware
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.ApplicationContext |
context |
protected javax.ws.rs.core.HttpHeaders |
headers |
protected String |
messageKeyPrefix |
protected org.springframework.context.MessageSource |
messageSource |
| Constructor and Description |
|---|
BroadleafRestExceptionMapper() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
resolveClientMessageKey(String key) |
protected javax.ws.rs.core.MediaType |
resolveResponseMediaType(Throwable t) |
protected int |
resolveResponseStatusCode(Throwable t,
ErrorWrapper error) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setMessageKeyPrefix(String prefix)
This key is the prefix that will be stripped off of all message keys that are returned to a client.
|
void |
setMessageSource(org.springframework.context.MessageSource messageSource) |
javax.ws.rs.core.Response |
toResponse(Throwable t) |
protected String messageKeyPrefix
@Context protected javax.ws.rs.core.HttpHeaders headers
protected org.springframework.context.MessageSource messageSource
protected org.springframework.context.ApplicationContext context
public javax.ws.rs.core.Response toResponse(Throwable t)
toResponse in interface javax.ws.rs.ext.ExceptionMapper<Throwable>public void setMessageSource(org.springframework.context.MessageSource messageSource)
setMessageSource in interface org.springframework.context.MessageSourceAwarepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setMessageKeyPrefix(String prefix)
resolveClientMessageKey method.prefix - protected int resolveResponseStatusCode(Throwable t, ErrorWrapper error)
protected javax.ws.rs.core.MediaType resolveResponseMediaType(Throwable t)
Copyright © 2014. All rights reserved.