Class DefaultContextErrorDecorator
java.lang.Object
de.hybris.platform.outboundservices.decorator.impl.DefaultContextErrorDecorator
- All Implemented Interfaces:
OutboundRequestDecorator
This decorator throws a
DecoratorContextErrorException exception when errors are present in
the DecoratorContext.
By throwing the exception, the errors in the DecoratorContext will be populated with the exception message.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecorate(org.springframework.http.HttpHeaders httpHeaders, Map<String, Object> payload, DecoratorContext context, DecoratorExecution execution) Decorates an Outbound requestbooleanisApplicable(DecoratorContext decoratorContext) Determines if the decorator is applicable.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.outboundservices.decorator.OutboundRequestDecorator
isEnabled
-
Constructor Details
-
DefaultContextErrorDecorator
public DefaultContextErrorDecorator()
-
-
Method Details
-
isApplicable
Description copied from interface:OutboundRequestDecoratorDetermines if the decorator is applicable.- Specified by:
isApplicablein interfaceOutboundRequestDecorator- Parameters:
decoratorContext- with the information about the request being decorated.- Returns:
trueif the decorator is applicable;falseif not
-
decorate
public org.springframework.http.HttpEntity<Map<String,Object>> decorate(org.springframework.http.HttpHeaders httpHeaders, Map<String, Object> payload, DecoratorContext context, DecoratorExecution execution) Description copied from interface:OutboundRequestDecoratorDecorates an Outbound request- Specified by:
decoratein interfaceOutboundRequestDecorator- Parameters:
httpHeaders- The headers to be used for the outgoing request.payload- The payload used for the requestcontext- Some extra information that can be used by decorators.execution- The execution chain.- Returns:
- An
HttpEntitycontaining the result of the decoration. Normally by callingexecution.createHttpEntity()
-