Class AbstractExportConfigurationDecorator

java.lang.Object
de.hybris.platform.odata2services.export.impl.AbstractExportConfigurationDecorator
All Implemented Interfaces:
ExportConfigurationDecorator
Direct Known Subclasses:
DefaultIntegrationObjectDecorator, DefaultOutboundChannelConfigurationDecorator, DefaultScriptDecorator

public abstract class AbstractExportConfigurationDecorator extends Object implements ExportConfigurationDecorator
The base implementation of the ExportConfigurationDecorator to be extended for reuse.
  • Constructor Details

    • AbstractExportConfigurationDecorator

      protected AbstractExportConfigurationDecorator(@NotNull @NotNull DescriptorFactory descriptorFactory, @NotNull @NotNull IntegrationObjectConversionService conversionService, @NotNull @NotNull IntegrationObjectService integrationObjectService, @NotNull @NotNull EntitySetNameGenerator nameGenerator)
      Constructor injects dependencies for reuse.
      Parameters:
      descriptorFactory - to create the integration object descriptor
      conversionService - to convert the integration object
      integrationObjectService - to find the integration object
      nameGenerator - to generate the entity set name
  • Method Details

    • setExportConfigurationFilter

      public void setExportConfigurationFilter(ExportConfigurationFilter exportConfigurationFilter)
      Set export configuration filter.
      Parameters:
      exportConfigurationFilter - to filter sensitive information
    • constructPayload

      protected String constructPayload(ItemModel itemModel, String ioCode)
      Constructs the integration object payload after filtering sensitive information if the filter is provided.
      Parameters:
      itemModel - the integration object root item model
      ioCode - the integration object code
      Returns:
      Json string of the integration object
    • extractProperty

      protected String extractProperty(String requestBody, String path)
      Extracts a property from an export entity request body.
      Parameters:
      requestBody - request body
      path - property path
      Returns:
      property value
    • extractProperties

      protected List<String> extractProperties(String requestBody, String path)
      Extracts a property list from an export entity request body.
      Parameters:
      requestBody - request body
      path - property path
      Returns:
      list of property values
    • constructRequestUrl

      protected String constructRequestUrl(String integrationObjectCode, String entitySet)
      Constructs request URL.
      Parameters:
      integrationObjectCode - integration object code
      entitySet - entity set name
      Returns:
      string representation of the URl
    • exportEndpoint

      protected String exportEndpoint(String integrationObject, String entitySet)
      Constructs export endpoint
      Parameters:
      integrationObject - integration object code
      entitySet - entity set name
      Returns:
      endpoint
    • getIntegrationObjectService

      protected IntegrationObjectService getIntegrationObjectService()