Interface CustomizedDataFeedPublicationRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Known Subinterfaces:
DataFeedPublicationRepository<D>,JpaDataFeedPublicationRepository<D>
- All Known Implementing Classes:
JpaCustomizedDataFeedPublicationRepository
public interface CustomizedDataFeedPublicationRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced repository methods for
DataFeedPublicationRepository.-
Method Summary
Modifier and TypeMethodDescriptioninitializeNotificationState(List<String> ids, String messageType, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically finds theDataFeedPublicationinstances for the givenids, and initializes theirNotificationStateformessageType.setStatusAndCompletionDetails(String id, String newStatus, Instant endTime, boolean containsErrors, List<String> errorDetails, String whereCurrentStatus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically sets a newDataFeedPublication.getStatus()and completion details on the specified publication.setStatusAndStartTime(String id, String newStatus, Instant startTime, String whereCurrentStatus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically sets a newDataFeedPublication.getStatus()andDataFeedPublication.getStartTime()on the specified publication.
-
Method Details
-
initializeNotificationState
@Policy(operationTypes=UPDATE) List<D> initializeNotificationState(List<String> ids, String messageType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically finds theDataFeedPublicationinstances for the givenids, and initializes theirNotificationStateformessageType.- Parameters:
ids- theDataFeedPublication.getId()ids for which to initialize the notification state. Cannot be empty.messageType- the message type (ex:NotificationState.getName()contextInfo- context information around multitenant state- Returns:
- the
DataFeedPublicationinstances that were successfully found and updated (omitting those which were not successfully updated)
-
setStatusAndStartTime
@Nullable @Policy(operationTypes=UPDATE) D setStatusAndStartTime(String id, String newStatus, Instant startTime, @Nullable String whereCurrentStatus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically sets a newDataFeedPublication.getStatus()andDataFeedPublication.getStartTime()on the specified publication.- Parameters:
id- the ID of the publication to updatenewStatus- the new value to set forDataFeedPublication.getStatus()startTime- the value to set forDataFeedPublication.getStartTime()whereCurrentStatus- (optional) if provided, the update will only be applied if the publication currently has this value for itsDataFeedPublication.getStatus()contextInfo- context information around multitenant state- Returns:
- the updated publication if successfully updated, else
null
-
setStatusAndCompletionDetails
@Nullable @Policy(operationTypes=UPDATE) D setStatusAndCompletionDetails(String id, String newStatus, Instant endTime, boolean containsErrors, @Nullable List<String> errorDetails, @Nullable String whereCurrentStatus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically sets a newDataFeedPublication.getStatus()and completion details on the specified publication.- Parameters:
id- the ID of the publication to updatenewStatus- the new value to set forDataFeedPublication.getStatus()endTime- the value to set forDataFeedPublication.getEndTime()containsErrors- the value to set forDataFeedPublication.isContainsErrors()errorDetails- (optional) the value to set forDataFeedPublication.getErrorDetails()whereCurrentStatus- (optional) if provided, the update will only be applied if the publication currently has this value for itsDataFeedPublication.getStatus()contextInfo- context information around multitenant state- Returns:
- the updated publication if successfully updated, else
null
-