Interface CatalogProvider<I extends CatalogItem>
- Type Parameters:
I
- The type of the results expected in theSearchResponse
. Should extendCatalogItem
.
- 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 TypeMethodDescriptioncom.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 suppliedBulkOperationRequest
.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 theSearchResponse
.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 suppliedBulkOperationRequest
.- Parameters:
bulkOperationRequest
- theBulkOperationRequest
to createcontextInfo
- 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 checkentityType
- 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 theSearchResponse
.- Parameters:
catalogItems
- the list of catalog items from the search servicebulkOperationRequest
- theBulkOperationRequest
for this bulk operationbulkOperationResponse
- the bulk operation createdpageable
- the current page informationcontextInfo
- 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 recordsbulkOperationResponse
- the bulk operationcontextInfo
- context information surrounding sandboxing/multitenant state- Returns:
- the updated
bulk operation
-