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
.int
deleteAllByIdIn
(Collection<String> ids) Deletes all theBulkOperations
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 theInitializeItemRequest
.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
.readAllByUpdateDateBeforeAndStatusIn
(Instant threshold, Collection<String> statuses) Retrieves allBulkOperations
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
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
- theBulkOperationRequest
to 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
- theBulkOperationRequest
to initialize the included itemsbulkOperation
- the bulk operation for these itemscontextInfo
- 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 theInitializeItemRequest
.- Parameters:
initializeItemRequest
- theInitializeItemRequest
to initialize the itemsbulkOperation
- the bulk operation for these itemscontextInfo
- context surrounding sandboxing and multitenant state- Returns:
- the
InitializeItemResponse
for the batch of items initialized
-
readAllByUpdateDateBeforeAndStatusIn
Retrieves allBulkOperations
last updated before the given threshold.- Parameters:
threshold
- The date before which to retrieveBulkOperations
statuses
- Collection ofOperationStatuses
to restrict the retrievedBulkOperations
by.- Returns:
- All
BulkOperations
last updated before the given threshold.
-
deleteAllByIdIn
Deletes all theBulkOperations
matching the given IDs.- Parameters:
ids
- IDs of theBulkOperations
to delete.- Returns:
- The number deleted.
-