Class BulkProcessUtil
- java.lang.Object
 - 
- com.broadleafcommerce.customer.service.bulk.BulkProcessUtil
 
 
- 
public class BulkProcessUtil extends Object
Convenience methods for use when performing bulk update operations. 
- 
- 
Constructor Summary
Constructors Constructor Description BulkProcessUtil(com.broadleafcommerce.data.tracking.core.web.ContextRequestConverter contextRequestConverter, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.broadleafcommerce.data.tracking.core.context.ContextInfobuildContextInfo(com.broadleafcommerce.bulk.domain.BulkUpdate bulkUpdate, com.broadleafcommerce.data.tracking.core.type.OperationType operationType)protected com.broadleafcommerce.data.tracking.core.context.ContextRequestbuildContextRequest(com.broadleafcommerce.bulk.domain.BulkUpdate bulkUpdate)com.broadleafcommerce.bulk.domain.BulkUpdateErrorbuildError(@NonNull com.broadleafcommerce.bulk.domain.BulkUpdateErrorType type, @NonNull Exception e)Returns aBulkUpdateErrorinstance with itsBulkUpdateError.descriptionset as the exception cause, and the stack trace populated.com.broadleafcommerce.bulk.domain.BulkUpdateErrorbuildError(@NonNull com.broadleafcommerce.bulk.domain.BulkUpdateErrorType type, @NonNull String description, String recordType, String recordId, Exception e)Returns a populatedBulkUpdateErrorinstance with the supplied parameters<T> TdeserializePayload(com.broadleafcommerce.bulk.domain.BulkUpdate bulkUpdate, Class<T> clazz)Converts the JSON string contained inBulkUpdate.getSerializedPayload()()} into a concrete object.protected com.broadleafcommerce.data.tracking.core.web.ContextRequestConvertergetContextRequestConverter()protected com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()protected com.broadleafcommerce.common.extension.TypeFactorygetTypeFactory() 
 - 
 
- 
- 
Method Detail
- 
deserializePayload
public <T> T deserializePayload(com.broadleafcommerce.bulk.domain.BulkUpdate bulkUpdate, Class<T> clazz)Converts the JSON string contained inBulkUpdate.getSerializedPayload()()} into a concrete object. 
- 
buildError
public com.broadleafcommerce.bulk.domain.BulkUpdateError buildError(@NonNull @NonNull com.broadleafcommerce.bulk.domain.BulkUpdateErrorType type, @NonNull @NonNull Exception e)Returns aBulkUpdateErrorinstance with itsBulkUpdateError.descriptionset as the exception cause, and the stack trace populated.- Parameters:
 type- TheBulkUpdateErrorTypee- The exception- Returns:
 - A populated error object
 - See Also:
 BulkUpdateError,BulkUpdateErrorType
 
- 
buildError
public com.broadleafcommerce.bulk.domain.BulkUpdateError buildError(@NonNull @NonNull com.broadleafcommerce.bulk.domain.BulkUpdateErrorType type, @NonNull @NonNull String description, @Nullable String recordType, @Nullable String recordId, @Nullable Exception e)Returns a populatedBulkUpdateErrorinstance with the supplied parameters- Parameters:
 type- TheBulkUpdateErrorTypedescription- A description of the error that occurred.recordType- The record typee- The exception that occurred- Returns:
 - A populated error object
 - See Also:
 BulkUpdateError,BulkUpdateErrorType,BulkUpdateTarget
 
- 
buildContextInfo
public com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContextInfo(com.broadleafcommerce.bulk.domain.BulkUpdate bulkUpdate, com.broadleafcommerce.data.tracking.core.type.OperationType operationType) 
- 
buildContextRequest
protected com.broadleafcommerce.data.tracking.core.context.ContextRequest buildContextRequest(com.broadleafcommerce.bulk.domain.BulkUpdate bulkUpdate)
 
- 
getContextRequestConverter
protected com.broadleafcommerce.data.tracking.core.web.ContextRequestConverter getContextRequestConverter()
 
- 
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
 
- 
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
 
 - 
 
 -