Class BatchCompletionRecordUtils
java.lang.Object
com.broadleafcommerce.common.dataimport.util.BatchCompletionRecordUtils
- Author:
- Phillip Verheyden (phillipuniverse)
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<BatchCompletionRecord>
allErrored
(List<BatchRecord> from, String errorMessage) Converts all of the given BatchRecords and dependents to errorred completionsstatic List<BatchCompletionRecord>
allSuccess
(List<BatchRecord> from) Converts all of the given BatchRecords and dependents to successful completionsstatic BatchCompletionRecord
error
(BatchRecord original, String errorMessage) Creates a successful completion from the original record.static BatchCompletionRecord
success
(BatchRecord original) Creates a successful completion from the original record.
-
Method Details
-
allSuccess
Converts all of the given BatchRecords and dependents to successful completions- Parameters:
from
- records to convert from- Returns:
- flattened set of completions for the records and all their dependents
-
allErrored
Converts all of the given BatchRecords and dependents to errorred completions- Parameters:
from
- records to convert fromerrorMessage
- the errorMessage to give to all of the completions- Returns:
- flattened set of completions for the records and all their dependents
-
success
Creates a successful completion from the original record. Does not do anything with the dependents- Parameters:
original
- record to convert to a completion- Returns:
- the successful completion
-
error
Creates a successful completion from the original record. Does not do anything with the dependents- Parameters:
original
- record to convert to a completionerrorMessage
- erroMessage to give to the errored completion- Returns:
- the errored completion
-