Class DefaultCloudEventHeadersRequestDecorator
java.lang.Object
de.hybris.platform.webhookservices.decorator.DefaultCloudEventHeadersRequestDecorator
- All Implemented Interfaces:
OutboundRequestDecorator
public class DefaultCloudEventHeadersRequestDecorator
extends Object
implements OutboundRequestDecorator
CloudEvent headers implementation of
OutboundRequestDecorator-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCloudEventHeadersRequestDecorator(@NotNull CloudEventHeadersService cloudEventHeadersService) Constructor to create DefaultCloudEventHeadersRequestDecorator -
Method Summary
Modifier and TypeMethodDescriptiondecorate(@NotNull org.springframework.http.HttpHeaders httpHeaders, @NotNull Map<String, Object> payload, @NotNull DecoratorContext decoratorContext, @NotNull 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
-
DefaultCloudEventHeadersRequestDecorator
public DefaultCloudEventHeadersRequestDecorator(@NotNull @NotNull CloudEventHeadersService cloudEventHeadersService) Constructor to create DefaultCloudEventHeadersRequestDecorator- Parameters:
cloudEventHeadersService- to generate CloudEvent headers
-
-
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(@NotNull @NotNull org.springframework.http.HttpHeaders httpHeaders, @NotNull @NotNull Map<String, Object> payload, @NotNull @NotNull DecoratorContext decoratorContext, @NotNull @NotNull 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 requestdecoratorContext- 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()
-