Interface BulkOperationService<P extends BulkOperation>

All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService<P>
All Known Implementing Classes:
DefaultBulkOperationService

public interface BulkOperationService<P extends BulkOperation> extends com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService<P>
Service API for BulkOperation. Supported by BulkOperationRepository.
Since:
2.1.0-GA
  • Method Summary

    Modifier and Type
    Method
    Description
    createBulkOperationFromRequest(com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Creates a bulk operation from the given BulkOperationRequest.
    int
    Deletes all the BulkOperations matching the given IDs.
    com.broadleafcommerce.bulk.v2.domain.InitializeItemResponse
    initializeBatchOfItems(com.broadleafcommerce.bulk.v2.domain.InitializeItemRequest initializeItemRequest, P bulkOperation, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Initializes the batch of items on the InitializeItemRequest.
    com.broadleafcommerce.bulk.v2.domain.InitializeItemResponse
    initializeInclusionItems(com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, P bulkOperation, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Initializes the list of inclusion items on the BulkOperationRequest.
    Retrieves all BulkOperations last updated before the given threshold.
    updateStatusAndSubStatus(String status, String subStatus, P bulkOperation)
    Updates the bulk operation's status, substatus, and status history.

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.MappableCrudEntityService

    create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByIds, readById, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService

    readAll, readAll, readAll, readAll
  • Method Details

    • updateStatusAndSubStatus

      P updateStatusAndSubStatus(String status, String subStatus, P bulkOperation)
      Updates the bulk operation's status, substatus, and status history.
      Parameters:
      status - the new status, if any
      subStatus - the new substatus, if any
      bulkOperation - the bulk operation to update
      Returns:
      the updated bulk operation
    • createBulkOperationFromRequest

      P createBulkOperationFromRequest(com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Creates a bulk operation from the given BulkOperationRequest.
      Parameters:
      bulkOperationRequest - the BulkOperationRequest to create
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
    • initializeInclusionItems

      com.broadleafcommerce.bulk.v2.domain.InitializeItemResponse initializeInclusionItems(com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, P bulkOperation, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Initializes the list of inclusion items on the BulkOperationRequest.
      Parameters:
      bulkOperationRequest - the BulkOperationRequest to initialize the included items
      bulkOperation - the bulk operation for these items
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
      the InitializeItemResponse for the items initialized
    • initializeBatchOfItems

      com.broadleafcommerce.bulk.v2.domain.InitializeItemResponse initializeBatchOfItems(com.broadleafcommerce.bulk.v2.domain.InitializeItemRequest initializeItemRequest, P bulkOperation, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Initializes the batch of items on the InitializeItemRequest.
      Parameters:
      initializeItemRequest - the InitializeItemRequest to initialize the items
      bulkOperation - the bulk operation for these items
      contextInfo - context surrounding sandboxing and multitenant state
      Returns:
      the InitializeItemResponse for the batch of items initialized
    • readAllByUpdateDateBeforeAndStatusIn

      List<P> readAllByUpdateDateBeforeAndStatusIn(Instant threshold, Collection<String> statuses)
      Retrieves all BulkOperations last updated before the given threshold.
      Parameters:
      threshold - The date before which to retrieve BulkOperations
      statuses - Collection of OperationStatuses to restrict the retrieved BulkOperations by.
      Returns:
      All BulkOperations last updated before the given threshold.
    • deleteAllByIdIn

      int deleteAllByIdIn(Collection<String> ids)
      Deletes all the BulkOperations matching the given IDs.
      Parameters:
      ids - IDs of the BulkOperations to delete.
      Returns:
      The number deleted.