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 Details

    • DefaultCloudEventHeadersRequestDecorator

      public DefaultCloudEventHeadersRequestDecorator(@NotNull @NotNull CloudEventHeadersService cloudEventHeadersService)
      Constructor to create DefaultCloudEventHeadersRequestDecorator
      Parameters:
      cloudEventHeadersService - to generate CloudEvent headers
  • Method Details

    • isApplicable

      public boolean isApplicable(DecoratorContext decoratorContext)
      Description copied from interface: OutboundRequestDecorator
      Determines if the decorator is applicable.
      Specified by:
      isApplicable in interface OutboundRequestDecorator
      Parameters:
      decoratorContext - with the information about the request being decorated.
      Returns:
      true if the decorator is applicable; false if 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: OutboundRequestDecorator
      Decorates an Outbound request
      Specified by:
      decorate in interface OutboundRequestDecorator
      Parameters:
      httpHeaders - The headers to be used for the outgoing request.
      payload - The payload used for the request
      decoratorContext - Some extra information that can be used by decorators.
      execution - The execution chain.
      Returns:
      An HttpEntity containing the result of the decoration. Normally by calling execution.createHttpEntity()