ch.ralscha.extdirectspring.controller
Class Configuration

java.lang.Object
  extended by 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'. If alwaysWrapStoreResponse is true, always wrap a response of a STORE_READ and STORE_MODIFY response in a ExtDirectStoreResponse object If synchronizeOnSession is true, execution of the methods is synchronized on the session, to serialize parallel invocations from the same client.

Author:
Ralph Schaer

Constructor Summary
Configuration()
           
 
Method Summary
 String getDefaultExceptionMessage()
           
 Map<Class<?>,String> getExceptionToMessage()
           
 String getMessage(Throwable exception)
           
 boolean isAlwaysWrapStoreResponse()
           
 boolean isSendExceptionMessage()
           
 boolean isSendStacktrace()
           
 boolean isSynchronizeOnSession()
           
 void setAlwaysWrapStoreResponse(boolean alwaysWrapStoreResponse)
           
 void setDefaultExceptionMessage(String defaultExceptionMessage)
           
 void setExceptionToMessage(Map<Class<?>,String> exceptionToMessage)
           
 void setSendExceptionMessage(boolean sendExceptionMessage)
           
 void setSendStacktrace(boolean sendStacktrace)
           
 void setSynchronizeOnSession(boolean synchronizeOnSession)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Method Detail

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)

isAlwaysWrapStoreResponse

public boolean isAlwaysWrapStoreResponse()

setAlwaysWrapStoreResponse

public void setAlwaysWrapStoreResponse(boolean alwaysWrapStoreResponse)

isSynchronizeOnSession

public boolean isSynchronizeOnSession()

setSynchronizeOnSession

public void setSynchronizeOnSession(boolean synchronizeOnSession)

getMessage

public String getMessage(Throwable exception)


Copyright © 2010-2011. All Rights Reserved.