ch.ralscha.extdirectspring.controller
Class Configuration
java.lang.Object
ch.ralscha.extdirectspring.controller.Configuration
public class Configuration
- extends Object
Configuration class to configure the way exception messages get sent back to the client
If there is a mapping for the exception in exceptionToMessage and the value is not null send this value.
If there is a mapping for the exception in exceptionToMessage and the value is null send exception.getMessage().
If there is no mapping and sendExceptionMessage is true send exception.getMessage().
If there is no mapping and sendExceptionMessage is false send defaultExceptionMessage.
If sendStacktrace is true, send the full stacktrace in the json field 'where'.
- Author:
- Ralph Schaer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Configuration
public Configuration()
getDefaultExceptionMessage
public String getDefaultExceptionMessage()
setDefaultExceptionMessage
public void setDefaultExceptionMessage(String defaultExceptionMessage)
isSendExceptionMessage
public boolean isSendExceptionMessage()
setSendExceptionMessage
public void setSendExceptionMessage(boolean sendExceptionMessage)
isSendStacktrace
public boolean isSendStacktrace()
setSendStacktrace
public void setSendStacktrace(boolean sendStacktrace)
getExceptionToMessage
public Map<Class<?>,String> getExceptionToMessage()
setExceptionToMessage
public void setExceptionToMessage(Map<Class<?>,String> exceptionToMessage)
getMessage
public String getMessage(Throwable exception)
Copyright © 2010-2011. All Rights Reserved.