Interface DataFeedInspection<R extends com.broadleafcommerce.data.tracking.core.Trackable>

Type Parameters:
R - The base domain type this inspection covers
All Superinterfaces:
org.springframework.core.Ordered
All Known Implementing Classes:
AbstractDataFeedInspection

public interface DataFeedInspection<R extends com.broadleafcommerce.data.tracking.core.Trackable> extends org.springframework.core.Ordered
Represents a component capable of determining if a candidate is valid for data feeds, and if so, providing the identifiers required for notifying the data feed service for processing.
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    getDataFeedEntityUpdateEvent(com.broadleafcommerce.data.tracking.core.Trackable domain, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Factory method for creating a data feed event for a qualified production entity mutation.
    As part of the durable message send, the component will persist a durable state for the message.
    default int
    Inspections are ordered (default 0).
    boolean
    isMonitored(com.broadleafcommerce.data.tracking.core.Trackable t)
    Detect whether or not this inspection handles the passed type.
    boolean
    isRelevant(com.broadleafcommerce.data.tracking.core.Trackable t)
    Determine if the candidate is relevant for datafeed processing.
  • Method Details

    • isMonitored

      boolean isMonitored(com.broadleafcommerce.data.tracking.core.Trackable t)
      Detect whether or not this inspection handles the passed type. Note, the inspection should be able to handle extensions of the registered base type.
      Parameters:
      t - The candidate entity to test
      Returns:
      Whether or not this inspection should handle
    • getOrder

      default int getOrder()
      Inspections are ordered (default 0). Lesser values take higher precedence. The first inspection to pass the isMonitored(Trackable) check is used.
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Returns:
      The order of this inspection amount all the inspection beans found in the spring application context
    • isRelevant

      boolean isRelevant(com.broadleafcommerce.data.tracking.core.Trackable t)
      Determine if the candidate is relevant for datafeed processing. Note, not all mutations should inform datafeed processing.
      Parameters:
      t - The candidate entity to test
      Returns:
      Whether or not this inspection should handle
    • getDataFeedEntityUpdateEvent

      Optional<Object> getDataFeedEntityUpdateEvent(com.broadleafcommerce.data.tracking.core.Trackable domain, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Factory method for creating a data feed event for a qualified production entity mutation.
      Parameters:
      domain - The candidate entity that was mutated
      context - The request context information available at the time of mutation. May be null.
      Returns:
      The populated message payload to send.
    • getDataRoute

      String getDataRoute()
      As part of the durable message send, the component will persist a durable state for the message. This route lets that component know which data route should be used to persist that state.
      Returns:
      Data route key denoting which service bounded context datasource should be used