Class RequestErrorHandlerImpl
java.lang.Object
de.hybris.platform.sap.productconfig.runtime.cps.impl.RequestErrorHandlerImpl
- All Implemented Interfaces:
RequestErrorHandler
Default implementation of
RequestErrorHandler. Just forwards the exceptions into runtime exceptions, a
specific exception text is raised for HTTP NOT FOUND-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckClientException412(com.hybris.charon.exp.HttpException ex) protected voidcheckClientException428(com.hybris.charon.exp.HttpException ex) protected voidcheckNotFound(com.hybris.charon.exp.HttpException ex) protected voidcleanUpCache(String configId) protected CPSCachegetCache()protected StringgetServerMessage(com.hybris.charon.exp.HttpException ex) protected voidifNotFoundThrowIllegalState(com.hybris.charon.exp.HttpException ex) protected voidlogRequestError(String serviceName, com.hybris.charon.exp.HttpException ex) voidprocessConfigurationRuntimeException(RuntimeException e, String configId) Processes runtime exceptions like timeout or non-existing server.processCreateDefaultConfigurationError(com.hybris.charon.exp.HttpException ex) processes exception from configuration create default configuration requestprocessCreatePricingDocumentError(com.hybris.charon.exp.HttpException ex) processes exception from create pricing document requestProcesses runtime exceptions like timeout or non-existing server.processCreateRuntimeConfigurationFromExternalError(com.hybris.charon.exp.HttpException ex) processes exception from create configuration from external requestvoidprocessDeleteConfigurationError(com.hybris.charon.exp.HttpException ex) processes exception from delete configuration requestprocessGetConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) processes exception from configuration create default configuration requestprocessGetExternalConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) processes exception from get external configuration requestprocessGetItemWithGroupDetailsError(com.hybris.charon.exp.HttpException ex, String configId, String itemId, List<String> groupList) processes exception from get item with group details requestbooleanprocessHasKbError(com.hybris.charon.exp.HttpException ex) processes exception from get knowledgebase requestvoidprocessUpdateConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) processes exception from configuration update requestvoid
-
Field Details
-
NO_SERVER_MESSAGE
- See Also:
-
-
Constructor Details
-
RequestErrorHandlerImpl
public RequestErrorHandlerImpl()
-
-
Method Details
-
processUpdateConfigurationError
public void processUpdateConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException Description copied from interface:RequestErrorHandlerprocesses exception from configuration update request- Specified by:
processUpdateConfigurationErrorin interfaceRequestErrorHandler- Parameters:
ex- exception to processconfigId- configuration runtime id of the configuration that was attempted to be updated- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-
processCreateDefaultConfigurationError
public CPSConfiguration processCreateDefaultConfigurationError(com.hybris.charon.exp.HttpException ex) Description copied from interface:RequestErrorHandlerprocesses exception from configuration create default configuration request- Specified by:
processCreateDefaultConfigurationErrorin interfaceRequestErrorHandler- Parameters:
ex- exception to process- Returns:
- default configuration
-
processGetConfigurationError
public CPSConfiguration processGetConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException Description copied from interface:RequestErrorHandlerprocesses exception from configuration create default configuration request- Specified by:
processGetConfigurationErrorin interfaceRequestErrorHandler- Parameters:
ex- exception to processconfigId- configuration runtime id of the configuration that was attempted to be retrieved- Returns:
- configuration update result
- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-
processDeleteConfigurationError
public void processDeleteConfigurationError(com.hybris.charon.exp.HttpException ex) Description copied from interface:RequestErrorHandlerprocesses exception from delete configuration request- Specified by:
processDeleteConfigurationErrorin interfaceRequestErrorHandler- Parameters:
ex- exception to process
-
processGetExternalConfigurationError
public CPSExternalConfiguration processGetExternalConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException Description copied from interface:RequestErrorHandlerprocesses exception from get external configuration request- Specified by:
processGetExternalConfigurationErrorin interfaceRequestErrorHandler- Parameters:
ex- exception to processconfigId- configuration runtime id of the external configuration that was attempted to be retrieved- Returns:
- external representation of configuration
- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException- Exception on calling the configuration service (e.g. when the session has expired)
-
processCreateRuntimeConfigurationFromExternalError
public CPSConfiguration processCreateRuntimeConfigurationFromExternalError(com.hybris.charon.exp.HttpException ex) Description copied from interface:RequestErrorHandlerprocesses exception from create configuration from external request- Specified by:
processCreateRuntimeConfigurationFromExternalErrorin interfaceRequestErrorHandler- Parameters:
ex- exception to process- Returns:
- runtime configuration
-
processCreatePricingDocumentError
public PricingDocumentResult processCreatePricingDocumentError(com.hybris.charon.exp.HttpException ex) throws de.hybris.platform.sap.productconfig.runtime.interf.PricingEngineException Description copied from interface:RequestErrorHandlerprocesses exception from create pricing document request- Specified by:
processCreatePricingDocumentErrorin interfaceRequestErrorHandler- Parameters:
ex- exception to process- Returns:
- pricing document result
- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.PricingEngineException- which indicates the error towards higher layers
-
processHasKbError
public boolean processHasKbError(com.hybris.charon.exp.HttpException ex) Description copied from interface:RequestErrorHandlerprocesses exception from get knowledgebase request- Specified by:
processHasKbErrorin interfaceRequestErrorHandler- Parameters:
ex- exception to process- Returns:
- whether kb exists
-
checkNotFound
protected void checkNotFound(com.hybris.charon.exp.HttpException ex) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException - Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-
ifNotFoundThrowIllegalState
protected void ifNotFoundThrowIllegalState(com.hybris.charon.exp.HttpException ex) -
checkClientException412
protected void checkClientException412(com.hybris.charon.exp.HttpException ex) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException - Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-
checkClientException428
protected void checkClientException428(com.hybris.charon.exp.HttpException ex) -
logRequestError
-
getServerMessage
-
processCreatePricingDocumentRuntimeException
public PricingDocumentResult processCreatePricingDocumentRuntimeException(RuntimeException ex) throws de.hybris.platform.sap.productconfig.runtime.interf.PricingEngineException Description copied from interface:RequestErrorHandlerProcesses runtime exceptions like timeout or non-existing server. Default behavior: Timeout exceptions are handled gracefully in the sense that they are converted intoPricingEngineExceptionwhile other runtime exceptions are re-thrown.- Specified by:
processCreatePricingDocumentRuntimeExceptionin interfaceRequestErrorHandler- Parameters:
ex- Runtime exception that wraps the actual root cause- Returns:
- Dummy result of the pricing call
- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.PricingEngineException
-
processConfigurationRuntimeException
public void processConfigurationRuntimeException(RuntimeException e, String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException Description copied from interface:RequestErrorHandlerProcesses runtime exceptions like timeout or non-existing server. Default behavior: Timeout exceptions are handled gracefully in the sense that they are converted intoConfigurationEngineExceptionwhile other runtime exceptions are re-thrown.- Specified by:
processConfigurationRuntimeExceptionin interfaceRequestErrorHandler- Parameters:
e- Runtime exception that wraps the actual root causeconfigId- configuration runtime id of the configuration that was requested- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-
processGetItemWithGroupDetailsError
public CPSItem processGetItemWithGroupDetailsError(com.hybris.charon.exp.HttpException ex, String configId, String itemId, List<String> groupList) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException Description copied from interface:RequestErrorHandlerprocesses exception from get item with group details request- Specified by:
processGetItemWithGroupDetailsErrorin interfaceRequestErrorHandler- Parameters:
ex- exception to processconfigId- configuration runtime id of the configuration that was attempted to be retrieveditemId- item runtime id of the configuration that was attempted to be retrievedgroupList- list of group names of the configuration that was attempted to be retrieved- Returns:
- configuration update result
- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-
cleanUpCache
-
getCache
-
setCache
-