Interface CatalogProvider<I extends CatalogItem>

Type Parameters:
I - The type of the results expected in the SearchResponse. Should extend CatalogItem.
All Known Implementing Classes:
ExternalCatalogProvider

public interface CatalogProvider<I extends CatalogItem>
Provider for interfacing with operations around catalog. Typically utilizes WebClient to make requests to an external REST API.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.broadleafcommerce.bulk.v2.domain.BulkOperationResponse
    createBulkOperation(com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Creates a bulk operation with the supplied BulkOperationRequest.
    List<com.broadleafcommerce.bulk.v2.domain.SupportedBulkOperation>
    getSupportedBulkOperations(String operationType, String entityType)
    Retrieves the list of supported bulk operations for the given operation type in catalog services.
    com.broadleafcommerce.bulk.v2.domain.InitializeItemResponse
    initializeItems(SearchResponse<I> catalogItems, com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, com.broadleafcommerce.bulk.v2.domain.BulkOperationResponse bulkOperationResponse, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Initializes the bulk operation items from the entities returned in the SearchResponse.
    com.broadleafcommerce.bulk.v2.domain.BulkOperationResponse
    updateBulkOperationTotalRecordCount(long totalRecordCount, com.broadleafcommerce.bulk.v2.domain.BulkOperationResponse bulkOperationResponse, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Updates the bulk operation to set the total record count after item initialization.
  • Method Details

    • createBulkOperation

      com.broadleafcommerce.bulk.v2.domain.BulkOperationResponse createBulkOperation(com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Creates a bulk operation with the supplied BulkOperationRequest.
      Parameters:
      bulkOperationRequest - the BulkOperationRequest to create
      contextInfo - context information surrounding sandboxing/multitenant state
      Returns:
      the created bulk operation
    • getSupportedBulkOperations

      List<com.broadleafcommerce.bulk.v2.domain.SupportedBulkOperation> getSupportedBulkOperations(String operationType, @Nullable String entityType)
      Retrieves the list of supported bulk operations for the given operation type in catalog services.
      Parameters:
      operationType - the operation type to check
      entityType - the entity type to check
      Returns:
      the list of supported bulk operations
    • initializeItems

      com.broadleafcommerce.bulk.v2.domain.InitializeItemResponse initializeItems(SearchResponse<I> catalogItems, com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, com.broadleafcommerce.bulk.v2.domain.BulkOperationResponse bulkOperationResponse, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Initializes the bulk operation items from the entities returned in the SearchResponse.
      Parameters:
      catalogItems - the list of catalog items from the search service
      bulkOperationRequest - the BulkOperationRequest for this bulk operation
      bulkOperationResponse - the bulk operation created
      pageable - the current page information
      contextInfo - context information surrounding sandboxing/multitenant state
      Returns:
      the InitializeItemResponse containing the items created for the bulk operation
    • updateBulkOperationTotalRecordCount

      com.broadleafcommerce.bulk.v2.domain.BulkOperationResponse updateBulkOperationTotalRecordCount(long totalRecordCount, com.broadleafcommerce.bulk.v2.domain.BulkOperationResponse bulkOperationResponse, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Updates the bulk operation to set the total record count after item initialization.
      Parameters:
      totalRecordCount - the total number of bulk operation item records
      bulkOperationResponse - the bulk operation
      contextInfo - context information surrounding sandboxing/multitenant state
      Returns:
      the updated bulk operation