Class GenericExceptionMessageFormatter
- java.lang.Object
-
- de.hybris.platform.webservicescommons.resolver.formatters.AbstractExceptionMessageFormatter
-
- de.hybris.platform.webservicescommons.resolver.formatters.GenericExceptionMessageFormatter
-
public class GenericExceptionMessageFormatter extends AbstractExceptionMessageFormatter
Exception message formatter which defines a message based on the configuration properties.If the exception is present in the configuration then original message is forwarded like for
ForwardExceptionMessageFormatter.Otherwise generic message is returned as defined by configuration property.
If there is no configuration property defined then generic message defined in this class is returned.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringDEFAULT_EXCEPTION_MESSAGE
-
Constructor Summary
Constructors Constructor Description GenericExceptionMessageFormatter(FallbackConfigurationHelper fallbackConfigurationHelper)Creates a new generic message formatter with given fallback configuration helper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringformatMessage(java.lang.String extensionName, java.lang.Exception exception, ErrorWsDTO errorWsDTO)Formats exception message.protected FallbackConfigurationHelpergetFallbackConfigurationHelper()-
Methods inherited from class de.hybris.platform.webservicescommons.resolver.formatters.AbstractExceptionMessageFormatter
setMessages
-
-
-
-
Field Detail
-
DEFAULT_EXCEPTION_MESSAGE
protected static final java.lang.String DEFAULT_EXCEPTION_MESSAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GenericExceptionMessageFormatter
public GenericExceptionMessageFormatter(FallbackConfigurationHelper fallbackConfigurationHelper)
Creates a new generic message formatter with given fallback configuration helper.- Parameters:
fallbackConfigurationHelper- fallback configuration helper
-
-
Method Detail
-
formatMessage
protected java.lang.String formatMessage(java.lang.String extensionName, java.lang.Exception exception, ErrorWsDTO errorWsDTO)Description copied from class:AbstractExceptionMessageFormatterFormats exception message.- Specified by:
formatMessagein classAbstractExceptionMessageFormatter- Parameters:
extensionName- extension nameexception- exception objecterrorWsDTO- webservices error object for which message is formatted- Returns:
- formatted message
-
getFallbackConfigurationHelper
protected FallbackConfigurationHelper getFallbackConfigurationHelper()
-
-