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 Details

    • initializeNotificationState

      @Policy(operationTypes=UPDATE) List<D> initializeNotificationState(List<String> ids, String messageType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Atomically finds the DataFeedPublication instances for the given ids, and initializes their NotificationState for messageType.
      Parameters:
      ids - the DataFeedPublication.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 DataFeedPublication instances 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 new DataFeedPublication.getStatus() and DataFeedPublication.getStartTime() on the specified publication.
      Parameters:
      id - the ID of the publication to update
      newStatus - the new value to set for DataFeedPublication.getStatus()
      startTime - the value to set for DataFeedPublication.getStartTime()
      whereCurrentStatus - (optional) if provided, the update will only be applied if the publication currently has this value for its DataFeedPublication.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 new DataFeedPublication.getStatus() and completion details on the specified publication.
      Parameters:
      id - the ID of the publication to update
      newStatus - the new value to set for DataFeedPublication.getStatus()
      endTime - the value to set for DataFeedPublication.getEndTime()
      containsErrors - the value to set for DataFeedPublication.isContainsErrors()
      errorDetails - (optional) the value to set for DataFeedPublication.getErrorDetails()
      whereCurrentStatus - (optional) if provided, the update will only be applied if the publication currently has this value for its DataFeedPublication.getStatus()
      contextInfo - context information around multitenant state
      Returns:
      the updated publication if successfully updated, else null