Class DecoratorContext

java.lang.Object
de.hybris.platform.outboundservices.decorator.DecoratorContext

public class DecoratorContext extends Object
Context that is used to hold & transfer data pertaining to outbound requests.
  • Constructor Details

  • Method Details

    • decoratorContextBuilder

      public static DecoratorContext.DecoratorContextBuilder decoratorContextBuilder()
    • getItemModel

      public ItemModel getItemModel()
      Retrieves the item model under concern.
      Returns:
      item model
    • getIntegrationObject

      @NotNull public @NotNull IntegrationObjectDescriptor getIntegrationObject()
      Returns:
      integration object code
    • getIntegrationObjectCode

      public String getIntegrationObjectCode()
      A convenience/shortcut method for retrieving the context integration object code. Calling this method is same as getIntegrationObject().getCode()
      Returns:
      code of the context integration object.
    • getIntegrationObjectItem

      public Optional<TypeDescriptor> getIntegrationObjectItem()
      Retrieves integration object item type descriptor for the context integration object and item model.
      Returns:
      an Optional containing a TypeDescriptor, if the integration object contains at least one item for the context item model type. I.e. there is a integration object item model matching the getItemModel().getItemtype(). Otherwise, an Optional.empty() is returned.
    • getIntegrationObjectItemCode

      @Deprecated(since="2011.0", forRemoval=true) public String getIntegrationObjectItemCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      No longer used. Use getIntegrationObjectItem() instead.
    • getDestinationModel

      @NotNull public @NotNull ConsumedDestinationModel getDestinationModel()
      Retrieves destination, to which the item should be sent.
      Returns:
      consumed destination
    • getErrors

      @NotNull public @NotNull Collection<String> getErrors()
      Retrieves a list of errors that indicate why this context is not valid or returns an empty list.
      Returns:
      a list of errors
    • hasErrors

      @NotNull public @javax.validation.constraints.NotNull boolean hasErrors()
      Retrieves a value indicating if this context is valid based off the presence of errors.
      Returns:
      true if this context has errors, else false
    • getSource

      @NotNull public @NotNull OutboundSource getSource()
      Retrieves source of the item synchronization.
      Returns:
      a platform module that sends the item to external system.
    • getEventType

      public EventType getEventType()
      Retrieves EventType of the value
      Returns:
      value of event type
    • getHttpMethod

      @NotNull public @NotNull HttpMethod getHttpMethod()
      Retrieves httpMethod of the item synchronization.
      Returns:
      httpMethod for the delta being sent
    • getIntegrationKey

      public String getIntegrationKey()