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 TypeMethodDescriptioncreateBulkOperationFromRequest(com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates a bulk operation from the givenBulkOperationRequest.intdeleteAllByIdIn(Collection<String> ids) Deletes all theBulkOperationsmatching the given IDs.com.broadleafcommerce.bulk.v2.domain.InitializeItemResponseinitializeBatchOfItems(com.broadleafcommerce.bulk.v2.domain.InitializeItemRequest initializeItemRequest, P bulkOperation, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Initializes the batch of items on theInitializeItemRequest.com.broadleafcommerce.bulk.v2.domain.InitializeItemResponseinitializeInclusionItems(com.broadleafcommerce.bulk.v2.domain.BulkOperationRequest bulkOperationRequest, P bulkOperation, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Initializes the list of inclusion items on theBulkOperationRequest.readAllByUpdateDateBeforeAndStatusIn(Instant threshold, Collection<String> statuses) Retrieves allBulkOperationslast 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, updateAllAllowingPartialSuccessMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlMappableCrudEntityService
readAll, readAll, readAll, readAll
-
Method Details
-
updateStatusAndSubStatus
Updates the bulk operation's status, substatus, and status history.- Parameters:
status- the new status, if anysubStatus- the new substatus, if anybulkOperation- 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 givenBulkOperationRequest.- Parameters:
bulkOperationRequest- theBulkOperationRequestto createcontextInfo- 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 theBulkOperationRequest.- Parameters:
bulkOperationRequest- theBulkOperationRequestto initialize the included itemsbulkOperation- the bulk operation for these itemscontextInfo- context surrounding sandboxing and multitenant state- Returns:
- the
InitializeItemResponsefor 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 theInitializeItemRequest.- Parameters:
initializeItemRequest- theInitializeItemRequestto initialize the itemsbulkOperation- the bulk operation for these itemscontextInfo- context surrounding sandboxing and multitenant state- Returns:
- the
InitializeItemResponsefor the batch of items initialized
-
readAllByUpdateDateBeforeAndStatusIn
Retrieves allBulkOperationslast updated before the given threshold.- Parameters:
threshold- The date before which to retrieveBulkOperationsstatuses- Collection ofOperationStatusesto restrict the retrievedBulkOperationsby.- Returns:
- All
BulkOperationslast updated before the given threshold.
-
deleteAllByIdIn
Deletes all theBulkOperationsmatching the given IDs.- Parameters:
ids- IDs of theBulkOperationsto delete.- Returns:
- The number deleted.
-